ContructionPlane to BRepFace

ContructionPlane to BRepFace

Anonymous
Not applicable
1,083 Views
2 Replies
Message 1 of 3

ContructionPlane to BRepFace

Anonymous
Not applicable

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)
0 Likes
Accepted solutions (1)
1,084 Views
2 Replies
Replies (2)
Message 2 of 3

BrianEkins
Mentor
Mentor
Accepted solution

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
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks Brian,

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

0 Likes