zalo / CascadeStudio

A Full Live-Scripted CAD Kernel in the Browser
https://zalo.github.io/CascadeStudio/
MIT License
1.01k stars 126 forks source link

Random thoughts about introspection #23

Closed sgall17a closed 3 years ago

sgall17a commented 3 years ago

On Hover in the GUI you get an index to a line or a face. Presumably this index refers to something that has gone through many transformations since starting as a primitive shape and thus is hard to relate to the original drawing.

Also I presume that even if we noted the index from the GUI and could do some introspection (on say face[8] for instance) the index is likely to change after even simple modifications.

It seems to me that if you can do fillet and chamfer programatically then should you know a fair bit about position of elements after various transformations.

Would it be possible do some introspection with this mechanism.

For instance say we had a box and knew the absolute coordinates of some point on the box like a corner. We could define this point then at the point of visualisation echo its new absolute position. A point can move or disappear (like in difference operation). If we knew the point survived transformations because it was still visible after being transformed then knowing its absolute position through code would be of great benefit.

zalo commented 3 years ago

I'm mirroring this with #14 since these are both tackling very similar ideas, and I agree are a severe weakness within the application right now.