I’d like to create a primitive (box 90% of the time) and somehow identify one of the faces as the important one. This will be the ‘machining face’ to cut on a CNC router. (Think melamine in a kitchen cabinet)
The shape may get modified, resized, have cutouts through it, etc. Ultimately I want to do something like a ‘DupFaceBorder’ of that face only, including the border, and ideally pick up other geometry that is grouped on that face, keeping their layers when the new 2D geometry is created.
Of course in a real job there will be 50-100 panels, thus the need to script it.
I gave some fast check by using grasshopper, if you set a specific surface as the first, it keeps being the first after fillet/chamfer (on vertical edges), boolean difference, moving face, and obviously global transformations like scale/mirror.
But it will give unpredictable results if you use commands like boolean intersections or if you fillet/chamfer an edge that lies on your important face… more tests needed.
(To “set” a specific surface as first you can explode the solid, unselect all, and join the surfaces by clicking your “important” face as the first one.) Not always reliable.
Also, another idea would be to rebuild only the “important” surface to an uncommon degree (like 6); whatever transformation/edit will occur, at the end the only surface with degree=6 will be the important one.
But moving a face of the solid also resets the degree of the important face to 1 … Not working.
Make a small marker. A particular small blind hole (that you will move out of the way in case of need with move hole command) that is easy detectable by a script. At the end of the edits, the face “hosting” the marker will be the “important” one.
Edit: and maybe you want to mark the opposite face to avoid hassle into removing the hole from the important… like irl carpenters using pencil on hidden surfaces of the furniture Possible solution.
@maje90 thank you! and apologies for the couple of vague items.
“Box 90% of the time… Shape may be modified…”
I|t will ALWAYS be a panel of consistent thickness, a kitchen door or carcass panel. There are some times it will have a cutout or not be rectangular as per the picture example. A door might have a routered section out of it. (Shaker door)
There may be some fillets on edges, that that might be an issue as you point out, and in fact it highlights another flaw in my plan as per attached. The face size would then not be representative of the panel size. So I think I’m going to need to use the BACK face for cutting, and the geometry on the front for additional drilling / routing.
The smaller marker is interesting, I will look into that idea a bit more.