Commit Graph

160 Commits

Author SHA1 Message Date
537df6b503 New BuildVolume class was created, which detects build volume type (rectangular,
circular, convex, concave) and performs efficient collision detection agains these build
volumes. As of now, collision detection is performed against a convex
hull of a concave build volume for efficency.

GCodeProcessor::Result renamed out of GCodeProcessor to GCodeProcessorResult,
so it could be forward declared.

Plater newly exports BuildVolume, not Bed3D. Bed3D is a rendering class,
while BuildVolume is a purely geometric class.

Reduced usage of global wxGetApp, the Bed3D is passed as a parameter
to View3D/Preview/GLCanvas.

Convex hull code was extracted from Geometry.cpp/hpp to Geometry/ConvexHulll.cpp,hpp.
New test inside_convex_polygon().
New efficent point inside polygon test: Decompose convex hull
to bottom / top parts and use the decomposition to detect point inside
a convex polygon in O(log n). decompose_convex_polygon_top_bottom(),
inside_convex_polygon().

New Circle constructing functions: circle_ransac() and circle_taubin_newton().

New polygon_is_convex() test with unit tests.
2021-11-16 10:15:51 +01:00
183cfe8e78 #7293 - Do not put __FILE__ info in release mode 2021-11-12 15:08:04 +01:00
d03fd2f63e Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Reworked detection of collision with printbed. The detection uses now different algorithms in dependence of the printbed type (rectangular, circular, convex) to improve performance. 2021-10-06 13:47:54 +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
a29d6055aa Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Fixed detection of collision with circular printbed for pre-gcode preview and sla preview 2021-10-01 12:15:14 +02:00
af6ebbda61 Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Enable detection of collision with circular printbed in backend 2021-09-30 14:51:09 +02:00
f913dde653 Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Completed detection of collision with circular printbed for toolpaths and sla auxyliary volumes 2021-09-30 13:16:05 +02:00
08734d0424 Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Enable detection of collision with circular printbed for toolpaths 2021-09-30 12:08:05 +02:00
d383c0ccf4 Tech ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS - Out of bed detection for circular printbeds 2021-09-21 13:51:57 +02:00
16cc287d6e Fix of detection of the out of bed state for sinking objects 2021-09-16 13:38:02 +02:00
8ae30ff5b8 Use std::optional to replace dirty flags for bounding boxes in GLVolume 2021-09-16 10:46:56 +02:00
4cfe8c8e1c Tech ENABLE_SINKING_CONTOURS set as default 2021-09-14 15:45:21 +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
d86f7f0a2b Fixed painting gizmos with modifiers below the bed:
- When a modifier was below the bed and all the object parts above, it would clip
  the modifier but not triangulate the cut.
- When an object part was below, it would triangulate all modifiers with
  opaque orange color.

