Jump to content

Cutting polygons across specific lines


Recommended Posts

I have some connected polygons, and I have some curves that cut across the polygons. I want to procedurally split the polygons along those curves. For some reason, the polysplit SOP doesn't necessarily work all of the time; there is no tolerance value that does what I want with every cut. That's the basic premise of my problem. More specifically:

  • The polygons all share at least one edge with one another.
  • The polygons' normals are all roughly perpendicular to the y axis; none are within 45 degrees of up or down.
  • The polygons' normals are all roughly parallel to one another; no two faces are more than 90 degrees apart (enforced by the types of models that will be input), and no adjacent faces are more than 30 degrees apart (enforced by the procedure).
  • Some groups have only one polygon.
  • Some polygons are concave, and some have holes.
  • The curves are all made of exactly two points.
  • The points on the curves all lie exactly along the unshared edges of the polygons (the points were snapped to the edges).
  • At least one of the two points is guaranteed to lie exactly on a preexisting point in the polygons; the other may or may not.
  • The curves do not overlap each other.
  • The curves are all roughly horizontal; in cases where the curve crosses a shared edge between polygons, I would like the point that it cuts across to be pretty much horizontally aligned with the curve.
  • The interiors of the curves do not cross any unshared edges of the polygons; tracing a direct line across the faces from the first point of the curve to the second, you are guaranteed not to leave the polygons.

I've attached a file where I create the curves in the first place, with the test geo I'm using, just in case you want an easy way to build a bunch of curves that fit all of those parameters.

Cutter_help.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...