Runtime Error 5: Path is tangent to profile When Extruding rotated Component

Runtime Error 5: Path is tangent to profile When Extruding rotated Component

Anonymous
Not applicable
4,456 Views
2 Replies
Message 1 of 3

Runtime Error 5: Path is tangent to profile When Extruding rotated Component

Anonymous
Not applicable

I'm trying to extrude from a sketch that belongs to a component that has a non-standard origin

The origin has the y and z axes switched and is translated <1,1,1>. This is shown in the figure below.

 

I'm using this code to create the extrusion and get the error posted below:

boltComp = self.RWO
        boltSketches = boltComp.sketches
#        reportMessageBox("building bolt", ("random"))
        xyPlane = boltComp.xYConstructionPlane
        planes = boltComp.constructionPlanes
        planeInput = planes.createInput()
        #offset plane example
        offsetValue = adsk.core.ValueInput.createByReal(0);
        planeInput.setByOffset(xyPlane, offsetValue)
        plane = planes.add(planeInput)
        sketch = boltSketches.add(plane)    
        center = boltComp.originConstructionPoint.geometry
        vertices = []
        for i in range(0, 6):
            vertex = adsk.core.Point3D.create(center.x + (self.hDiameter/2) * math.cos(math.pi * i / 3), center.y + (self.hDiameter/2) * math.sin(math.pi * i / 3),0)
            vertices.append(vertex)
        for i in range(0, 6):
            sketch.sketchCurves.sketchLines.addByTwoPoints(vertices[(i+1) %6], vertices[i])
        extrudes = boltComp.features.extrudeFeatures
        prof = sketch.profiles[0]
        extInput = extrudes.createInput(prof, adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
        distance = adsk.core.ValueInput.createByReal(self.hHeight)
        extInput.setDistanceExtent(True, distance)
        headExt = extrudes.add(extInput)

cpature.PNGerror.PNG

0 Likes
Accepted solutions (2)
4,457 Views
2 Replies
Replies (2)
Message 2 of 3

ekinsb
Alumni
Alumni
Accepted solution

I'm able to reproduce the problem you've reported.  It's a bug in the API.  I've reported it so we can work on fixing it.  It's specific to the orientation of your occurrence.  When I first tested it it was working ok but I had an arbitrary orienation for my occurrence and when I repositioned to the orientation you described the problem occurred.  I actually found another problem too where the construction plane being created is not oriented correctly.  We'll get that fixed too.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
0 Likes
Message 3 of 3

Anonymous
Not applicable
Accepted solution

A temporary solution that worked for me was to only rotate the component after fully creating the design. This problem was specific to the orientation but the extrusion was always angled relative to the document space rather than the component.

0 Likes