Commit Graph

268 Commits

Author SHA1 Message Date
Vojtech Bubnik
69ffe12fd2 Renamed create_face_neighbors_index() to its_face_edge_ids().
Renamed its_create_neighbors_index() / its_create_neighbors_index_par() to its_face_neighbors() / its_face_neighbors_par().
New variant of its_face_edge_ids() to create edge IDs from face neighbors.
Fixed some incorrect use of _NDEBUG, it should be NDEBUG.
PrintObject::slice_support_volumes() returns newly Polygons, which are cheaper than ExPolygons.
Updated SeamPlacer and SupportMaterial to use regions defined as Polygons, not ExPolygons.
TriangleSelector::get_facets_strict() returning a patch with T-joints retriangulated.
New slice_mesh_slabs() - slicing projections of a triangle patch into top / bottom layers of slices, for MMU top / bottom segmentation.
TriangleMeshSlicer - use 64 mutexes instead of one when scattering sliced triangles into layers. This makes a big difference on modern many core desktop computers.
When applying MM segmented regions to input regions, the split regions are now re-merged with 10x higher positive offset epsilon to avoid creating gaps.
When testing for existence of paint-on supports or seam, use a more efficient has_facets() test, which does not deserialize into the expensive TriangleSelector tree structure.
GLIndexedVertexArray newly uses Eigen::AlignedBox<float, 3> for efficiency instead of our double based BoundingBoxf3.
Improved MMU painting refresh speed by optimizing generation of the vertex buffers.
Refactored MMU segmentation - projection of painted surfaces from top / bottom.
	1) Parallelized.
	2) Using the new slice_mesh_slabs() instead of projecting one triangle by the other and merging them with Clipper.
2021-06-20 15:21:12 +02:00
enricoturri1966
7130cfb1e3 Added missing assignment into ModelObject::assign_copy() 2021-06-10 13:32:53 +02:00
Vojtech Bubnik
e4f36339e8 Support / seam / MMU painting serialization / deserialization:
Changed the serialization structure
	std::map<int, std::vector<bool>>
to a significantly more compact
	std::pair<std::vector<std::pair<int, int>>, std::vector<bool>>
