Grasshopper

algorithmic modeling for Rhino

Could somebody please give me a heads up as to why i cant create this brep (temp) with this code?. Im basically trying to create my own Planar_Srf command. but for the life of me im losing this battle... note "myCurves" are just three lines that form a triangle.

Brep temp = new Brep.CreatePlanarBreps(myCurves);

M

Views: 380

Replies to This Discussion

F#@k it, i give up, if somebody out there knows what the equivalent to the planar Surface node in C# is im sending out a general S.O.S.

Brep[] temp = Brep.CreatePlanarBreps(myCurves);

CreatePlanarBreps is a static method, therefore it must be called on the type name rather than an instance of the Brep class. Also it returns an array of breps. If you're certain that the function doesn't fail in your case and only ever returns a single brep, you can use the following shorthand:

Brep temp = Brep.CreatePlanarBreps(myCurves)[0];

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thanks a lot David!

I still get tripped up about instance(object) vs static(class) methods. ill chalk it up to trying to learn three languages at once (java, C#, Objective C)... or, im just incompetent... probably a little of both.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service