- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Might be related to https://forums.autodesk.com/t5/api-and-scripts/addfillet-in-sketchmode-between-a-line-and-arc/m-p/65...
I'm iterating through sketch to find all sketch points where an arc joins another arc or line, and trying to add a fillet between the two.
When it tries to add fillet between two Arcs it fails (I'm using sketchPoint.connectedEntities, but checking to make sure the connection is due to start/end rather than arc center). If I modify the code to only try fillets at points where a sketchArc meets a sketchLine it works.
points_to_fillet = [] for p in sketch.sketchPoints: if p.connectedEntities and p.connectedEntities.count == 2: if p.connectedEntities[0].classType()=="adsk::fusion::SketchArc" or p.connectedEntities[1].classType()=="adsk::fusion::SketchArc": if p.connectedEntities[0].startSketchPoint == p or p.connectedEntities[0].endSketchPoint == p: if p.connectedEntities[1].startSketchPoint == p or p.connectedEntities[1].endSketchPoint == p: points_to_fillet.append(p) for p in points_to_fillet: e1, e2 = p.connectedEntities fillet_point = p.geometry sketch.sketchCurves.sketchArcs.addFillet(e1, fillet_point, e2, fillet_point, radius)
I used a bunch of debugging print statements to get coordinates of p as well as e1 and e2 start/end sketch points and it looks like it should work:
---------- point p ---------- <adsk.fusion.SketchPoint; proxy of <Swig Object of type 'adsk::core::Ptr< adsk::fusion::SketchPoint > *' at 0x1497228a0> > x=1.139926523123076, y=9.246681703470033, z=0.0 ---------- entity e1 ---------- <adsk.fusion.SketchArc; proxy of <Swig Object of type 'adsk::core::Ptr< adsk::fusion::SketchArc > *' at 0x149722ba0> > start: x=8.027898386072238, y=-2.683635524262752, z=0.0 end: x=1.139926523123076, y=9.246681703470033, z=0.0 ---------- entity e2 ---------- <adsk.fusion.SketchArc; proxy of <Swig Object of type 'adsk::core::Ptr< adsk::fusion::SketchArc > *' at 0x149722c60> > start: x=0.31749999999999995, y=7.457127787579157, z=0.0 end: x=1.139926523123076, y=9.246681703470033, z=0.0 ---------- radius ---------- r=0.127
The arcs in question started out as sketchCircles that intersected and were trimmed - the problematic points are the unfilleted ones in the pic below, and they all fail with "RuntimeError: 3 : Failed to create fillet." (a more descriptive error message would be helpful!)
Best regards,
Michael
Solved! Go to Solution.