Commit Graph

3387 Commits

Author SHA1 Message Date
Vojtech Bubnik
53a5c23d0f Eradicated admesh from TriangleMesh:
TriangleMesh newly only holds indexed_triangle_set and
TriangleMeshStats. TriangleMeshStats contains an excerpt of stl_stats.
TriangleMeshStats are updated when initializing with indexed_triangle_set.

Admesh triangle mesh fixing is newly only used when loading an STL.
AMF / 3MF / OBJ file formats are already indexed triangle sets, thus
they are no more converted to admesh stl_file format, nor fixed
through admesh repair machinery. When importing AMF / 3MF / OBJ files,
volume is calculated and if negative, all faces are flipped. Also
a bounding box and number of open edges is calculated.

Implemented its_number_of_patches(), its_num_open_edges()
Optimized its_split(), its_is_splittable() using a visitor pattern.

Reworked QHull integration into TriangleMesh:
    1) Face normals were not right.
    2) Indexed triangle set is newly emitted instead of duplicating
       vertices for each face.

Fixed cut_mesh(): Orient the triangulated faces correctly.
2021-09-20 17:12:22 +02:00
Vojtech Bubnik
01451d2e63 Removed the PRUS format parser. WIP: admesh eradication:
stl_stats are newly only accessed by TriangleMesh::stats(),
most of the direct access to TriangleMesh::stl is gone with the exception
of parsing input files (3MF, AMF, obj).
2021-09-14 11:58:14 +02:00
Vojtech Bubnik
193a960e89 Follow-up to beee18f229
WIP to G-code export parallelization through pipelining:
Decoupled CoolingBuffer from GCode / GCodeWriter, ready to be
pipelined on a different thread.
2021-09-10 11:43:59 +02:00
Vojtech Bubnik
bcd7b9ea7b Commenting out untested and unused Polyline::simplify_by_visibility() 2021-09-03 16:21:44 +02:00
Vojtech Bubnik
53112e07b4 Fixed Perl bindings 2021-08-27 15:05:18 +02:00
Lukas Matena
9845459ba8 Fixed Perl bindings 2021-07-14 16:02:04 +02:00
Vojtech Bubnik
c5304750d9 Support for forward compatibility of configurations, user and system
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.

When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.

Substitute enums and bools only.  Allow booleans to be parsed as
    true: "1", "enabled", "on" case insensitive
    false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".

Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.

WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
2021-06-27 16:57:05 +02:00
Vojtech Bubnik
39e17fd6b9 TriangleMeshSlicer: Got rid of admesh! 2021-05-18 15:05:30 +02:00
Vojtech Bubnik
499d8405e9 WIP: Reworked slicing
1) Slicing code moved to TriangleMeshSlicer.cpp,hpp from TriangleMesh.cpp,hpp
2) Refactored to use as little as possible of admesh.
2021-05-17 20:25:59 +02:00
YuSanka
2372f3b029 Fix of #2825 - Add the length of each filament used 2021-05-07 12:48:34 +02:00
Vojtech Bubnik
be3068564b Fixed Polygon::centroid()
Ported Polygon unit tests from Perl to C++.
2021-05-07 11:42:21 +02:00
Vojtech Bubnik
365d7a83cc Refactoring for code clarity: Replaced this->m_xxx with m_xxx
as the m_ prefix already signifies a class local variable.
2021-05-06 14:43:36 +02:00
Vojtech Bubnik
23b9a66197 Removing offset2 from Perl bindings and other minor cleanup. 2021-05-06 14:29:20 +02:00
Vojtech Bubnik
823605802e Fixing Perl integration 2021-05-06 13:58:37 +02:00
Vojtech Bubnik
7f20564f1b Fixing perl bindings 2021-05-05 17:03:11 +02:00
Vojtech Bubnik
ef85b428ab WIP: Moving ownership of PrintRegions to PrintObjects. 2021-05-05 16:21:55 +02:00
Vojtech Bubnik
bce17e5e25 Fixing perl integration 2021-05-05 15:05:52 +02:00
Vojtech Bubnik
ace13dde31 Fixed perl unit tests 2021-05-05 13:27:00 +02:00
Vojtech Bubnik
9c606e7948 Refactoring of StaticPrintConfig & derived classes:
1) Using boost::preprocessor to reduce code duplicities when defining
   new configuration values.
2) Implemented static hash() and operator== on StaticPrintConfig derived
   classes to support hash tables of instances thereof.
