Commit Graph

31 Commits

Author SHA1 Message Date
Lukáš Hejl
0110b4c9e2 Replaced the repeated application of Cursors (Sphere or Circle) in painting using 2D and 3D Capsules.
Previously, the Cursor (Sphere or Circle) was repeatedly applied between two mouse positions, creating brushstrokes with ripples on the edges between those mouse positions.
Now, a single capsule (3D or 2D) is applied between those mouse positions, which creates brushstrokes without these ripples.
2021-12-02 12:36:48 +01:00
Vojtech Bubnik
a7073284bf Tiny eigen vectorization beautification. 2021-11-19 10:56:07 +01:00
enricoturri1966
1a02d21af7 #7211 - Fixed reset direction of view clipping not aligning cut surface correctly when viewed from Left or Right 2021-11-01 11:08:02 +01:00
Lukas Matena
dfe6f8f42f Fix of #4666 (selection rectangle in SLA gizmo incorrectly handles transformations) 2021-09-22 21:31:33 +02:00
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
Lukas Matena
97dc182d27 Fixed shifted clippimg plane triangulation on scaled meshes,
fighting z-fighting has to be done in world coords.
2021-08-27 19:46:44 +02:00
Lukas Matena
ca5dc96af3 Fixed painting on surfaces close to the bed (broken since 1360446) 2021-08-23 09:47:37 +02:00
Lukas Matena
f0d922d047 Speed-up of clipping plane 2021-08-11 15:06:29 +02:00
Lukas Matena
8e009350b8 Painting gizmos and sinking objects:
1. Do not show what's below the bed when a gizmo is open
2. Triangulate the cut so people don't see inside
3. If regular clipping plane is used, the cuts are mutually clipped by one another
4. Painting itself ignores the hidden part of the object
2021-08-09 10:47:51 +02:00
Lukas Matena
1356e23994 Removed gluProject and gluUnProject calls 2021-05-28 16:44:13 +02:00
Vojtech Bubnik
b45e91e69b TriangleMeshSlicer: Optimized out unnecessary transformations. 2021-05-18 16:12:49 +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
tamasmeszaros
ca81fdfa0d Fix Gizmo preview with hollowed mesh 2021-03-08 17:38:10 +01:00
tamasmeszaros
6a9eccf673 Rename EigenMesh3D to IndexedMesh and SupportConfig to SupportTreeConfig 2020-08-03 19:05:30 +02:00
Lukas Matena
b6663fdc53 Fix of several issues related to gizmos updating and undo/redo
Common gizmos data cannot be used in on_set_state method
Also prevented calling render on empty GLVertexArrays
2020-06-03 15:33:39 +02:00
Lukas Matena
7eab7f416c Removed immediate OpenGL mode calls for clipping plane rendering 2020-05-21 10:25:31 +02:00
Lukas Matena
82cedcd870 FDM supports gizmo: caching triangle normals in order to increase performance 2020-05-18 16:08:21 +02:00
Lukas Matena
744927413b WIP: Added a circle cursor and naive logic to select triangles inside
Deselection is possible when holding shift
Triangles obscured by the mesh are selected nonetheless (so far)
2020-03-19 11:15:17 +01:00
Lukas Matena
1ef8886391 WIP: First working implementation of the triangle selector for the FDM support gizmo 2020-03-19 11:15:17 +01:00
bubnikv
a394d821a6 Spiral vase improvements and bugfixes.
Fixes Connecting / expanding Bottom Layers to Vase Perimeter #253
Fixes Slicing error in vase mode #452
Fixes Slicing Issue (Vase Mode, 0.6mm dmr nozzle) #1887
Fixes Top fill pattern isn't used in spiral vase mode #2533
Fixes Cisar's vase doesn't slice correctly, creates artefacts #3595

When the model is sliced, all the contours are newly oriented
counter-clockwise (even holes), merged and then only the largest area
contour is retained. In perimeter generator, if the largest contour
splits into multiple perimeters, newly only the largest area perimeter
is retained in spiral vase mode. These two changes solve #3595 and similar.

The infill is newly calculated only for the bottom solid layers
if the spiral vase mode is active (removes various unwanted infill
along the vase walls), and the last bottom solid layer is switched
to a top solid pattern (solves #2533).

The thin walls are newly enforced to be disabled in spiral vase mode,
and the "ensure vertical shell wall" is enforced in spiral vase mode
to extend the bottom of the vase to the vase hull (fixes #253).
2020-02-08 21:36:43 +01:00
Lukas Matena
a69f1912b2 Removed an obsolete variable from MeshRaycaster 2019-12-12 13:19:16 +01:00
Lukas Matena
11feb259a3 Merge branch 'master' into lm_tm_hollowing 2019-12-12 11:37:33 +01:00
Lukas Matena
c153c16808 Added comments in MeshUtils.hpp
PIMPL in MeshRaycaster now uses std::unique_ptr instead of raw pointer
2019-12-10 09:53:34 +01:00
Lukas Matena
14bd37048b Unified igl calls in MeshRaycaster and EigenMesh3D
MeshRaycaster is still aware of the clipping plane but it now uses EigenMesh3D internally
Public interface of both classes is unchanged
2019-11-08 20:18:14 +01:00
Lukas Matena
b9e86d21ec MeshUtils.cpp: MeshRaycaster is now aware of the clipping plane 2019-09-24 12:58:12 +02:00
Lukas Matena
f8139337fd SLA gizmo no more uses IGL code directly, all was moved to the new MeshRaycaster class 2019-09-17 14:57:57 +02:00
Lukas Matena
9520a432fd MeshRaycaster class is now used in SLA gizmo when selecting by rectangle 2019-09-17 14:57:54 +02:00
Lukas Matena
e0b41068ae Added functions get_hit_pos, get_hit_normal, ready to implement intersect_ray 2019-09-17 14:57:49 +02:00
Lukas Matena
9776224b06 Unproject on mesh in the SLA gizmo is now performed by the MeshRaycaster class 2019-09-17 14:57:45 +02:00
Lukas Matena
44a4110bd8 Renamed MeshClipper.cpp/.hpp to MeshUtils.cpp/.hpp
More helper classes like the MeshClipper could live here
Moved ClippingPlane class in here to start
2019-09-13 12:03:53 +02:00