Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-27 09:39:10

0001 // Created on: 2004-07-14
0002 // Created by: Sergey KUUL
0003 // Copyright (c) 2004-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _ShapeFix_SplitTool_HeaderFile
0017 #define _ShapeFix_SplitTool_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_DefineAlloc.hxx>
0021 #include <Standard_Handle.hxx>
0022 
0023 #include <TopoDS_Shape.hxx>
0024 #include <NCollection_Sequence.hxx>
0025 #include <Standard_Integer.hxx>
0026 class TopoDS_Edge;
0027 class TopoDS_Vertex;
0028 class TopoDS_Face;
0029 class ShapeBuild_ReShape;
0030 
0031 //! Tool for splitting and cutting edges; includes methods
0032 //! used in OverlappingTool and IntersectionTool
0033 class ShapeFix_SplitTool
0034 {
0035 public:
0036   DEFINE_STANDARD_ALLOC
0037 
0038   //! Empty constructor
0039   Standard_EXPORT ShapeFix_SplitTool();
0040 
0041   //! Split edge on two new edges using new vertex "vert"
0042   //! and "param" - parameter for splitting
0043   //! The "face" is necessary for pcurves and using TransferParameterProj
0044   Standard_EXPORT bool SplitEdge(const TopoDS_Edge&   edge,
0045                                  const double         param,
0046                                  const TopoDS_Vertex& vert,
0047                                  const TopoDS_Face&   face,
0048                                  TopoDS_Edge&         newE1,
0049                                  TopoDS_Edge&         newE2,
0050                                  const double         tol3d,
0051                                  const double         tol2d) const;
0052 
0053   //! Split edge on two new edges using new vertex "vert"
0054   //! and "param1" and "param2" - parameter for splitting and cutting
0055   //! The "face" is necessary for pcurves and using TransferParameterProj
0056   Standard_EXPORT bool SplitEdge(const TopoDS_Edge&   edge,
0057                                  const double         param1,
0058                                  const double         param2,
0059                                  const TopoDS_Vertex& vert,
0060                                  const TopoDS_Face&   face,
0061                                  TopoDS_Edge&         newE1,
0062                                  TopoDS_Edge&         newE2,
0063                                  const double         tol3d,
0064                                  const double         tol2d) const;
0065 
0066   //! Cut edge by parameters pend and cut
0067   Standard_EXPORT bool CutEdge(const TopoDS_Edge& edge,
0068                                const double       pend,
0069                                const double       cut,
0070                                const TopoDS_Face& face,
0071                                bool&              iscutline) const;
0072 
0073   //! Split edge on two new edges using two new vertex V1 and V2
0074   //! and two parameters for splitting - fp and lp correspondingly
0075   //! The "face" is necessary for pcurves and using TransferParameterProj
0076   //! aNum - number of edge in SeqE which corresponding to [fp,lp]
0077   Standard_EXPORT bool SplitEdge(const TopoDS_Edge&                     edge,
0078                                  const double                           fp,
0079                                  const TopoDS_Vertex&                   V1,
0080                                  const double                           lp,
0081                                  const TopoDS_Vertex&                   V2,
0082                                  const TopoDS_Face&                     face,
0083                                  NCollection_Sequence<TopoDS_Shape>&    SeqE,
0084                                  int&                                   aNum,
0085                                  const occ::handle<ShapeBuild_ReShape>& context,
0086                                  const double                           tol3d,
0087                                  const double                           tol2d) const;
0088 };
0089 
0090 #endif // _ShapeFix_SplitTool_HeaderFile