Python use Element.Solids and Geometry.Intersect

python
#1

I am trying to use Geometry.Intersect in my python code.
ending in an error:
type error: expected Geometry, got Solid
my code ran like:
result = Geometry.Intersect(ASolid,BSolid)

to keep things easy i was thinking to use
Element.Solids

actually i am failing to include Element.Solids in my code.
anyone solved that?

my code is like:
Elements.Element.Solids(element)

image

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

Awall = UnwrapElement(IN[0])
Bwall = UnwrapElement(IN[1])

Asolid = Elements.Element.Solids(Awall)
Bsolid = Elements.Element.Solids(Bwall)

result = Geometry.Intersect(Asolid, Bsolid)

OUT = result

0 Likes

#2

Please post your dyn and/or formatted code so we can review. Hard to fix what we can’t see.

0 Likes

#3

@JacobSmall ike that?

0 Likes

#4

Copy all the text out of your python code, and paste it into a new post, using the </> button, which is next to the upload button.

0 Likes

#5

not too much a difference :wink:

0 Likes