Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ContructionPlane to BRepFace

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
saveriop
748 Views, 2 Replies

ContructionPlane to BRepFace

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)
2 REPLIES 2
Message 2 of 3
BrianEkins
in reply to: saveriop

It's a limitation of the API.  I don't know if that was overlooked when the API was initially implemented or if Fusion added the ability to project to a construction plane later.  Either way, you can't do it with the API.  In order to create a BRepFace on a construction plane, one way is to create a sketch, draw a rectangle, and then create a Patch feature using the rectangle.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
Message 3 of 3
saveriop
in reply to: BrianEkins

Thanks Brian,

I extruded the profile and created a geometry by the intersaction plane. That works great, except the additiona body to remove later.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report