Krion Posted September 20, 2019 Share Posted September 20, 2019 Hi, I am wondering how you would do something like this. How would you get a line with one length parameter, that has a constraint after which it can go no further, and then it continues below, like a little 'paragraph', so you could create variations of that line on different 'cards'. Would really like to know how you could do something like that. Thanks Quote Link to comment Share on other sites More sharing options...
anim Posted September 21, 2019 Share Posted September 21, 2019 while easily possible without coding, I just did a quick wrangle vector startP = chv("startP"); float width = chf("width"); float spacing = chf("spacing"); float length = chf("length"); int nlines = ceil(length/width); for(int i=0; i<nlines; i++){ float linewidth = min(length - i*width, width); vector linestartP = startP + {0,-1,0}*spacing*i; int pt0 = addpoint(0, linestartP); int pt1 = addpoint(0, linestartP + {1,0,0}*linewidth); addprim(0, "polyline", pt0, pt1); } ts_paragraph_line.hip 1 1 Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted September 21, 2019 Share Posted September 21, 2019 (edited) Here is another (similar) solution using the copy node. line_break.hipnc Edited September 21, 2019 by Aizatulin 1 Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted September 21, 2019 Share Posted September 21, 2019 (edited) Ok, here comes the nice and simple SOP solution: Segment the input line with a polycut node. Align the segments with a primitive node. Assign letters with another primitive node. paragraph.hipnc Edited September 21, 2019 by konstantin magnus 1 Quote Link to comment Share on other sites More sharing options...
Krion Posted September 21, 2019 Author Share Posted September 21, 2019 Super crazy shit guys.. too awesome. Glad to be on the path of learning Houdini. 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.