Hi @ebunn3 .
I'm not sure I understand your purpose. Why don't you create your own function to handle this?
# Fusion360API Python script
import traceback
import adsk.fusion
import adsk.core
def run(context):
ui: adsk.core.UserInterface = None
try:
app: adsk.core.Application = adsk.core.Application.get()
ui = app.userInterface
des: adsk.fusion.Design = app.activeProduct
root: adsk.fusion.Component = des.rootComponent
hits = findBReps_UsingRay(
root,
adsk.core.Point3D.create(0,0,0),
adsk.core.Vector3D.create(0,0,1),
)
for idx, ent in enumerate(hits):
print(f'{idx} - {ent.objectType}')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def findBReps_UsingRay(
comp: adsk.fusion.Component,
originPoint: adsk.core.Point3D,
rayDirection: adsk.core.Vector3D,
proximityTolerance: float = -1.0,
visibleEntitiesOnly: bool = True,
hitPoints: adsk.core.ObjectCollection = None
) -> adsk.core.ObjectCollection:
brepEntTypes = [
adsk.fusion.BRepEntityTypes.BRepFaceEntityType,
adsk.fusion.BRepEntityTypes.BRepEdgeEntityType,
adsk.fusion.BRepEntityTypes.BRepVertexEntityType,
]
ents: adsk.core.ObjectCollection = adsk.core.ObjectCollection.create()
pnts: adsk.core.ObjectCollection = adsk.core.ObjectCollection.create()
hits: adsk.core.ObjectCollection = adsk.core.ObjectCollection.create()
for entType in brepEntTypes:
objs = comp.findBRepUsingRay(
originPoint,
rayDirection,
entType,
proximityTolerance,
visibleEntitiesOnly,
hits
)
if objs.count < 1:
continue
for o, h in zip(objs, hits):
ents.add(o)
pnts.add(h)
hitPoints = hits
return ents