How to input a brep?

why Brep has not Unset?how to input a brep like curve(because Curve has Unset)

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

1 Like

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)

1 Like

thankyou!it works

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