Commit Graph

17 Commits

Author SHA1 Message Date
6d37e444da #2428
1) Reworked logic for pasting volumes

2) Fixed paste of volumes into different objects

3) Do not apply offset when pasting into the copied object

4) Keep source transformation matrix and relative positions when copy/pasting volumes into another object
2019-06-24 12:26:11 +02:00
91fd56429c Tech ENABLE_VOLUMES_CENTERING_FIXES set as default 2019-05-21 09:42:59 +02:00
b0830d062b WIP: Transformation of instances in world coordinate space:
Ulocking the "anisotropic" scaling checkbox will bake the transformation
into meshes to allow for scaling in world axes.

Optimized and templated the stl_transform functions, now also available for 3x3 matrices.
The Canvas3D::reload_scene() now maintains selection even if all volumes of an instance changed their IDs.
2019-04-26 17:28:31 +02:00
9ab83d31bc Fixed rotation of SLA instances in case a rotation in X or Y was applied
to the instances.
2019-04-08 13:35:03 +02:00
99f0207578 Handling of left hand oriented coordinate systems:
is_left_handed() method on transformations and volumes
rendering of GLVolumes in left handed coordinate systems by glFrontFace(GL_CW);
SLA slicing on left hand oriented instances by flipping the mesh for SLAPrintObject in X.
rendering of the SLA cutting plane in left handed systems
resetting the SLA clipping planes on 3D preview invalidation
2019-04-02 13:47:49 +02:00
b06c2598d4 Improvement of the initial placement of modifier meshes:
Sphere and Cylinder are scaled to the same volume as Box
Newly entered modifier meshes are rotated parallell to the world coordinates.
If the instance coordinate system is rotated and scaled, it is not possible
to create an unskewed modifier to world transformation. In that case
the best possible transformation is found to minimize least squares error
of the 8 corners of the new modifier mesh bounding box using
Levenberg-Marquardt algorithm.

FIXME:
1) The Levenberg-Marquardt non-linear least squares does not converge
nicely, it may require some tuning.
2) Above all, if 1) is called, then often the skew of the modifier mesh
is so high, that it is likely more useful to display the modifier
with zero rotation and inverse scaling, so that the modifier will be
of correct size, but not parallel to the world coordinates.
2019-02-28 11:20:01 +01:00
8bf692a640 WIP synchronization of Z rotation of the instances 2019-01-28 08:52:22 +01:00
05b6ed498a Code cleanup 2019-01-21 11:29:45 +01:00
5eb66728bb 1st installment of volumes centering fixes (WIP) 2019-01-18 12:52:09 +01:00
31986660a1 Model's volume transform set as default 2019-01-02 10:49:13 +01:00
97fdd96b2f Added extended functionality to Geometry::Transformation class 2018-11-01 13:42:07 +01:00
108110940c Mirror component of transformations set as default 2018-11-01 08:46:44 +01:00
e348d471e5 Added Geometry::Transformation class. Use it into ModelInstance, ModelVolume and GLVolume 2018-10-31 14:56:51 +01:00
1d2b29bc5c Mirror transform components in ModelInstance and GLvolume - WIP and disabled 2018-10-18 15:50:51 +02:00
36c9ec289b Added helper functions to extract euler angles from 3d transforms 2018-10-12 12:19:57 +02:00
167d63c98b Added helper functions to generate 3d transforms 2018-10-12 10:09:16 +02:00
1260b8deb3 WIP: Moved sources int src/, separated most of the source code from Perl.
The XS was left only for the unit / integration tests, and it links
libslic3r only. No wxWidgets are allowed to be used from Perl starting
from now.
2018-09-19 11:02:24 +02:00