1 // File: BlockFix_BlockFixAPI.cxx
2 // Created: Tue Dec 7 11:59:05 2004
3 // Author: Pavel DURANDIN
4 // Copyright: Open CASCADE SA 2004
7 #include <BlockFix_BlockFixAPI.ixx>
8 #include <BlockFix.hxx>
9 #include <BlockFix_UnionFaces.hxx>
10 #include <BlockFix_UnionEdges.hxx>
11 #include <Precision.hxx>
13 //=======================================================================
14 //function : ShapeConvert_CanonicAPI
16 //=======================================================================
18 BlockFix_BlockFixAPI::BlockFix_BlockFixAPI()
20 myTolerance = Precision::Confusion();
23 //=======================================================================
26 //=======================================================================
28 void BlockFix_BlockFixAPI::Perform()
31 // processing spheres with degenerativities
32 TopoDS_Shape aShape = Shape();
33 myShape = BlockFix::RotateSphereSpace(aShape,myTolerance);
36 BlockFix_UnionFaces aFaceUnifier;
37 aFaceUnifier.GetTolerance() = myTolerance;
39 aResult = aFaceUnifier.Perform(myShape);
42 BlockFix_UnionEdges anEdgeUnifier;
43 myShape = anEdgeUnifier.Perform(aResult,myTolerance);
45 TopoDS_Shape aRes = BlockFix::FixRanges(myShape,myTolerance);