1 #include <ShapeFix_Root.ixx>
3 //=======================================================================
4 //function : ShapeFix_Root
6 //=======================================================================
8 ShapeFix_Root::ShapeFix_Root()
10 myPrecision = myMinTol = myMaxTol = Precision::Confusion();
11 myMsgReg = new ShapeExtend_BasicMsgRegistrator;
14 //=======================================================================
17 //=======================================================================
19 void ShapeFix_Root::Set (const Handle(ShapeFix_Root)& Root)
21 myContext = Root->myContext;
22 myMsgReg = Root->myMsgReg;
23 myPrecision = Root->myPrecision;
24 myMinTol = Root->myMinTol;
25 myMaxTol = Root->myMaxTol;
26 myShape = Root->myShape;
29 //=======================================================================
30 //function : SetContext
32 //=======================================================================
34 void ShapeFix_Root::SetContext (const Handle(ShapeBuild_ReShape)& context)
39 //=======================================================================
40 //function : SetMsgRegistrator
42 //=======================================================================
44 void ShapeFix_Root::SetMsgRegistrator(const Handle(ShapeExtend_BasicMsgRegistrator)& msgreg)
49 //=======================================================================
50 //function : SetPrecision
52 //=======================================================================
54 void ShapeFix_Root::SetPrecision (const Standard_Real preci)
57 if(myMaxTol < myPrecision) myMaxTol = myPrecision;
58 if(myMinTol > myPrecision) myMinTol = myPrecision;
61 //=======================================================================
62 //function : SetMinTolerance
64 //=======================================================================
66 void ShapeFix_Root::SetMinTolerance (const Standard_Real mintol)
71 //=======================================================================
72 //function : SetMaxTolerance
74 //=======================================================================
76 void ShapeFix_Root::SetMaxTolerance (const Standard_Real maxtol)
81 //=======================================================================
84 //=======================================================================
86 void ShapeFix_Root::SendMsg(const TopoDS_Shape& shape,
87 const Message_Msg& message,
88 const Message_Gravity gravity) const
90 myMsgReg->Send (shape, message, gravity);