s-leger / blender_cad_transforms

Precise CAD like transfoms for blender
GNU General Public License v3.0
75 stars 4 forks source link

snap still snapped to pre-modified geometry, as well, as the modified geometry. #27

Open theoryshaw opened 4 years ago

theoryshaw commented 4 years ago

Would be nice if the snap still snapped to pre-modified geometry, as well, as the modified geometry.

video: https://www.dropbox.com/s/uitd0sadpas6ien/2020-09-02_11-53-22.mp4?dl=0

s-leger commented 4 years ago

May add an option for this, but will have impact on performances at snap init time especially on huge mesh.

theoryshaw commented 4 years ago

Cool, or maybe a preference toggle, so users can manage possible laggy scenarios.

s-leger commented 3 years ago

Looks like it is way harder than expected, snap use a ray cast to figure what's under the mouse pointer, but blender's raycast only see the final mesh result (with modifiers) and there is no obvious relation with non modified object's faces indexes - so no safe way to know the original - non modified - face hit by the ray. The only solution i can think about is to use a pure opengl way to store non modified faces - as object's origin and curves, but it will be painfully slow on mouse hover (mostly a data structure memory initialisation performance issue) starting from medium mesh.

Michaelknubben commented 2 years ago

Would it be an option to duplicate the mesh and display it as Wireframe only? Then after the transformation you'd delete that mesh.

s-leger commented 2 years ago

The issue is the scene update timing occuring only once after operator's run. So we add an object while operator run, try to snap, but blender's scene raycast is unable to see it as scene is not up to date.

Michaelknubben commented 2 years ago

Hmm. Is this a limitation of the live tool? With operators within Pie Menu Editor for instance, I'd probably just run a duplicate command, then run the tool in question... is this not possible here?

s-leger commented 2 years ago

you run 2 operators, with a scene update in the between. so 2nd one can see the dup object.

Michaelknubben commented 2 years ago

Right, that's what I'm saying. Is this not possible for CAD transforms, for you to divide up your operator into multiple ones ran one after the other?