Grasshopper

algorithmic modeling for Rhino

Hi guys, 

I'm writing a script in C# and Id like to know what is the best way to transform a circle into a surface(hole),

Thanks

Views: 3675

Replies to This Discussion

Brep, BrepFace and a free bonus, he he (BTW: hole??).

public void MakeBrep (Circle circle, double offsetD, double offsetTol, bool bothSides, bool createSolid,
  out Brep brepOUT, out BrepFace brepFaceOUT, out Brep thickenOUT){

    Brep brep = Brep.CreatePlanarBreps(circle.ToNurbsCurve())[0]; // or any closed planar Curve
    BrepFace brepFace = brep.Faces[0];

    Brep thicken = Brep.CreateFromOffsetFace(brepFace, offsetD, offsetTol, bothSides, createSolid);

    brepOUT = brep;
    brepFaceOUT = brepFace;
    thickenOUT = thicken;
  }

Ok, thx a lot for your help! 

simple, versatile, fast

 as usual LOD... thnks...

attached the comp. to get a surface from any closed curve and optionally extrude it

http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_...

Attachments:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service