1 // Created on: 1999-04-30 2 // Created by: data exchange team 3 // Copyright (c) 1999 Matra Datavision 4 // Copyright (c) 1999-2014 OPEN CASCADE SAS 5 // 6 // This file is part of Open CASCADE Technology software library. 7 // 8 // This library is free software; you can redistribute it and/or modify it under 9 // the terms of the GNU Lesser General Public License version 2.1 as published 10 // by the Free Software Foundation, with special exception defined in the file 11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 12 // distribution for complete text of the license and disclaimer of any warranty. 13 // 14 // Alternatively, this file may be used under the terms of Open CASCADE 15 // commercial license or contractual agreement. 16 17 #ifndef _ShapeUpgrade_ShapeDivideContinuity_HeaderFile 18 #define _ShapeUpgrade_ShapeDivideContinuity_HeaderFile 19 20 #include <Standard.hxx> 21 #include <Standard_DefineAlloc.hxx> 22 #include <Standard_Handle.hxx> 23 24 #include <GeomAbs_Shape.hxx> 25 #include <Standard_Real.hxx> 26 #include <ShapeUpgrade_ShapeDivide.hxx> 27 class TopoDS_Shape; 28 class ShapeUpgrade_FaceDivide; 29 30 31 //! API Tool for converting shapes with C0 geometry into C1 ones 32 class ShapeUpgrade_ShapeDivideContinuity : public ShapeUpgrade_ShapeDivide 33 { 34 public: 35 36 DEFINE_STANDARD_ALLOC 37 38 39 Standard_EXPORT ShapeUpgrade_ShapeDivideContinuity(); 40 41 //! Initialize by a Shape. 42 Standard_EXPORT ShapeUpgrade_ShapeDivideContinuity(const TopoDS_Shape& S); 43 44 //! Sets tolerance. 45 Standard_EXPORT void SetTolerance (const Standard_Real Tol); 46 47 //! Sets tolerance. 48 Standard_EXPORT void SetTolerance2d (const Standard_Real Tol); 49 50 51 //! Defines a criterion of continuity for the boundary (all the 52 //! Wires) 53 //! 54 //! The possible values are C0, G1, C1, G2, C2, C3, CN The 55 //! default is C1 to respect the Cas.Cade Shape Validity. G1 56 //! and G2 are not authorized. 57 Standard_EXPORT void SetBoundaryCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1); 58 59 60 //! Defines a criterion of continuity for the boundary (all the 61 //! pcurves of Wires) 62 //! 63 //! The possible values are C0, G1, C1, G2, C2, C3, CN The 64 //! default is C1 to respect the Cas.Cade Shape Validity. G1 65 //! and G2 are not authorized. 66 Standard_EXPORT void SetPCurveCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1); 67 68 69 //! Defines a criterion of continuity for the boundary (all the 70 //! Wires) 71 //! 72 //! The possible values are C0, G1, C1, G2, C2, C3, CN The 73 //! default is C1 to respect the Cas.Cade Shape Validity. G1 74 //! and G2 are not authorized. 75 Standard_EXPORT void SetSurfaceCriterion (const GeomAbs_Shape Criterion = GeomAbs_C1); 76 77 78 79 80 protected: 81 82 83 //! Returns the tool for dividing faces. 84 Standard_EXPORT virtual Handle(ShapeUpgrade_FaceDivide) GetSplitFaceTool() const Standard_OVERRIDE; 85 86 87 88 89 private: 90 91 92 93 GeomAbs_Shape myCurve3dCriterion; 94 GeomAbs_Shape myCurve2dCriterion; 95 GeomAbs_Shape mySurfaceCriterion; 96 Standard_Real myTolerance3d; 97 Standard_Real myTolerance2d; 98 99 100 }; 101 102 103 104 105 106 107 108 #endif // _ShapeUpgrade_ShapeDivideContinuity_HeaderFile 109