Python QT: How can I create a poly curve with python

   7060   6   3
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Hi All,

I'm a newbie (my 3rd day now with houdini) and i like to write my first tool in python.
It should simply give me back some helix and spiral curves.
The helix/spirals functions are working, but I have to set a line and resample as input,
now i like to make this working without any inputs,
but I don't know how to create the initial curve as a polygon curve.

The code snippets here:
http://www.sidefx.com/docs/houdini11.1/hom/hou/Geometry#createNURBSCurve [sidefx.com]
are for Nurbs and Bezier curves.

There is an example for polygons, too:
http://www.sidefx.com/docs/houdini11.1/hom/hou/Face#addVertex [sidefx.com]

But how can I create a simple polygonal curve?

Many thanks for any help :-)

Attachments:
figure_001.jpg (28.4 KB)

English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
401 posts
Joined:
Offline
You should consider digital assets (HDA/OTLs) before bypassing Houdini's strenghts with python/QT workarounds.
this is not a science fair.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Hi rgd,

thank you for the reply :-)

Maybe this one is yours (rdg?):

http://www.preset.de/2007/0711/lorenz/ [preset.de]

That's what I'm looking for, except that I have to use a curve + resample as input. I like to generate the curve inside the tool, too.
English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
299 posts
Joined: Jan. 2010
Offline
Make a Python SOP that moves the points to the correct position and put it in an OTL togheter with a Curve and Resample SOP.
Drive, monkey, drive!
User Avatar
Member
401 posts
Joined:
Offline
matthias_k
I don't know how to create the initial curve as a polygon curve.
I'd say a polygn curve is a polygon that's not closed.

matthias_k
Maybe this one is yours (rdg?):

http://www.preset.de/2007/0711/lorenz/ [preset.de]

Yeah that's ‘mine’. Lorenz attractors are recursive - a concept not easily implemented in Houdini's native contexts. That's why I chose the python back then.

The math for helix/spirals is easily put into a vopSOP or vex node. That's way faster for larger point counts than python.
this is not a science fair.
User Avatar
Member
483 posts
Joined: Dec. 2006
Offline
Thanks for the help and pointing me in the right direction :-)

I'll try it now with a VOPSOP.

I found something in the forum, too:
http://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=84997&sid=7746b29b506198236f86668e27f84618 [sidefx.com]
English is not my native language, sorry in advance for any misunderstanding :-)
User Avatar
Member
14 posts
Joined: Jan. 2009
Offline
A couple times you asked how to create a curve. The line sop will work for this.
  • Quick Links