I am trying to create a script using python to find the centroids of imported geometry in CAD blocks.
When the blocks are read by dynamo, it looks like they are UnknownInstances. How do I get Dynamo to ‘type’ them, so that I can use the API to sort the input array into a list of curves, and then run Curve.PointAtParameter to get the mid points. Averaging these would then allow me to get the centroid of the actual block itself, and that is the objective.
Could someone point me in the right direction please on how to work with UnknownInstances in order to accomplish this please?
The geometry referenced by the script. Each group of squiggles was imported as a block from a CAD file which was partially exploded.