Splitting ideas?

   2603   3   2
User Avatar
Member
7025 posts
Joined: July 2005
Offline
Hi,

I need to take a curve, select a point/points and “split” the curve at the point. In other words, create two points out of one, so that visually the curve remains the same but at the point there are two “ends” to the curve, creating a new curve primitive. I have so far failed to achieve this except using a Carve SOP which isn't really appropriate since finding the position on the curve to do the U coord split would be very painful.

However, on a curve (aka 2 point polygons in other applications) there is only one vertex per point. While I can somewhat understand this, at the same time it makes using Vertex Split (seemingly the “correct” SOP) useless.

Sadly, the intuitive choice (Fuse->Unique) also fails though I can understand why.

Any ideas?

Cheers,

Peter B
User Avatar
Member
330 posts
Joined: July 2007
Offline
hi ,

the first idea that comes into my mind is this :

2 deleteSOPs and 1 merge packed into a subnet .

onto subnet's parm pane put an integer parm .

put there the index of point you want to split the curve at .

delete1 > deletes the points from the selected index + 1 and beyond that .

delete2 > deletes the points from 0 to selected index - 1 .

collect both remainings into the merge SOP .



to cut into more pieces add more deleteSOPs or ..

use a foreachSOP to ‘ definitively ’ have an otl for such cases in future .


hope that helps ,
except the things that cannot be seen , nothing is like it seems .
User Avatar
Member
7025 posts
Joined: July 2005
Offline
Cool, that's certainly one way It seems so basic that I'm surprised I have to build my own tool Not that I mind, though.

Cheers,

Peter B
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
You are right (when are you ever wrong Peter) and this should be at least on the Exchange as an asset. I need to add the viewport tool script…

Easy enough to do if you know curve parameter basics. The trick is to use the Carve SOP feeding it unituv values from a realuv index querried from the point on the curve. The pointdist() expression is designed to do this.

Here's the expression (which is quite redundant as it is always pointing at the same incoming SOP):

unituv(“../Source”, 0, pointdist(“../Source”, opdigits(“.”), “../Source”, 0, 1), 0)

Does this do what you want?

Attachments:
carve_split_curve_on_specified_point.hip (60.7 KB)

There's at least one school like the old school!
  • Quick Links