Determine whether 2 family instances of the same type have identical geometry.

Determine whether 2 family instances of the same type have identical geometry.

MattKincaid
Advocate Advocate
728 Views
1 Reply
Message 1 of 2

Determine whether 2 family instances of the same type have identical geometry.

MattKincaid
Advocate
Advocate

Is there anything built into the API that does this?

 

If not, my best idea is to check whether all the numerical instance parameters have the same value.  Any reason that wouldn't work?

 

Or, maybe, get the solid geometry of both family instances, and compare the properties of the solids.  That is, must have the same boundingbox, same number of faces and edges, same surface area and volume.  Although I worry getting the surface area and volume might be too slow (I need to do this for a bunch of family instances).

 

Any other ideas?  Thanks!

0 Likes
729 Views
1 Reply
Reply (1)
Message 2 of 2

RPTHOMAS108
Mentor
Mentor

Yes the only way two instances of the same type can have different geometry is by deviations in the instance parameters that drive that geometry and things such as flip states.

 

Not just the numerical parameters but also the ones with ElementID storage type, then again there may be some model text driven by text parameters. Either way it is easier to compare all the instance parameter values than the geometry.

 

However what about cuts and joins these are not determined by instance parameters.

 

If it is about comparing geometry then you set up a process of elimination checking the quickest things to check first then moving on to other comparisons:

Numbers of solids, rounded volumes and GraphicStyleIds of such

Numbers of and types of faces

Face edges

Coords of face edges

For the most part you'll probably find you don't get as far down the list as comparing coords

 

0 Likes