Carve by arclength instead of parametric 0..1 ?

   4124   9   2
User Avatar
Member
11 posts
Joined: Aug. 2017
Offline
Is there a way to use Carve SOP and provide the first U/Second U in meters rather than a U parameter (0..1) ?

I have real world measurements curves (adaptively sampled, so more points where more curvature) and I need to “shave off” a specific length.
User Avatar
Member
85 posts
Joined: May 2011
Offline
http://www.sidefx.com/docs/houdini/expressions/arclen.html [www.sidefx.com]
— dedeks 3000 —
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
@geometryNerd
If I'm right: no

But you can get the length as dedeks3000 pointed out and then
edit parameter interface…
add some math, to get your “meter” slider

Attachments:
arclen.hip (64.0 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
555 posts
Joined: Feb. 2017
Offline
easy…

(you could just skip the CTRLS and just use the value ladder in the carve…but it's more userfriendly)

(don't know the exact meaning of ‘shave off’…ie. from which end…but I'm sure you can adapt/flip the logic to suit your needs)
Edited by vusta - Jan. 14, 2018 21:06:17

Attachments:
vu_CarveByDistance.hipnc (62.5 KB)

User Avatar
Member
471 posts
Joined: July 2005
Offline
Hi,

just in addition, you can also create a carve tool with the attribute wrangle. After you've calculated the length for a curve (arclen not working in wrangle for me ?!), you can use the length to build your own curve by defining a curve function by another wrangle. Resampling is useful before (it is doing the main work), to get an uniform sampled curve.

Attachments:
CLen.hipnc (82.2 KB)

User Avatar
Member
85 posts
Joined: May 2011
Offline
hye Aizatulin,

Did you try this function in your code ?

http://www.sidefx.com/docs/houdini/vex/functions/primarclen.html [www.sidefx.com]

Apparently, you can also get it from the arclength primitive intrinsic attribute
— dedeks 3000 —
User Avatar
Member
471 posts
Joined: July 2005
Offline
Hi dedeks,

Thanks for the advice. primarclen works fine for me, except one little thing, that there seems to be no overloaded version, where you can use the input id instead of the whole path string. Btw is there any function which maps the input id to the fullpath of the input?
User Avatar
Member
85 posts
Joined: May 2011
Offline
hye Aizatulin,

Look here :

https://www.sidefx.com/forum/topic/49076/ [www.sidefx.com]
— dedeks 3000 —
User Avatar
Member
471 posts
Joined: July 2005
Offline
Hi,

Thanks, I've forgotten that the Input count starts with 1 and not with 0 for @OpInput*.
User Avatar
Member
13 posts
Joined: Oct. 2013
Offline
I RFEed this once. I got this reply.

“I am told the Carve Curve Arc is available as a prototype node (ie, not formally supported but available for use at client's discression).
To install it, run ‘proto_install’ in a command line and follow the commands.”

So it's built in…in a way.
  • Quick Links