Right now, I have a rough idea for how equivalencing could work, in a world where there's not really any geometry associated, or any pre-existing routines available.
I think that it should be such that you select two mesh bodies, then click equivalence.
I'm still really worried that this is antithetical to how stuff in FreeCAD-FEM is intended to work though.
Hopefully we can find a way to make this fit the paradigms a bit better later.
But anyways, I think that what should be done, @mesheb82 is, once two mesh bodies are equivalenced, it results in another, brand new assembly of the two, stored into a single mesh body. That way it wouldn't be a destructive workflow, at the cost of making more elements and nodes than it might need to.
One barrier to making this right now is I'm lacking a way to get the "highest node ID and element ID in the current model." Well, "lacking" is a strong word, I've got some nested loops that count all the mesh objects, but it's not complete and I'm 100% sure there's another piece of code I'm not finding that does the same thing.
I've spend an hour or two today just browsing through the upstream source:
Code: Select all
https://github.com/FreeCAD/FreeCAD/tree/master/src/Mod/Fem
I think I'll just keep looking around here today.
No major code to paste yet.