Grasshopper

algorithmic modeling for Rhino

I am trying to create a planar Brep from a polyline. A little help with the syntax would be great.

 

Rhino.Geometry.Curve crv = new Rhino.Geometry.Curve(); //create new Curve

crv = poly1.ToNurbsCurve; //assign poly1 as a NurbsCurve to crv

Rhino.Geometry.Brep.CreatePlanarBreps closedPlanar0 = new

Rhino.Geometry.Brep.CreatePlanarBreps(poly1);
//create planar Brep with poly1 as type curve

A = closedPlanar0; //return the closed planar Brep





Views: 1988

Replies to This Discussion

Hi Charles,

something along these lines:

//Curve crv = poly.ToNurbsCurve(); //if poly is of type Polyline
Brep[] allBreps = Rhino.Geometry.Brep.CreatePlanarBreps(crv);
//creates multiple planar Brep's with crv
A = allBreps; //return the closed planar Brep

Cheers,

- Giulio
_____________
giulio@mcneel.com

Attachments:

perfect, 

much thanks

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service