How to input a brep?


(Andrealu2012) #1

%E5%9B%BE%E7%89%87
why Brep has not Unset?how to input a brep like curve(because Curve has Unset)
thankyou!


#2

Hi @andrealu2012,

You can set the Brep value to null before getting it.

Rhino.Geometry.Brep brep = null;
if(!DA.GetData(0, ref brep)){return;}

– Xavier


(David Rutten) #3

Curve does not have Unset. Only structs have unset values, because structs can never be null.
If you just need to create a value for a field and you do not care what it is, you can also use the default keyword: default(Brep), or default(int)


(Andrealu2012) #4

thankyou!it works


(Andrealu2012) #5

thank you ,David,i learn a lot in your reply!