RhinoScript and SubD

I’m writing a RhinoScript in v6 that needs to be ready for SubD surfaces when v7 comes out.

  1. What object type number will be returned by Rhino.ObjectType(strAnObject) for a subD?
  2. Will Rhino.SurfaceArea(strAnObject) work in for a SubD?
  3. Will Rhino.SurfaceAreaCentroid(strAnObject) work in for a SubD?

https://developer.rhino3d.com/wip/api/RhinoCommon/html/T_Rhino_DocObjects_SubDObject.htm

Interesting, but that’s way deeper than RhinoScript and I did not find the answers to my questions there.

Good questions - there may be some hiccups in Rhinoscript with SubD, I don’t know what the plan is there. It might be good in the long run to move away from Rhinoscript to something that can use RhinoCommon - Python or .Net.

-Pascal

What do you mean by hiccups? I’ve spent the last few weeks writing a weight estimating program in RhinoScript, and I’d rather not have to throw it away and start over!

Hello - SubD is a new object type - I can imagine that there will be some tune ups to make in Rhinoscript even if it does support SubD. Your script should continue to work as it does in V6, my comment was about supporting subD only. But I’ll stop speculating and ask the source - @dale - will SubD objects be supported in RhinoScript in V7?

-Pascal

I’ve answered my question by making a subD using ToSubD in v6 and interrogating ObjectType in RhinoScript. The number returned is 262144. So at this point RhinoScript knows about subDs, but the Rhino.SurfaceArea(strAnObject) and Rhino.SurfaceAreaCentroid(strAnObject) functions fail. Hopefully that will be resolved in v7.

I asked the same a while ago but heard crickets…

Same here, dropping RhinoScript is not an option so at least will need to make sure the existing scripts don’t crash or could be uptated with recognizing new object type; ideally some methods to deal with SubD basics would be welcome as well.

–jarek