How to insert null value into TopoDS_Shape type?

I have a necessity that insert null value into TopoDS_Shape.

How to insert null value into TopoDS_Shape type?

Marco Matt's picture

TopoDS_Shape shape;
shape.IsNull() == true;
shape = BRepLib_MakeEdge(gp_Pnt(0,0,0), gp_Pnt(1,1,1)).Edge();
shape.IsNull() == false;
shape.Nullify();
shape.IsNull() == true;

Wang Chris's picture

TopoDS_Shape has a function of Nullify (). You can try it.

Chris

mekibos's picture

OK! Thank you very much!!

m-aronsson's picture

It is a bit useless to execute the expression:
shape.IsNull() == false;