Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Mirror and offset bug?

h.nm
Explorer

Mirror and offset bug?

h.nm
Explorer
Explorer

Hi,

 

I ran into a weird behaviour trying to offset a closed loop. The profile is symmetric around the two sketch axis and consists of lines, arcs and splines in one quarter of the coordinate system which then get mirrored around the two axis. If I try to offset the profile the usual way it always offsets to the outside never to the inside no matter what direction point I choose.

 

profileOutline = sketchOutline.profiles.item(0)   
for loop in profileOutline.profileLoops:
    if loop.isOuter:
       loopOutline = loop
       break
            
curvesProfile=adsk.core.ObjectCollection.create()
for curve in loopOutline.profileCurves:        
   curvesProfile.add(curve.sketchEntity)

#Origin is in the profile, other points give the same result        
dirPoint = adsk.core.Point3D.create(0,0,0)
sketchOutline.offset(curvesProfile,dirPoint,2.0)

I guess it has something to do with an internal Fusion bug combining offset and mirroring. Through the UI I cannot chain select the hole profile, only the part which I created by hand but not the mirrors thereof.

 

I tried a workaround by offsetting each curve segment by itself. The offset is in the right direction but the offsetted curves are not joined proper. Either they intersect or there are small open segments so I dont get a closed loop. Is there any fix planned for this problem or is there a known workaround so one gets a closed curve from the offset?

 

Cheers,

Hannes

0 Likes
Reply
759 Views
4 Replies
Replies (4)

ekinsb
Alumni
Alumni

Can you post the code that creates the sketch or at least a design that has a sketch that demonstrates the problem?  Thanks.


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

h.nm
Explorer
Explorer

I found the (maybe?) bug. Assume you have an open loop and the mirror line is at the endpoints of that loop, like in the following picture.

Bildschirmfoto 2017-11-19 um 11.18.54.png

If you mirror such a profile you get a closed profile but Fusion also seems mirror the endpoints and does not merge them. You end up with two points at the mirror line rather than just one.

Bildschirmfoto 2017-11-19 um 11.19.19.png(how it is supposed to be)

Bildschirmfoto 2017-11-19 um 11.19.28.png(at the endpoints)

 

 This seems to break the offset chain. You can't select the whole profile to offset.

 

Bildschirmfoto 2017-11-19 um 11.28.13.png

 

A workaround is to drag one of the problematic points a little bit away and right back to where it was. This merges the two points into one and you now can select the whole profile to offset.

If this behavior is intended could someone explain it? If not, this should be fixed in the mirror algorhitm I guess.

 

Cheers,
Hannes

0 Likes

ekinsb
Alumni
Alumni

I'm not surprised by the behavior you're describing. Profiles in Fusion are based on the positions of geometry and do not rely on constraints at all.  For example, I could draw four lines to create a rectangular shape where each line is completely independent of the others except that their end points happen to be at the same coordinate. A nice rectangular profile will be calculated and available to use as input for features, but the lines are completely independent of each other and an operation, like offset, would only use the single selected line.

 

Below is another example to better illustrate this.  I've drawn four lines that having nothing to do with each other except that they happen to overlap.  Even though the end points are completely different, Fusion 360 is still able to find a profile and allow you to use it in your design.  If you wanted to offset that profile shape, you can't because it doesn't even exist as sketch geometry but is just computed as a result of the profile computation.

 

 LinesIntersect.png

 

In your case, the three lines are being mirrored and because the end points of the lines happen to connect geometrically a profile can be calculated. Here's a variation of your example that better helps to illustrate this.  I have the three connected lines and the mirror line.  In this case, the mirrored lines end up overlapping so the end points don't connect.  However, the desired profile is still found, but it's more obvious in this case why offsetting the entire shape wouldn't be expected to work.

LineMirror.png

 

 

 


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

peplinski.john
Contributor
Contributor

Ekinsb's explanation makes sense, but how do you ultimately make an entity chain with its mirror? 

 

I've had luck with a workaround if the lines or arcs being mirrored are not collinear or tangential to their mirrored entities by using the extend and trim tools.  However,  if the entities are perpendicular to the mirror entity then the extend and trim trick doesn't work the same way.

 

 

 

0 Likes