|
|
|||
File indexing completed on 2026-09-20 09:17:01
0001 // Created on: 1995-09-04 0002 // Created by: Jacques GOUSSARD 0003 // Copyright (c) 1995-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 _BRepFeat_SplitShape_HeaderFile 0018 #define _BRepFeat_SplitShape_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <LocOpe_Spliter.hxx> 0025 #include <BRepBuilderAPI_MakeShape.hxx> 0026 #include <TopoDS_Shape.hxx> 0027 #include <NCollection_List.hxx> 0028 #include <NCollection_Sequence.hxx> 0029 0030 class LocOpe_WiresOnShape; 0031 class TopoDS_Shape; 0032 class TopoDS_Wire; 0033 class TopoDS_Face; 0034 class TopoDS_Edge; 0035 class TopoDS_Compound; 0036 0037 //! One of the most significant aspects of BRepFeat functionality is the use of local 0038 //! operations as opposed to global ones. In a global operation, you would first construct a 0039 //! form of the type you wanted in your final feature, and then remove matter so that it could 0040 //! fit into your initial basis object. In a local operation, however, you specify the domain of 0041 //! the feature construction with aspects of the shape on which the feature is being created. 0042 //! These semantics are expressed in terms of a member shape of the basis shape from which - 0043 //! or up to which - matter will be added or removed. As a result, local operations make 0044 //! calculations simpler and faster than global operations. 0045 //! In BRepFeat, the semantics of local operations define features constructed from a contour or a 0046 //! part of the basis shape referred to as the tool. In a SplitShape object, wires or edges of a 0047 //! face in the basis shape to be used as a part of the feature are cut out and projected to a plane 0048 //! outside or inside the basis shape. By rebuilding the initial shape incorporating the edges and 0049 //! the faces of the tool, protrusion or depression features can be constructed. 0050 class BRepFeat_SplitShape : public BRepBuilderAPI_MakeShape 0051 { 0052 public: 0053 DEFINE_STANDARD_ALLOC 0054 0055 //! Empty constructor 0056 BRepFeat_SplitShape(); 0057 0058 //! Creates the process with the shape <S>. 0059 BRepFeat_SplitShape(const TopoDS_Shape& S); 0060 0061 //! Add splitting edges or wires for whole initial shape 0062 //! without additional specification edge->face, edge->edge 0063 //! This method puts edge on the corresponding faces from initial shape 0064 bool Add(const NCollection_Sequence<TopoDS_Shape>& theEdges); 0065 0066 //! Initializes the process on the shape <S>. 0067 void Init(const TopoDS_Shape& S); 0068 0069 //! Set the flag of check internal intersections 0070 //! default value is True (to check) 0071 void SetCheckInterior(const bool ToCheckInterior); 0072 0073 //! Adds the wire <W> on the face <F>. 0074 //! Raises NoSuchObject if <F> does not belong to the original shape. 0075 void Add(const TopoDS_Wire& W, const TopoDS_Face& F); 0076 0077 //! Adds the edge <E> on the face <F>. 0078 void Add(const TopoDS_Edge& E, const TopoDS_Face& F); 0079 0080 //! Adds the compound <Comp> on the face <F>. The 0081 //! compound <Comp> must consist of edges lying on the 0082 //! face <F>. If edges are geometrically connected, 0083 //! they must be connected topologically, i.e. they 0084 //! must share common vertices. 0085 //! 0086 //! Raises NoSuchObject if <F> does not belong to the original shape. 0087 void Add(const TopoDS_Compound& Comp, const TopoDS_Face& F); 0088 0089 //! Adds the edge <E> on the existing edge <EOn>. 0090 void Add(const TopoDS_Edge& E, const TopoDS_Edge& EOn); 0091 0092 //! Returns the faces which are the left of the 0093 //! projected wires. 0094 Standard_EXPORT const NCollection_List<TopoDS_Shape>& DirectLeft() const; 0095 0096 //! Returns the faces of the "left" part on the shape. 0097 //! (It is build from DirectLeft, with the faces 0098 //! connected to this set, and so on...). 0099 //! Raises NotDone if IsDone returns <false>. 0100 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Left() const; 0101 0102 //! Returns the faces of the "right" part on the shape. 0103 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Right() const; 0104 0105 //! Builds the cut and the resulting faces and edges as well. 0106 Standard_EXPORT void Build( 0107 const Message_ProgressRange& theRange = Message_ProgressRange()) override; 0108 0109 //! Returns true if the shape has been deleted. 0110 Standard_EXPORT bool IsDeleted(const TopoDS_Shape& S) override; 0111 0112 //! Returns the list of generated Faces. 0113 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Modified(const TopoDS_Shape& F) override; 0114 0115 private: 0116 LocOpe_Spliter mySShape; 0117 occ::handle<LocOpe_WiresOnShape> myWOnShape; 0118 0119 mutable NCollection_List<TopoDS_Shape> myRight; 0120 }; 0121 0122 #include <BRepFeat_SplitShape.lxx> 0123 0124 #endif // _BRepFeat_SplitShape_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|