ghpython icon indicating copy to clipboard operation
ghpython copied to clipboard

Datatypes in Grasshopper

Open scotttd opened this issue 14 years ago • 2 comments

How would I create these datatypes in GhPython to output as the native Grasshopper datatypes?

  1. Box - should we marshall an rs.Addbox result into a Box type?
  2. Rectangle - should we marshall a rs.AddPlanesurface?

scotttd avatar Jul 20 '11 20:07 scotttd

These are most likely just the Box and Rectangle3d classes in RhinoCommon.

sbaer avatar Jul 20 '11 21:07 sbaer

The AddRectangle call works also well because Grasshopper is able to convert a 4-pointed polyline in a rectangle if that is necessary, but the information is not retained for boxes. It seems a special case is necessary for Box.

piac avatar Jun 11 '12 13:06 piac