Offset Problem

Hi.

I have a group of closed curves and I´m trying to offset them, but some of them goes in one direction and the rest in the other direction. So, I tried to flip them all according to to the direction of the first of the list, but no. All of them was already in the same direction. I thought maybe the plane was lacking, I put a XY Plane but again, it did not work.
Any thoughts?

Offset problem.gh (13.3 KB)

Your objects are too far away from the origin.

They are extremely far from the origin (WHY?). If you move them closer, they all offset in the same direction, though they break quickly because they are small compared to the offset value.


Offset problem_2020Oct5a.gh (12.6 KB)

Yes, they are. That is because they are referenced with especific coordinates.
But that shouldn´t be the problem …or do you think it is?

Obviously it is a problem, a well known one. Waste of time!

Well, yes. They are that far because I need them there. That is because their vertices are referenced at specific coordinates (WGS84) which use that gigantic numbers.
Since I cannot move them closer, is there anything else I can do?

You have no choice, move them closer. Change your point of reference. Deal with it.

ok… I didn´t know
But if it is a possibility that some day someone will need such coordinates to feed the system, it is a bug that should be fixed.

Thanks anyway

A well known bug.


Offset problem_2020Oct5b.gh (23.9 KB)

Maybe if you move and/or scale them to near enough the origin then offset, then reverse the process. Looks like it worked…

Offset problem solved by Jay.gh (12.5 KB)

That’s a fine idea but I prefer Move to Scale, using the same vector with “-x” expression:


Offset problem_2020Oct5c.gh (14.4 KB)

Genuinely curious the benefit of move over scale. First thought was move, but was easier and more universal to just scale.

Less chance for roundoff errors, I would think, especially at this vast scale.

This is interesting. After reading all the comments, I moved the curves a bit closer to each other so they fit nicer in my viewport. Next I copied everything close to the XY zero point as suggested by Joseph. All curves are clockwise. The problem seems to occur just on curves which happen to have their area centroid outside of the curve.

The following screenshot shows a second solution that works for both types of curves. Curves where the area centroid is inside and curves where the centroid is outside. I’m dealing a lot with offset curves on arbitrarily oriented surfaces. Some with their normals facing down, some up. I never rely on an offset component without inside / outside check or surface normal - Z vector dot product…

Offset problem.gh (32.2 KB)

Objects not internalized.

I was falling asleep :man_shrugging:t2:

Internalized now

Thank you Martin!
It would be an excellent option if the corners of the offset curve were not rounded. Why do they have to be rounded!!!

Thanks again

:wink:

You shouldn’t really ever work so far from the origin in most any software. The correct way is to work near 0,0,0 origin and consider that origin as some lat / long location. You can have it referenced into the real location in some combination model based on reference to the origin to the real location point.

Hi guys,

I found out this being a nice and fast solution to offset problem - works 95% of the time (and works on in this case as well):

Cheers!

3 Likes

I didn’t zoom in that much unfortunately