Elements.IntersectsSolid not working properly

Hi guys,

I have made a model that consists of different masses and the idea is to link the mass into my model and using the Elements.IntersectsSolid node I would be able to register, which objects are in the different masses. However when I run my script I get some highlighted masses in orange, which are shifted from the shared coordinates that the two models share. So only half of my model is registered by the node. In addition to this I get a warning: Asked to convert non-convertible types.

I dont understand why this happens. Any suggestions?

Can you share your graph? Likely it means you are trying to make geometry from something that can’t be made into geometry.

Note that scope boxes or a bounding box containment test may be faster than a geometry test.

So I have a long graph but where the problem occurs is in the node Element.IntersectsSolids.

The input “Solids” are my masses (highlighted in white in the picture below) and “elements” are all the elements in the active view. In the picture below the highlighted blue masses are the ones the Dynamo script registers. As you can see these are shifted from the original placement of my masses.

How would I go about using Bounding box containment test or scope box test?

Hi @arbazhamayun,

@JacobSmall is on the right track:

  1. The first problem is the use of the Element.Geometry node; it is designed to return a heterogeneous list of geometry object types (curves, surfaces, solids, etc - it could be any or all). However, Element.IntersectsSolid requires a homogeneous list of solids. Step 1 then will be to swap out the Element.Geometry node with the Elment.Solids node

  2. The next problem is related to the above. Using All Elements in Active View will do exactly that, which means it could be collecting anything. If you are in a plan view for example, you’ll be collecting annotation objects which are not valid element types for intersection tests. You therefore need to take a more disciplined approach to your workflow and use nodes which collect the elements you want to test for intersection. An effective and simple alternative are the OOTB All Elements of Type or All Elements of Category nodes.

See if you still get exceptions after making the above changes.