Accessing a Path Programatically for creation of plane along path

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
What I have currently done:
I have created an intersection between a Brep body and the XY plane (with the IntersectwithSketchPlane method), producing curves made up of fixed spline segments (picture attached).
What I want to do:
I want to construct planes tangent to each of these three intersections. I can do this in the UI; when I click "construct plane along path", the entire path is highlighted (pic attached), not just the individual fixed spline segments. How can I access this entire length programatically? Currently, all the individual lengths are saved as SketchFixedSpline Objects in a SketchEntity.
What I need:
I want to access all the fixed splines that are connected together as one spline, so that I can use it as a path in my next step. There hopefully should be an easier way than brute force reconstructing the spline using the StartPoint and EndPoint attributes of the SketchFixedSpline object. I have also attached my code.
#Author- #Description- import adsk.core, adsk.fusion, adsk.cam, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = app.activeProduct ui.messageBox("Select Intersecting Body") selectedbody = ui.selectEntity("Select Intersecting Body", "Bodies") rootComp = design.rootComponent sketches = rootComp.sketches xZPlane = rootComp.xZConstructionPlane sketch1 = sketches.add(xZPlane) entities = [] entities.append(selectedbody.entity) print(type(entities)) intersection = sketch1.intersectWithSketchPlane(entities)