Hi.
I’m using Dynamo for Civil 3d and Im having some trouble.
I am trying to use the Geometry.DoesIntersect, Geometry.Intersect, Geometry.Split nodes.
I am calling these nodes with solids as input.
I am getting the same error message with each of these nodes: “Warning: Geometry.DoesIntersect expects arguments type(s) (Geometry,Geometry) but was called with (Autodesk.DesignScript,Geometry,Solid[],Autodesk.AutoCAD.DynamoNodes.Solid[])”
Which I find strange because in Dynamo Revit I could always call these nodes with solids.
Hmmm… looks like this is an namespace issue, with Dynamo expecting a Dynamo solid but receiving an AutCAD solid (hence the AutoCAD showing up in the object type). I had to uninstall yesterday due to a lingering issue from my beta testing time, but be sure you’re pulling the geometry (can’t recall where, but I think it’s under AutoCAD, Object) from the AutoCAD object.
Here’s a comparison of calling Geometry.DoesIntersect with two different inputs.
The first one is working, the second one is not.
I really would like to get the second method to work,
because eventually I want to collect solids by their layer names, not selecting manually.
So how do I pull the solid geometry from Objects on Layer node as a Dynamo solid?
As you can see I tried an additional Object.Geometry, but that doesn’t lead to anything.
Thanks for your help, @angelohbwang
I just retried this myself, and I also could not reproduce the previous errors
The key difference is that Object.Geometry after All Objects on Layer is not failing this time. In the screenshot that I posted in post 3 you can see that it was returning null.
Strange! But hey, I can continue.
When calling Object.Geometry with empty lists, Object.Geometry returns an error message:
“…expects DynamoNodes.Object, was called with DynamoNodes.Solid[]” or
“…expects DynamoNodes.Object, was called with DynamoNodes.Object[]”
When erasing the empty lists, this error disappears.
The empty list or null as first element bug is a problem in DynamoCore 2.1 , - you can read about it in the release notes here:
it was fixed in 2.2 and then further improved in 2.3, note there are still some cases where this can cause issues but they are harder to hit, and we have them tracked for fixing.
Simplest workaround is to use List.Clean to remove nulls and empty lists until using a newer core.