Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

fsimerey

Members
  • Content count

    74
  • Joined

  • Last visited

Community Reputation

11 Good

About fsimerey

  • Rank
    Peon

Contact Methods

  • Website URL
    http://fsimerey.com

Personal Information

  • Name
    Fran├žois
  • Location
    Paris
  1. It's because @numpt is an integer in the division. Use the function float() to convert integer to float. f@ramp = @ptnum / float(@numpt); But if you want a full ramp from 0 to 1 use this expression f@ramp = @ptnum / float(@numpt - 1);
  2. Ok, i see. A python sop could be simple to count lines.
  3. Indeed, i misunderstood your question. Strange approach, on my side, i would make an integer parameter on my sop/hda/null, then put it in font sop and duplicate node. How do you access to text field to enter your number ?
  4. `chs("../duplicate1/ncy")` Be careful of back-ticks, needed to evaluate the expression. An easy way is to a right-click on channel you want to copy and paste into the text field of Font SOP.
  5. https://atom.io/packages/language-vex
  6. And you can do more. Rotate along the vector defined by 2 specific points in full 3d: // Points to define vector axis and center vector P0 = point(0, "P", chi("p0_axis")); vector P1 = point(0, "P", chi("p1_axis")); vector axis = normalize(P1 - P0); vector center = P1 - (P1 - P0) / 2; // offset to center vector _P = @P - center; float ang = chf('angle'); vector4 q = quaternion(radians(ang), axis); // rotate P and N @P = qrotate(q, _P); @N = normalize(qrotate(q, @N)); // replace to origin @P += center;
  7. Try this in wrangle Primitive node: i[]@arr = {-1,0,1}; // Create an array with values i@arr[1] = @primnum; // Set primnum in array[1] This create and set value of an integer array.
  8. It's exactly what i was looking for. Thanks f1480187
  9. Ok, i found a solution to solve my problem, but it's not by identify -nan value. The bad primitives have an intrinsic:measuredarea equal to -nan too. So i keep only primitive with an area > 0.0001
  10. Hello, i have a bad geometry with some vertex with -nan value in @N. @N is a 32 bits float vector attribute, but -nan is equal or not equal of which value ?
  11. http://www.sidefx.com/docs/houdini15.5/hom/hou/Node#type With name() method, you can get the type of your node: hou.node('my_node').type().name() will return 'merge' if this node is a merge sop node.
  12. Like your solution but the round result is not accurate. Try it with 3 decimals and 0.9996 Your solution result with 0.999 when the accurate must give 1.000
  13. float a = 179.9996; string trunc = itoa(int(trunc(a))); int ifrac = int(rint(frac(a)*1000)); string frac = "000"; if (ifrac == 1000) { trunc = itoa(int(trunc(a)) +1); } else { frac = sprintf("%03d", ifrac); } s@result = trunc + "." + frac; Here the solution for string.
  14. f@y = rint(@P.y * 1000) / 1000; If you want 3 decimal for a string, with zero on decimal, you must extract fraction and decimal, then concatenate those in string.