Get the 2 CVs from a curveu on a NURBS curve.

   277   4   2
User Avatar
Member
38 posts
Joined: Dec. 2014
Offline
Hello,

I have a NURBS curve and I want to grab the before and after CVs depending on the provided curve u value. Anyone got any ideas how I could do this?

Thanks

Edited by JohnDoe777 - Dec. 31, 2024 09:12:52

Attachments:
curve_example.png (244.2 KB)

User Avatar
Member
341 posts
Joined: Nov. 2013
Offline
Are you looking for a python script/tool? Or a sop network that places whichever two points in a group?
User Avatar
Member
38 posts
Joined: Dec. 2014
Offline
antc
Are you looking for a python script/tool? Or a sop network that places whichever two points in a group?

Sorry probably should have clarified. A python script preferably. Need it as part of a viewer state for creating curves and having the option of inserting new CVS along the curve.
User Avatar
Member
8853 posts
Joined: July 2007
Offline
maybe an overkill to dig through, but you can probably find what you are looking for in the Curve viewer state since it also supports adding new CVs to NURBS curves
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
341 posts
Joined: Nov. 2013
Offline
I'm not sure how the curve sop does things, but to insert at a particular u position and have the CV's update you might be able to use the carve sop verb. Something like

carve_verb = hou.sopNodeTypeCategory().nodeVerb("carve")
carve_verb.setParms({'domainu1': u_value, 'keepout': 1})
carve_verb.execute(geometry, [input_geometry])

EDIT: refine verb is probably a better choice to add a break point.
Edited by antc - today 17:07:56
  • Quick Links