Offset (problem)

 From:  Michael Gibson
3499.3 In reply to 3499.1 
Hi Steve, so I found out about the difference between v1 and v2 for this case.

The curve you are offsetting is an open curve and has a tiny (0.0006 units) gap between its start and end point here:

In v2 those ends are getting collapsed together to make a closed curve before it is being offset, but that is not happening in v1. That's what produces the difference.

If you collapse those ends together first as I have done in the attached 3DM file, then you can repeat an offset problem in that same distance zone in v1 as well, except it shows up as not producing anything instead of producing that strange result.

I think I know the problem that causes this kind of strange result though, it's the kind of thing that happens when a particular kind of G2 extension method is used to extend curves before intersecting them, where the extension works by making a reflected version of the curve and adding it to the end. When you have a curve that is a long single loop like this, that kind of extension method makes a result that curls around and around on top of itself and that interferes with the intersection calculation that comes next during the offset process.

I can probably solve this case by changing the geometry library to not try to use this G2 reflection extension method and instead just make linear extensions, but I'm not very sure it's a good idea to mess with this right before the v2 launch.

- Michael