Such change shall significantly improve efficiency of Undo / Redo stack.
2021-06-10 09:26:30 +02:00
enricoturri1966
cf1731feea Tech ENABLE_ALLOW_NEGATIVE_Z -> Added threshold to detect if an object is sinking 2021-06-08 10:07:47 +02:00
YuSanka
392bf4f2d0 Follow-up 7eebd56b5f - fixed a typo
+ added add_negative.svg for dark mode
2021-06-02 14:36:49 +02:00
YuSanka
611b91bc1f Fixed DnD for "Model part" volumes inside the object
Fixed volumes order inside the object
2021-06-02 12:54:56 +02:00
Vojtech Bubnik
a15d4cdede Fixed compilation on GCC 2021-05-28 15:22:00 +02:00
Vojtech Bubnik
9eace9acac Merge branch 'vb_print_regions' of https://github.com/Prusa3d/PrusaSlicer into vb_print_regions 2021-05-28 15:14:41 +02:00
Vojtech Bubnik
f2e0cd1557 Bugfixes after PrintRegion refactoring. 2021-05-28 15:14:34 +02:00
YuSanka
32242f0217 Update extruder show/hide and default extruder color in respect to the volume type 2021-05-28 13:41:36 +02:00
Vojtech Bubnik
a9dd568efc WIP: Integration of MMU painting into the slicing back-end. 2021-05-27 14:29:51 +02:00
Vojtech Bubnik
4c3781b884 Merge branch 'vb_print_regions' of https://github.com/Prusa3d/PrusaSlicer into vb_print_regions 2021-05-26 16:15:01 +02:00
Vojtech Bubnik
aa6cc8eef7 Some fixes after preceding merge. Moved mmu_segmented_region_max_width
from PrintConfig to PrintObjectConfig.
2021-05-26 16:14:52 +02:00
YuSanka
4d1bce166c Fixed DnD function for volumes inside the object in respect to the volume type 2021-05-26 15:36:48 +02:00
Vojtech Bubnik
4809689dcb Merge remote-tracking branch 'remotes/origin/lh_multi_material_segmentation' into vb_print_regions 2021-05-26 15:23:35 +02:00
Vojtech Bubnik
725e8f8c57 Merge remote-tracking branch 'remotes/origin/master' into vb_print_regions 2021-05-26 14:38:34 +02:00
Vojtech Bubnik
08935fb858 WIP PrintRegion refactoring: Another round of bug fixing, negative volumes
seem to work.
2021-05-26 12:41:06 +02:00
enricoturri1966
4286abe211 Tech ENABLE_ALLOW_NEGATIVE_Z -> New implementation for method ModelObject::convex_hull_2d() 2021-05-20 09:32:17 +02:00
Vojtech Bubnik
c454619aa8 Merge remote-tracking branch 'remotes/origin/master' into vb_print_regions 2021-05-19 14:00:21 +02:00
Vojtech Bubnik
3b388024f1 Factored out convex hull calculation from ModelObject::convex_hull_2d()
to Geometry::convex_hull().
Update Geometry::convex_hull() to handle duplicate points.
2021-05-19 13:23:19 +02:00
Vojtech Bubnik
58b7b74fb3 Merge remote-tracking branch 'remotes/origin/master' into vb_print_regions 2021-05-19 09:40:24 +02:00
Vojtech Bubnik
11e02fcd44 WIP: Refactoring of PrintRegions 2021-05-19 09:38:51 +02:00
enricoturri1966
037dc96b4e Follow-up of c37d18f046 -> Removed assert 2021-05-19 08:39:04 +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
enricoturri1966
f95126c0b4 Faster ModelObject::convex_hull_2d() by using ModelVolume 3D convex hulls 2021-05-17 13:02:38 +02:00
enricoturri1966
2872b3c647 Follow-up of ca14ea4c33 -> Fixed arrange with sinking objects 2021-05-17 12:53:05 +02:00
enricoturri1966
33c0094210 Tech ENABLE_ALLOW_NEGATIVE_Z -> ModelObject::convex_hull_2d() and sequential_print_horizontal_clearance_valid() modified to take in account for sinking instances 2021-05-14 15:02:54 +02:00
enricoturri1966
268475d96c Fixed conflicts after merge with master 2021-05-10 10:25:57 +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
enricoturri1966
0916f23e3f Tech ENABLE_ALLOW_NEGATIVE_Z->Fixed object popping up after editing layer range fields 2021-04-28 11:07:15 +02:00
Lukas Matena
fa71246ca4 Fix normal direction when exporting STL (#6406)
The export function does not depend on Model/ModelObject::mesh() family of functions,
changing them might break the already too brittle code.
2021-04-26 19:58:08 +02:00
enricoturri1966
807da39f15 Tech ENABLE_ALLOW_NEGATIVE_Z -> Keep sinking instances as sinking after applying rotate gizmo 2021-04-23 08:29:29 +02:00
Lukáš Hejl
97a85eb487 WIP: MMU segmentation without top and bottom layers 2021-04-19 07:04:50 +02:00
Lukáš Hejl
ef8718327b WIP: Duplicated the FDM support gizmo for the MMU segmentation 2021-04-19 07:01:11 +02:00
Oleksandra Yushchenko
31c7eacfbe Ys code refactoring (#6227)
* GUI_ObjectList code refactoring:
The MenuFactory structure contains functions related to the context menu and bitmaps used to different volume types.
The SettingsFactory structure contains functions to getting overridden options, its bundles and bitmaps used to setting categories.

Fixed bugs/crashes:
1. Add object -> Add Settings from 3D scene -> Right click on object => Part's Settings list instead of object's
   (Same behavior if something else but Object is selected in ObjectList)
2. Add settings to the part -> Change part type to the "Support Blocker/Enforcer" -> Settings disappears (it's OK) but =>
   Save Project -> Open project => Support Blocker/Enforcer has a settings
3. Add part for object -> Change type of part -> Change monitor DPI -> old type icon appears
4. Select all instances in ObjectList -> Context menu in 3D scene -> Add Settings -> Select some category -> Crash

* ObjectLayers: Fixed a crash on re-scaling, when some layer range is selected

* Fixed OSX build

* Added menu item "Split to Objects" for multipart objects

+ Fixed bug: Add 2 parts,
             Add some settings for one part
             Delete part without settings => Single part object without settings, but settings are applied for the object.

+ Next refactoring: use same menu for Plater and ObjectList
2021-03-15 10:04:45 +01:00
YuSanka
72fcba1202 SPE-1103 Added menu items for the conversation of the volumes from/to meters
Related to #4521
2021-02-10 20:34:05 +01:00
Boleslaw Ciesielski
9b3e81b3e4 Fixes issue #5979 - NULL pointer crash in ModelObject::split()
ModelObject::split() expects a non-NULL new_objects vector where it adds pointers to the new models resulting from the split.
But in the CLI case the caller does not care about this and passes NULL which causes a crash. To fix the crash we could pass
a dummy vector but it turns out that we actually have a use for the results because we should assign a unique name to each
new model the same way as the GUI does. These names show up as comments in the gcode so this change makes the gcode produced
by the GUI and the CLI more similar and diffable.

@lukasmatena has amended the original commit by @combolek (pull request #5991) in order to avoid code duplication
2021-02-10 12:30:06 +01:00
YuSanka
e4df27997e Added check for loaded STL file if it was saved in meters. Related to #4521 (Some files are imported in the wrong size) 2021-02-09 17:04:32 +01:00
Lukas Matena
c26ba256bc Do not remove custom supports/seams when converting units to imperial 2020-12-14 20:27:19 +01:00
Vojtech Bubnik
3dbb6fa7ad Fixed retrieving of the "saved in inches" flag from 3MF.
Fixed "import STL from Inches" - it should always scale up even if the
object is bigger than 3x3x3mm.
2020-12-12 18:54:34 +01:00
Vojtech Bubnik
a6cf909405 Follow-up on aaaa85c1f8
Fix of #5007 - "Reload from disk" causes objects converted to inches to revert to mm
1) Storing and reloading the "source_in_inches" source flag from AMF and 3MF
2) When converting objects with mixed "inches" volumes, do the right thing
   and do not convert those that do not need conversion.
2020-12-12 12:06:15 +01:00
YuSanka
080088b8db Fix of #5007 - "Reload from disk" causes objects converted to inches to revert to mm 2020-12-11 13:57:58 +01:00
tamasmeszaros
ba155e88d7 Fix crash when splitting objects
fixes partially #2209
2020-12-03 14:58:56 +01:00
tamasmeszaros
c6090fc69e Fix arrange with malformed contours 2020-12-03 14:58:09 +01:00
tamasmeszaros
f9d5b20c85 Fix out of bed items after arrange.
Disabled outline decimation for arrange and added very small (EPSILON) safety offset to bed detection boundaries.
2020-12-03 12:00:12 +01:00
enricoturri1966
21aedc156e Removed the legacy PreviewData.cpp,hpp 2020-11-11 16:38:51 +01:00
YuSanka
f09e65069c Fixed conversion from/to imperial units for objects with parts/modifiers 2020-10-22 15:45:17 +02:00
Vojtech Bubnik
575da4840f Removed m_ prefix from public member variables. 2020-10-09 13:09:21 +02:00
Vojtech Bubnik
f1a358509d Fixing Undo / Redo issues after copy / paste due to not updating
ObjectIDs of support painting / seam painting / layer height profile.
2020-10-09 12:26:28 +02:00