|
||||
File indexing completed on 2025-01-18 10:04:57
0001 // Created on: 1998-02-18 0002 // Created by: Pierre BARRAS 0003 // Copyright (c) 1998-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _ShapeUpgrade_FaceDivide_HeaderFile 0018 #define _ShapeUpgrade_FaceDivide_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <TopoDS_Face.hxx> 0024 #include <Standard_Integer.hxx> 0025 #include <ShapeUpgrade_Tool.hxx> 0026 #include <ShapeExtend_Status.hxx> 0027 class ShapeUpgrade_SplitSurface; 0028 class ShapeUpgrade_WireDivide; 0029 0030 // resolve name collisions with X11 headers 0031 #ifdef Status 0032 #undef Status 0033 #endif 0034 0035 class ShapeUpgrade_FaceDivide; 0036 DEFINE_STANDARD_HANDLE(ShapeUpgrade_FaceDivide, ShapeUpgrade_Tool) 0037 0038 //! Divides a Face (both edges in the wires, by splitting 0039 //! curves and pcurves, and the face itself, by splitting 0040 //! supporting surface) according to splitting criteria. 0041 //! * The domain of the face to divide is defined by the PCurves 0042 //! of the wires on the Face. 0043 //! 0044 //! * all the PCurves are supposed to be defined (in the parametric 0045 //! space of the supporting surface). 0046 //! 0047 //! The result is available after the call to the Build method. 0048 //! It is a Shell containing all the resulting Faces. 0049 //! 0050 //! All the modifications made during splitting are recorded in the 0051 //! external context (ShapeBuild_ReShape). 0052 class ShapeUpgrade_FaceDivide : public ShapeUpgrade_Tool 0053 { 0054 0055 public: 0056 0057 0058 //! Creates empty constructor. 0059 Standard_EXPORT ShapeUpgrade_FaceDivide(); 0060 0061 //! Initialize by a Face. 0062 Standard_EXPORT ShapeUpgrade_FaceDivide(const TopoDS_Face& F); 0063 0064 //! Initialize by a Face. 0065 Standard_EXPORT void Init (const TopoDS_Face& F); 0066 0067 //! Purpose sets mode for trimming (segment) surface by 0068 //! wire UV bounds. 0069 Standard_EXPORT void SetSurfaceSegmentMode (const Standard_Boolean Segment); 0070 0071 //! Performs splitting and computes the resulting shell 0072 //! The context is used to keep track of former splittings 0073 //! in order to keep sharings. It is updated according to 0074 //! modifications made. 0075 //! The optional argument <theArea> is used to initialize 0076 //! the tool for splitting surface in the case of 0077 //! splitting into N parts where N is user-defined. 0078 Standard_EXPORT virtual Standard_Boolean Perform(const Standard_Real theArea = 0.); 0079 0080 //! Performs splitting of surface and computes the shell 0081 //! from source face. 0082 //! The optional argument <theArea> is used to initialize 0083 //! the tool for splitting surface in the case of 0084 //! splitting into N parts where N is user-defined. 0085 Standard_EXPORT virtual Standard_Boolean SplitSurface(const Standard_Real theArea = 0.); 0086 0087 //! Performs splitting of curves of all the edges in the 0088 //! shape and divides these edges. 0089 Standard_EXPORT virtual Standard_Boolean SplitCurves(); 0090 0091 //! Gives the resulting Shell, or Face, or Null shape if not done. 0092 Standard_EXPORT TopoDS_Shape Result() const; 0093 0094 //! Queries the status of last call to Perform 0095 //! OK : no splitting was done (or no call to Perform) 0096 //! DONE1: some edges were split 0097 //! DONE2: surface was split 0098 //! DONE3: surface was modified without splitting 0099 //! FAIL1: some fails encountered during splitting wires 0100 //! FAIL2: face cannot be split 0101 Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status status) const; 0102 0103 //! Sets the tool for splitting surfaces. 0104 Standard_EXPORT void SetSplitSurfaceTool (const Handle(ShapeUpgrade_SplitSurface)& splitSurfaceTool); 0105 0106 //! Sets the tool for dividing edges on Face. 0107 Standard_EXPORT void SetWireDivideTool (const Handle(ShapeUpgrade_WireDivide)& wireDivideTool); 0108 0109 //! Returns the tool for splitting surfaces. 0110 //! This tool must be already initialized. 0111 Standard_EXPORT virtual Handle(ShapeUpgrade_SplitSurface) GetSplitSurfaceTool() const; 0112 0113 //! Returns the tool for dividing edges on Face. 0114 //! This tool must be already initialized. 0115 Standard_EXPORT virtual Handle(ShapeUpgrade_WireDivide) GetWireDivideTool() const; 0116 0117 0118 0119 0120 DEFINE_STANDARD_RTTIEXT(ShapeUpgrade_FaceDivide,ShapeUpgrade_Tool) 0121 0122 protected: 0123 0124 0125 TopoDS_Face myFace; 0126 TopoDS_Shape myResult; 0127 Standard_Boolean mySegmentMode; 0128 Standard_Integer myStatus; 0129 0130 0131 private: 0132 0133 0134 Handle(ShapeUpgrade_SplitSurface) mySplitSurfaceTool; 0135 Handle(ShapeUpgrade_WireDivide) myWireDivideTool; 0136 0137 0138 }; 0139 0140 0141 0142 0143 0144 0145 0146 #endif // _ShapeUpgrade_FaceDivide_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |