Commit Graph

112 Commits

Author SHA1 Message Date
e2ec77946f Fix its_number_of_patches returning bool instead of size_t 2021-11-11 10:02:58 +01:00
6e81ec86c8 Fix some mesh errors in sl1 archive reconstruction 2021-11-05 15:43:40 +01:00
02367e5242 Fixing previous commit for QHull configured for doubles, not floats. 2021-10-22 15:20:40 +02:00
5d3de53633 Fixed previous commit, which broke debug compilation. 2021-10-22 15:11:51 +02:00
f1811a3c88 reduced copy / paste redudancy by extracting a new function
to produce convex hull: its_convex_hull()
2021-10-22 14:02:53 +02:00
dcfebd0e60 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-07 14:22:06 +02:00
d83b2e0d3d ObjectList: Fixes
* Fixed update of a warning icon for multi-part object, when some part with errors was deleted
 * Fixed a crash when selecting non-Object and non-Volume item (in get_mesh_errors_info() was missed check of the obj_idx)

+ Follow-up 1cc7b4ba97 - some code refactoring:
  * fixed RepairedMeshErrors.merge()
  * get_mesh_errors_count() renamed to get_repaired_errors_count()
2021-10-06 17:24:40 +02:00
805a589ccd Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-06 13:48:27 +02:00
93317618dd Save/Load repaired errors from/to a mesh statistics to/from a 3MF 2021-10-06 10:57:28 +02:00
14d49aa539 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-10-04 08:30:13 +02:00
afd8bf9424 Several minor improvements and fixed warnings 2021-10-01 14:31:22 +02:00
1afc35e7c0 Fixed update of mesh volume after applying a transformation.
Fixes flipped normals when importing some 3MFs.
2021-10-01 14:28:45 +02:00
8d18b6be3b Tech ENABLE_FIX_SINKING_OBJECT_OUT_OF_BED_DETECTION merged into tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS 2021-10-01 13:13:26 +02:00
c3f7227a9d Fixed conflicts after merge with master 2021-09-30 10:31:25 +02:00
61d1aba4fc Fix stl export on Linux 2021-09-24 10:15:46 +02:00
86d7b8f960 Mesh statistics for imported STLs: Added backwards_edges to open_edges,
so that a mesh with incorrectly oriented faces will not be considered
a manifold.

Added assert for 3D convex hulls constructed by QHull. They shall be
manifold (however sometimes they are not).
2021-09-21 16:04:04 +02:00
8acb9029eb Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision 2021-09-21 13:52:10 +02:00
2f0d1428fc Added a missing include (GCC 11.1). 2021-09-21 10:45:57 +02:00
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
bd5c6dea38 Follow-up of 2f95c7721f - Even faster implementation of method TriangleMesh::transformed_bounding_box(const Transform3d& trafo, double world_min_z) 2021-09-17 09:45:50 +02:00
79039e9f42 Follow-up of 5a84b46ec9 - Faster implementation of method TriangleMesh::transformed_bounding_box(const Transform3d& trafo, double world_min_z) 2021-09-17 08:42:01 +02:00
16cc287d6e Fix of detection of the out of bed state for sinking objects 2021-09-16 13:38:02 +02:00
9142fcc109 WIP: admesh eradication
follow-up to 58d8ab3dea
2021-09-14 14:51:40 +02:00
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
aae7e5f2a7 Fix of paint on supports don't work for object that has been scaled up #6718
The triangle-ray intersection function used a hard coded epsilon,
which did not work for triangle meshes, that were either too small
or too large. Newly the epsilon may be provided to the AABBTreeIndirect
search functions externally and IndexedMesh calculates a suitable
epsilon on demand from an average triangle mesh edge length.
2021-08-27 21:04:18 +02:00
bc2a61719a Add check of neighbors
Add store triangle for debug purpose
2021-08-16 11:53:37 +02:00
b1aeb799f0 New slice_mesh() variant slicing with a single plane only, running
on a single thread only (not parallelized).
The new slice_mesh() is used to calculate contour of objects sunken
below the print bed.
2021-07-26 17:02:56 +02:00
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
17ed82b673 Make new split always default if feasible 2021-06-08 10:34:32 +02:00
41c7ff4692 Add parallel version of neighbors index creation, make it default 2021-06-08 10:34:32 +02:00
04331beb33 Add new (winner) neighbor index based on measurements 2021-06-08 10:34:32 +02:00
c89ef2ee6b Add triangle mesh split to perf comparison 2021-06-08 10:34:32 +02:00
2227d0f1ad Added measuring sandbox for neighbors index creation 2021-06-08 10:34:32 +02:00
1ee724e7ed Corrected mesh split implementation 2021-06-08 10:28:23 +02:00
c451fc94ba Refactored hollowing backend to use indexed_triangle_mesh 2021-06-08 10:28:23 +02:00
997c446a05 SLA backend refactored, except Hollowing 2021-06-08 10:27:35 +02:00
46b8497a08 VertexFaceIndex: vertex index to incident face indices built for
indexed_triangle_set.
2021-06-01 19:30:26 +02:00
37179e04dc Merge remote-tracking branch 'remotes/origin/master' into vb_print_regions 2021-05-31 14:05:53 +02:00
afb0380285 Removed GLU calls from all the gizmos 2021-05-28 16:44:13 +02:00
725e8f8c57 Merge remote-tracking branch 'remotes/origin/master' into vb_print_regions 2021-05-26 14:38:34 +02:00
5ba44d3128 WIP: Refactoring of PrintRegions. It nearly compiles! 2021-05-21 17:57:37 +02:00
8df8ed291f Fix of its_collect_mesh_projection_points_above()
Fix of perl integration tests after introduction of not using the mesh
below the print bed.
2021-05-20 13:58:27 +02:00
757b34f51f Fixed typo in its_collect_mesh_projection_points_above() and method TriangleMesh::slice() set as const 2021-05-20 09:09:19 +02:00
fb262eaf93 Fixing 2021-05-19 16:51:25 +02:00
5acbfa5ab5 Optimization of its_collect_mesh_projection_points_above(): Reserve points. 2021-05-19 13:59:34 +02:00
ced430d5e5 Extracting its_collect_mesh_projection_points_above() out of
its_convex_hull_2d_above(), so that the projected points may get
collected over multiple volumes before applying Geometry::convex_hull()
2021-05-19 13:39:56 +02:00
6a3ce5b0eb New functions: its_convex_hull_2d_above() 2021-05-19 11:35:42 +02:00
25626f1c0a New utility function its_merge_vertices().
Implemented contour simplification inside slice_mesh_ex().
2021-05-18 17:57:55 +02:00
39e17fd6b9 TriangleMeshSlicer: Got rid of admesh! 2021-05-18 15:05:30 +02:00
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