Hello,
I have a list of solids (Rooms converted to solid elements) and I have a list of another solids (ceilings converted to solids). Now I want to perform clash detection in Dynamo and get the output of intersecting elements. Now I am getting an error in my python code. The error says “expected Solid, got Solid” and this error doesn’t make sense to me.
ceilings=IN[0] # Solids
rooms=IN[1] # Solids
ceilings_new=[]
rooms_new=[]
for i in rooms:
for j in ceilings:
intersection1=BooleanOperationsUtils.ExecuteBooleanOperation(i,j,BooleanOperationsType.Intersect)
ceilings_new.append(j)
rooms_new.append(i)
OUT= rooms_new, ceilings_new
Looks like you’re calling the Revit API (BooleanOperationsUtils.ExecuteBooleanOperation
) and passing a Dynamo solid. While they are both ‘solids’, they speak a different language and as such are not interchangeable.
To resolve you can ‘flip’ to passing the ceilings and room elements themselves, and pull the solids from them in Python. Or you can load up the Dynamo geometry library and use the Geometry.DoesIntersect method to do the testing.
3 Likes
Hell Jacob,
Thank you for the response. So basically what you are saying is I should convert them to solids in the python script and then use it for the intersection?
Best Regards
Saqib Qamar
Yeah if you send the elements to the python script or use the Dynamo method for intersection tests (Geometry.Intersect) I believe it will work out.