I am using DirectShape faces as reference planes for placing face based families. This process essentially allows families to be oriented (rotated in all three axis) which is very useful. I have decided to start refactoring key parts of my working scripts onto python nodes, in the hope that they will be more compact and robust, and reusable. Maybe even faster?
This is where the problems arise…
I have two functions I wish to perform:
I have attached demo scripts for both using nodes and designscript.
The screengrab below shows my approach to step two, both in nodes, and python. The python function works fine with less than about 100 input directshapes. when i increase the number, dynamo either hangs or revit crashes. target is about three thousand planes. I have tried calling Dispose() on non-returned geometry, but that doesn’t seem to affect the performance.
Have i missed something important? is my function inefficient?
In order to recreate the issue you will need to run step 1 Directshape.ByPlane.dyn first to create the directshapes (note: they are small!)
Thanks in advance for any advice