AntoineSfx Posted April 25, 2019 Share Posted April 25, 2019 Hi there How may I achieve this: let's say I have a rectangle. I want to add a point at 10% of its length, then another at 20% of its length. Later I'd like to have some knowledge of whether a segment is between two points that were added to the original geo, for example to make an opening for a door. I didn't have much luck with carve because the First U parameter is expressed in terms of a u parameter in NURBS, not a distance on the curve; also two consecutive carve SOP are not commutative, Quote Link to comment Share on other sites More sharing options...
julian johnson Posted April 26, 2019 Share Posted April 26, 2019 This will split at the length along the curve you specify with a given doorway width. I think you could easily refactor to use percentage of length... splitbylength.hip 1 1 Quote Link to comment Share on other sites More sharing options...
petz Posted April 26, 2019 Share Posted April 26, 2019 here's another one: split_curve.hipnc 2 Quote Link to comment Share on other sites More sharing options...
ThomasPara Posted April 27, 2019 Share Posted April 27, 2019 Wanted to try a pure vex solution. curvegap_01.hiplc 3 Quote Link to comment Share on other sites More sharing options...
AntoineSfx Posted April 27, 2019 Author Share Posted April 27, 2019 Also, from a tool design perspective, how do you think such an operator should work so that it can be applied to its output in a commutative way, and give the same result ? For example init geo0 = a rectangle geo1 = gap(geo0, dist0, width0) [ door 0 ] geo2 = gap(geo1, dist1, width1) [ door 1 ] so that the distances are always expressed relatively to the initial geometry. The idea would be to be able to switch dist0 with dist1 and width0 with width1 and still have the same geo I understand this information is lost doing that way, so maybe something like just splitting / marking portions of the curve for deletion later ? Quote Link to comment Share on other sites More sharing options...
ThomasPara Posted April 27, 2019 Share Posted April 27, 2019 As long as your defining your gaps by a distance it wouldnt be a problem to just reapply the same operator (in this case with my solution you would have to create a more solid way to figure out the "val" variable, atm i guess it will be wonky with uneven point distribution). If you want to use a percent approach, the easiest way is to store the original length of the first primitive and pass it on. I would make it so that you pass on two arrays to the operator with position and width for all your doors (so this would be another asset you apply first). And then your doorway asset needs to be able to make several new prims based on the input. Anyway, this is by far a final tool, its just a start. Quote Link to comment Share on other sites More sharing options...
petz Posted April 27, 2019 Share Posted April 27, 2019 8 hours ago, AntoineSfx said: Also, from a tool design perspective, how do you think such an operator should work so that it can be applied to its output in a commutative way, and give the same result ? For example init geo0 = a rectangle geo1 = gap(geo0, dist0, width0) [ door 0 ] geo2 = gap(geo1, dist1, width1) [ door 1 ] so that the distances are always expressed relatively to the initial geometry. The idea would be to be able to switch dist0 with dist1 and width0 with width1 and still have the same geo I understand this information is lost doing that way, so maybe something like just splitting / marking portions of the curve for deletion later ? it's easy, just reference the original geo. split_curve1.hipnc hth. petz 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.