検索 - User list
Full Version: offset polygon
Root » Houdini Indie and Apprentice » offset polygon
phtj
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…
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.
phtj
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…
brianBurke
It sounds like you want to define a volume, work with it, and go back to a surface. Perhaps iso offset is the answer?
phtj
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.
phtj
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.
creatogether
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
zarti
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
Sergey Filin
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)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB