Filter/select elements with same geometry

Hello.
I work a lot with generic families sent from colleagues and customers exported from Solidworks to rfa format. The models are usually completely dead and I want to give them life and feed them with IFC data etc.

I have tried to get a script where I can filter out elements in a family with the based on same geometries or masses, it doesnt matter what way im just need to select everything with same geometry. In my case, it’s a staircase. The balusters of the railing have the same gemometry, the treads have the same geometry etc, it feels like it should be possible to sort them. Is there a ready-made script for this? I have tried to develope this by my own but I can’t make it work.

To dive deeper into this i want to make every model with same geometry as a seperate family, but it feels like i need to sort them first. Im open to other ideas and feedback.

It really depends on how the model was built.

  1. If each geometry was imported into it’s own family using the same insertion point, and then an instance of each family was created in the project, then no; the geometry won’t be the same as each vertex will be relative to the global coordinate system, not the part’s internal coordinate.
  2. If common geometry was imported once and then multiple instances of the same family were created… well you’re already done right?
  3. If each geometry was imported at it’s own internal origin (say it’s min point) with a common rotation (so front face in the export is the front face in the import), and then a single instance of each, you might get some common aligned parts.
  4. If you’re wiling to simplify geometry so that points ‘near enough’ are considered the same, you might be able to commonly group some instances, but details are apt to be lost as a result…

In the end you likely can’t do easy comparisons between geometry once it’s imported, as there won’t be any unifying thread to even align piece A to piece B; geometry comparison isn’t something which has really been done well at this point without sacrificing some content which was intentionally returned previously. That sad, when I look at the triangulated shapes you’re working with, some significant simplification is likely in order… But in order to help there has to be a common dataset for comparison.

After working with a few manufacturers I can say that the easiest way to do this is to change how the initial families are built from the initial import and instancing standpoint.

That alot of valueable information, Thanks! I understand the issues. It’s imported from SolidWorks with alot of simplification settings.

I came across this during the weekend:

It’s a similar case, but nothing imported. I could’t get it to work with my model. Could your 1. line be the reason for this?

Yep. There isn’t enough consistency in what I see above for that to work.

I believe this is exported with Tesseleted Geomtry applied. Could settings with less removal of unnecessesary stuff in the export make this more possible? Or doesn’t it make any difference becaouse it doesn’t come from Revit/Autodesk products and it still misses the neccesary data?

Doesn’t matter the source of the initial data. What matters how the assembled design was built in Revit.

A better route is to add some intelligence in the process. Be selective on the initial export (only one geometry export per unique part; one name for each part; one coordinate system for each instance) family creation (one family from said part geometry, using the name) and then family instance creation (one new instance per coordinate system) then this is easier and faster and better in the long run.

That Likely sounds like a lot. However such an export, import, and assembly automation can likely be built with less effort than what you’re chasing. This kind of geometric similarity analysis is a task which hasn’t been efficiently solved at scale despite 30-40 years of efforts from multiple research institutes and companies. Yes you can get part way by comparing stuff like the number of topological elements and properties thereof, but solid brep comparison isn’t any more functional than the node Geometry.IsAlmostEqualTo. While machine learning algorithms can help (there was a good paper on this in 2021), the time to build and implement these is not as functional as the better exporter (said algorithm takes time to run; the modified exporter is just done correctly and won’t mistake two identical solids with differing material specifications the way the AI would).

Rather than trying to fox a broken process, spend the effort to fix the process.

Yepp i understand. Thanks for your advice!