Both should now be fixed.
2021-09-13 09:02:11 +02:00
f17a5837b7 Removed duplicated method GLVolumeCollection::check_outside_state() 2021-09-10 08:27:03 +02:00
4d8a9ad10c Do not show sinking contours when a gizmo hides some objects 2021-08-11 16:17:28 +02:00
6165e6ecfb Tech ENABLE_SINKING_CONTOURS -> Improved generation of sinking contours and color set to white 2021-07-28 14:27:57 +02:00
fe2903937c Tech ENABLE_SINKING_CONTOURS -> Sinking contours updated during render pass and shown also while dragging an object 2021-07-28 12:23:27 +02:00
151f489ed8 Tech ENABLE_SINKING_CONTOURS -> Sinking contours rendered using triangles 2021-07-28 11:21:59 +02:00
fcf8a4ca63 Tech ENABLE_SINKING_CONTOURS -> Sinking contours shown while dragging Move/Rotate/Scale gizmos and show contours for gizmo cut 2021-07-27 13:02:06 +02:00
0cda79646f Fixed conflicts after merge with master 2021-07-22 11:46:00 +02:00
f4b466ee93 Techs DISABLE_ALLOW_NEGATIVE_Z_FOR_SLA and ENABLE_ALLOW_NEGATIVE_Z set as default 2021-07-22 11:26:31 +02:00
6ec647969f Tech ENABLE_SINKING_CONTOURS -> 1st installment 2021-07-21 15:30:57 +02:00
35a0bfa909 Colors in GLVolume defined as std::array<float, 4> 2021-07-19 11:11:49 +02:00
bfdaeae376 Delayed rendering of transparent volumes 2021-07-14 13:20:57 +02:00
5b9d7e7376 Follow up (bugfix) of 0d70a2be69
GLIndexedVertexArray newly uses Eigen::AlignedBox<float, 3>
for efficiency instead of our double based BoundingBoxf3.
2021-07-12 10:53:09 +02:00
d7bc4468b8 Fixed compiler warnings 2021-06-20 16:39:10 +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
611ea4383d TriangleSelector - some memory optimization.
Don't store traingle normal, but reference the source triangle,
which stores its normal.
2021-06-11 12:27:58 +02:00
f794e9a5f8 Removed obsolete method from GLVolumeCollection 2021-05-13 14:56:35 +02:00
2d03e241cf Tech ENABLE_ALLOW_NEGATIVE_Z -> Shading of sinking instances 2021-04-22 13:18:36 +02:00
27336d2145 Removed mutable members from class GLVolume 2021-04-20 12:55:23 +02:00
945499fb29 Notifications management and rendering refactoring.
With warning notification Model out of bed reworked to not show after dismiss.
2021-03-12 10:32:26 +01:00
bce0816471 Tech ENABLE_OPENGL_ERROR_LOGGING set as default 2021-02-25 13:38:52 +01:00
db820aa8f5 Increase tolerance for objects being outside print bed. 2021-01-08 10:14:24 +01:00
9f71626a0a 1) Shader manager: Allow to override #defines programatically
when loading a shader file.
2) Conditional compilation of environmental mapping in gouraud.fs
   using 1)
2020-12-10 13:20:25 +01:00
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
a72d8f7aef ENABLE_GCODE_VIEWER set as default in:
3DScene hpp/cpp

AboutDialog.cpp

BackgroundSlicingProcess hpp/cpp

BitmapCache.cpp

ConfigWizard_private.hpp

GUI_App hpp/cpp

GUI_Init.cpp
2020-11-18 10:44:03 +01:00
9d3ca1ca4f ENABLE_SLOPE_RENDERING set as default
Slope rendering active only when using Gizmo FDM supports
2020-10-02 15:43:39 +02:00
ad303d608c FDM painting gizmos (support/seam) now render object in neutral color
The goal is to ensure enough contrast independent on current filament color
2020-09-25 16:05:34 +02:00
a0b89dc5ce GCodeViewer -> Export of extrude toolpaths to obj files 2020-07-03 12:17:12 +02:00
bf91b34021 Added new tech ENABLE_GCODE_VIEWER_AS_STATE -> GCodeViewer as a new application state (WIP) + fix of conflicts after merge with master 2020-06-05 16:50:17 +02:00
297fec4ab6 Reduced ugly copy / paste for ENABLE_OPENGL_ERROR_LOGGING 2020-06-04 15:53:58 +02:00
2146246964 Added tech ENABLE_OPENGL_ERROR_LOGGING -> log opengl errors when SLIC3R_LOGLEVEL=5 2020-06-04 14:48:52 +02:00
fdac77be36 Fixed conflicts after merge with master 2020-06-04 13:57:39 +02:00
866a3ad357 New tech ENABLE_SMOOTH_NORMALS (disabled) -> Added two experimental functions to smooth normals using libigl (none of them working properly in detecting edges) when calling GLIndexedVertexArray::load_mesh_full_shading() 2020-06-02 10:02:50 +02:00
acd8801d3a Fixed conflicts after merge with master 2020-05-27 10:32:02 +02:00
ce42c67a2a ENABLE_GCODE_VIEWER -> Completed implementation of new GLModel class 2020-05-27 08:06:02 +02:00
c15a0d91bf Fixed unit tests after previous include manipulations 2020-05-26 15:33:44 +02:00
a8628a040c Include cleanup: do not include Model.hpp from 3DScene.hpp 2020-05-26 13:45:36 +02:00