2021-04-26 18:37:10 +02:00
Vojtech Bubnik
7a3ddb3de5 Merge branch 'tm_vb_clipper_eigen' 2021-04-23 11:44:25 +02:00
Vojtech Bubnik
065bf79257 Fixed Perl bindings of Clipper after Clipper was adapted to Slic3r::Point 2021-04-23 11:02:16 +02:00
Vojtech Bubnik
e912da36eb Convincing ClipperLib to use Slic3r's own Point type internally. 2021-04-21 20:15:49 +02:00
Vojtech Bubnik
237a35e24e and the final Perl unit test fix 2021-04-21 15:47:28 +02:00
Vojtech Bubnik
f5aa778fee Yet another Perl test 2021-04-21 15:46:47 +02:00
Vojtech Bubnik
fbd1be5ce1 Another last perl unit test fix 2021-04-21 15:43:41 +02:00
Vojtech Bubnik
fefdc675f0 Fixing perl unit tests 2021-04-21 15:38:00 +02:00
Vojtech Bubnik
49a4e92587 ConfigOptions: GUI type as enum, not string.
Fixing compilation error in the new Platform code.
Fixing one issue in FDM support after splitting the top/bottom
interface layers.
2021-03-15 09:55:57 +01:00
Vojtech Bubnik
7aaf497380 Reworked the "new" bridging to respect the bridge_flow_ratio
by maintaining extrusion spacing, but modifying the extrusion width
and / or height.
2021-03-15 09:55:56 +01:00
Vojtech Bubnik
d46942b11a Fixing unit tests. 2021-03-15 09:55:56 +01:00
Vojtech Bubnik
2cce568f07 The perl binding is killing Vojtech 2021-02-18 11:47:06 +01:00
Vojtech Bubnik
896b11d24b Fixing the Perl bindings for the last time 2021-02-18 11:42:35 +01:00
Vojtech Bubnik
37405ef838 Finally the Perl binding fix arrived! 2021-02-18 10:39:46 +01:00
Vojtech Bubnik
8f3b3410ba Cooling buffer - fix of Perl bindings 2021-02-18 10:31:15 +01:00
Vojtech Bubnik
ed721509b9 Fix of Perl integration after cooling buffer rework 2021-02-18 10:16:56 +01:00
Vojtech Bubnik
60cc12002e Removal of not numerically robust libraries "poly2tree" and "polypartition".
Adjustment of GUI/3DBed.cpp,hpp to use the more stable triangulation algoritm
derived from SGI glut.
Fix of an extremely slow bridging calculation, caused by an extremely
slow bridged area detection function, of which the results were never used.
Fixes "slicing fails or takes too long #5974"
2021-02-09 18:36:28 +01:00
Vojtech Bubnik
3f2b57b1d4 Squash merge of lh_brim_rework,
brim separated to Brim.cpp,hpp
Refactored accessors to PrintObjectPtrs, PrintRegionPtrs, LayerPtrs,
SupportLayerPtrs for const correctness.
2021-02-03 15:12:53 +01:00
Vojtech Bubnik
163db14447 Fixing Perl bindings after update of Boost. 2021-01-15 19:47:51 +01:00
Vojtech Bubnik
e74465a4eb Fix of re-slicing with multiple regions.
This is a fix of a bug, which was in Slic3r forever, where raw slices
were not cached, but recalculated from classified regions, where
merging the regions did not produce the original contour reliably.
Fixes [2.3.0-beta2] Odd bad slicing related to infill (?) percentage #5407
2020-12-11 12:21:07 +01:00
Vojtech Bubnik
edf4fe7e4f Fix of spiral vase mode with holes in the bottom: Holes in the bottom layers
(non-spiral vase layers) were being closed.
Fixes Bad slicing in vase mode (unexpected bridge and solid infill layers) #3326
Fixes Model with holes in the base does not slice properly in "Vase Mode" #5359
2020-12-09 14:54:26 +01:00
Lukáš Hejl
d6b66b1fa5 Merge remote-tracking branch 'origin/master' into lh_avoid_crossing_perimeters
# Conflicts:
#	src/libslic3r/MotionPlanner.cpp
#	src/libslic3r/libslic3r.h
2020-11-29 17:27:23 +01:00
Vojtech Bubnik
592b0e82d8 Follow-up to 80e8b5e985
Removed the legacy PreviewData.cpp,hpp
2020-11-21 11:02:20 +01:00
Vojtech Bubnik
73d3ce2080 Avoid crossing perimeters: Further refactoring for clarity, code review. 2020-11-17 15:34:50 +01:00
Vojtech Bubnik
5ead86bdea Removed the old motion planner. 2020-11-17 09:33:30 +01:00
Vojtech Bubnik
9c07db8ee0 Fills:
1) New algorithm for connecting along the perimeters is now applied
   to Honeycomb, Hilbert and similar planar filling curves.
2) The old expensive path chaining is not applied if the new algorithm
   to connect along the perimeter lines is called afterwards.
2020-11-16 12:51:51 +01:00
Vojtech Bubnik
b4d8d1dd84 Merge remote-tracking branch 'remotes/origin/master' into lh_adaptive_infill_hooks 2020-11-16 10:54:19 +01:00
Vojtech Bubnik
dc25f3900f Reworked connection of infill lines to perimeter lines.
Added a new "infill_anchor" parameter.
2020-11-16 10:54:00 +01:00
enricoturri1966
46d29ca75f Fix of previous commit 2020-11-11 17:35:29 +01:00
enricoturri1966
733d4702c2 Follow-up of 80e8b5e985 -> Fixed include in GCode.xsp 2020-11-11 17:28:56 +01:00
Vojtech Bubnik
e53d1e63cb Fix of previous commit. 2020-09-24 20:32:52 +02:00
Vojtech Bubnik
3f3c649f3e Final fix of Perl bindings 2020-09-24 14:52:05 +02:00