offset polygon

   12398   8   2
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
I am trying to create a negative offset of a closed polygon that does not self intersect . When I do get an intersection, I want to delete those bits.

See attached hip…

Any suggestions… I have made a start, but it may be the wrong start…

Attachments:
offset.hipnc (53.1 KB)

Patrick
User Avatar
スタッフ
2540 posts
Joined: 7月 2005
Offline
Extrude SOP does this for you. Not to be confused with Poly Extrude.

The options are in the Fuse Points parameter. It defaults to “Clamp Minimal Set” where each point as it self-intersects will stop-stick.

There are other options as well for you to try out but I believe the default “Clamp Minimal Set” is what you want.

The Extrude SOP was originally designed to extrude fonts but it comes in real handy for offsetting curves like this.

Attachments:
offset_940.jw.hipnc (58.9 KB)

There's at least one school like the old school!
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
Thanks jeff. I tried the Extrude SOP, but I could not really get it to do the right thing.

What I need is an accurate offset, so that the offset edge either 1) always remains parallel to the existing edge, or 2) disappears all together when the length becomes 0, or when it ‘flips over’.

It seems that the Extrude SOP sort of does something like this, but not quite. For example, as the offset becomes very large, the shape in the centre should disappear completely…
Patrick
User Avatar
Member
192 posts
Joined: 11月 2008
Offline
It sounds like you want to define a volume, work with it, and go back to a surface. Perhaps iso offset is the answer?
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
thanks brian

That kind of works - see attached file. Is that what you meant. It seems a bit over the top - to have to create the whole volume. Also, I guess I should really script the height of the volume to make sure that the offset never gets affected by the height.

The other problem is that it does add some extra points, and you end up with rounded corners. I guess that there is no way to avoid that if you are using volumes.

Attachments:
test1.hipnc (43.2 KB)

Patrick
User Avatar
Member
224 posts
Joined: 6月 2009
Offline
Just another update on the offset issue.

For negative offsets (i.e. a closed polygon getting smaller), I think I have found a reasonable way of doing it. See attached file.

For positive offsets, it still does not always work well. It is a little harder, since you can get polygons with holes in them, which can cause lots of problems. I am not sure how to tackle this, so if anyone has any ideas, please let me know.

Attachments:
offset_fixed.hipnc (81.6 KB)

Patrick
User Avatar
Member
1 posts
Joined: 4月 2011
Offline
In case other people stumble upon this thread: I created a digital asset called “curveOffset” to do exactly that: it takes an input curve (polyhull or NURBS) and offsets it, trimming all cusps (meaning eliminating any intersections).



Details and download here:
http://www.creatogether.com/hou-curveoffset [creatogether.com]

Hope that helps!
Dan

Attachments:
jdCurveOffset.package.zip (47.5 KB)

User Avatar
Member
330 posts
Joined: 7月 2007
Offline
hi ,

i wd suggest to try the ‘sweep-style’ ..

in my attached file i have collapsed all the ‘after-sweep-procedure’ inside the “subnet1” node .
a bit unpredictable ( depends on path ) .. but it is fast .


actually i was able to ‘correctly’ generate the inside shapes only .
( and an attempt to get the offset through a Cookie SOP )

imo , sweep is a good path to follow ..


.cheers

Attachments:
offset_z.hipnc (86.5 KB)
polygonOffset_01.png (9.7 KB)

except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
17 posts
Joined: 2月 2019
Offline
old_school
Extrude SOP does this for you. Not to be confused with Poly Extrude.

The options are in the Fuse Points parameter. It defaults to "Clamp Minimal Set" where each point as it self-intersects will stop-stick.

There are other options as well for you to try out but I believe the default "Clamp Minimal Set" is what you want.

The Extrude SOP was originally designed to extrude fonts but it comes in real handy for offsetting curves like this.

Great advice and example! Thanks a lot! I would just add for dummies like me, that you could filter black polys by normal direction for example)
  • Quick Links