Message 1 of 3

Not applicable
09-29-2020
04:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using Fusion 360 UI, when I wanto to Project To Surface, I can select a construction plane as "faces".
Using the APIs, it gives me an error, because the Sketch.projectToSurface method expects a BRepFace array.
There is a way to get a BRepFace from a construction Plane?
# Get construction planes
planes = keyCap.constructionPlanes
# Create construction plane by angle
planarEntity = keyCap.xYConstructionPlane
planeInput = planes.createInput()
angle = adsk.core.ValueInput.createByString('0.0 deg')
planeInput.setByAngle(l1, angle, planarEntity)
topPlane = planes.add(planeInput)
topPlane.name = 'top face'
# creating the top sketch
topSk = sketches.add(topPlane)
topSk.name = 'Top'
# project base geometry
faceList = []
faceList.append(topPlane)
baseSk = keyCap.sketches[0]
curveList = []
curveList.append(baseSk.sketchCurves.item(4))
curveList.append(baseSk.sketchCurves.item(5))
curveList.append(baseSk.sketchCurves.item(6))
curveList.append(baseSk.sketchCurves.item(7))
topSk.projectToSurface(faceList, curveList, adsk.fusion.SurfaceProjectTypes.AlongVectorSurfaceProjectType, keyCap.zConstructionAxis)
Solved! Go to Solution.