|
|
|
|
|
by alterom
59 days ago
|
|
Well, user picking a couple of surfaces is literally an operation on a boundary representation, so of course it's a PITA with fields :) I think the future is CAD is combined fields and breps. They're literally dual, one is covariant, the other contravariant (breps facilitate pushforwards, fields facilitate pullbacks). One without the other is necessarily going to be limited in some way. |
|
The distance field tells you the distance to the nearest surface at any point. You can have a "surface id field" tell you the id of the nearest surface to any point, and then when you raymarch to find the intersection of a line with a surface, you can read out the ID from the ID field after finding the intersection point. (Of course the ID field is also implemented as a function mapping points to surfaces).
So when the mouse is hovered or clicked in the 3d view you can easily find the ID of the surface under the pointer, and you can draw that surface in a different colour to show it is selected. No boundary representation needed.
The hard part is, given 2 surface ids, how do you add a fillet between them in the general case?
Another idea I had was to set the fillet radius on every min/max node based on the derived surface id's from the child nodes, but I couldn't find a good way to do this without making the field discontinuous.
I have more notes in this blog post: https://incoherency.co.uk/blog/stories/frep-cad-building-blo...
If you have good ideas for this I'd love to hear them and resume working on Isoform.