|
|
|||
File indexing completed on 2026-09-14 09:13:49
0001 // Created on: 1994-02-18 0002 // Created by: Remi LEQUETTE 0003 // Copyright (c) 1994-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 _BRepAlgoAPI_Section_HeaderFile 0018 #define _BRepAlgoAPI_Section_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <Standard_Boolean.hxx> 0025 #include <BRepAlgoAPI_BooleanOperation.hxx> 0026 class BOPAlgo_PaveFiller; 0027 class TopoDS_Shape; 0028 class gp_Pln; 0029 class Geom_Surface; 0030 0031 //! The algorithm is to build a Section operation between arguments and tools. 0032 //! The result of Section operation consists of vertices and edges. 0033 //! The result of Section operation contains: 0034 //! 1. new vertices that are subjects of V/V, E/E, E/F, F/F interferences 0035 //! 2. vertices that are subjects of V/E, V/F interferences 0036 //! 3. new edges that are subjects of F/F interferences 0037 //! 4. edges that are Common Blocks 0038 class BRepAlgoAPI_Section : public BRepAlgoAPI_BooleanOperation 0039 { 0040 public: 0041 DEFINE_STANDARD_ALLOC 0042 0043 //! Empty constructor 0044 Standard_EXPORT BRepAlgoAPI_Section(); 0045 Standard_EXPORT ~BRepAlgoAPI_Section() override; 0046 0047 //! Empty constructor 0048 //! <PF> - PaveFiller object that is carried out 0049 Standard_EXPORT BRepAlgoAPI_Section(const BOPAlgo_PaveFiller& PF); 0050 0051 //! Constructor with two shapes 0052 //! <S1> -argument 0053 //! <S2> -tool 0054 //! <PerformNow> - the flag: 0055 //! if <PerformNow>=True - the algorithm is performed immediately 0056 //! Obsolete 0057 Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, 0058 const TopoDS_Shape& S2, 0059 const bool PerformNow = true); 0060 0061 //! Constructor with two shapes 0062 //! <S1> -argument 0063 //! <S2> -tool 0064 //! <PF> - PaveFiller object that is carried out 0065 //! <PerformNow> - the flag: 0066 //! if <PerformNow>=True - the algorithm is performed immediately 0067 //! Obsolete 0068 Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, 0069 const TopoDS_Shape& S2, 0070 const BOPAlgo_PaveFiller& aDSF, 0071 const bool PerformNow = true); 0072 0073 //! Constructor with two shapes 0074 //! <S1> - argument 0075 //! <Pl> - tool 0076 //! <PerformNow> - the flag: 0077 //! if <PerformNow>=True - the algorithm is performed immediately 0078 //! Obsolete 0079 Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, 0080 const gp_Pln& Pl, 0081 const bool PerformNow = true); 0082 0083 //! Constructor with two shapes 0084 //! <S1> - argument 0085 //! <Sf> - tool 0086 //! <PerformNow> - the flag: 0087 //! if <PerformNow>=True - the algorithm is performed immediately 0088 //! Obsolete 0089 Standard_EXPORT BRepAlgoAPI_Section(const TopoDS_Shape& S1, 0090 const occ::handle<Geom_Surface>& Sf, 0091 const bool PerformNow = true); 0092 0093 //! Constructor with two shapes 0094 //! <Sf> - argument 0095 //! <S2> - tool 0096 //! <PerformNow> - the flag: 0097 //! if <PerformNow>=True - the algorithm is performed immediately 0098 //! Obsolete 0099 Standard_EXPORT BRepAlgoAPI_Section(const occ::handle<Geom_Surface>& Sf, 0100 const TopoDS_Shape& S2, 0101 const bool PerformNow = true); 0102 0103 //! Constructor with two shapes 0104 //! <Sf1> - argument 0105 //! <Sf2> - tool 0106 //! <PerformNow> - the flag: 0107 //! if <PerformNow>=True - the algorithm is performed immediately 0108 //! Obsolete 0109 Standard_EXPORT BRepAlgoAPI_Section(const occ::handle<Geom_Surface>& Sf1, 0110 const occ::handle<Geom_Surface>& Sf2, 0111 const bool PerformNow = true); 0112 0113 //! initialize the argument 0114 //! <S1> - argument 0115 //! Obsolete 0116 Standard_EXPORT void Init1(const TopoDS_Shape& S1); 0117 0118 //! initialize the argument 0119 //! <Pl> - argument 0120 //! Obsolete 0121 Standard_EXPORT void Init1(const gp_Pln& Pl); 0122 0123 //! initialize the argument 0124 //! <Sf> - argument 0125 //! Obsolete 0126 Standard_EXPORT void Init1(const occ::handle<Geom_Surface>& Sf); 0127 0128 //! initialize the tool 0129 //! <S2> - tool 0130 //! Obsolete 0131 Standard_EXPORT void Init2(const TopoDS_Shape& S2); 0132 0133 //! initialize the tool 0134 //! <Pl> - tool 0135 //! Obsolete 0136 Standard_EXPORT void Init2(const gp_Pln& Pl); 0137 0138 //! initialize the tool 0139 //! <Sf> - tool 0140 //! Obsolete 0141 Standard_EXPORT void Init2(const occ::handle<Geom_Surface>& Sf); 0142 0143 Standard_EXPORT void Approximation(const bool B); 0144 0145 //! Indicates whether the P-Curve should be (or not) 0146 //! performed on the argument. 0147 //! By default, no parametric 2D curve (pcurve) is defined for the 0148 //! edges of the result. 0149 //! If ComputePCurve1 equals true, further computations performed 0150 //! to attach an P-Curve in the parametric space of the argument 0151 //! to the constructed edges. 0152 //! Obsolete 0153 Standard_EXPORT void ComputePCurveOn1(const bool B); 0154 0155 //! Indicates whether the P-Curve should be (or not) 0156 //! performed on the tool. 0157 //! By default, no parametric 2D curve (pcurve) is defined for the 0158 //! edges of the result. 0159 //! If ComputePCurve1 equals true, further computations performed 0160 //! to attach an P-Curve in the parametric space of the tool 0161 //! to the constructed edges. 0162 //! Obsolete 0163 Standard_EXPORT void ComputePCurveOn2(const bool B); 0164 0165 //! Performs the algorithm 0166 //! Filling interference Data Structure (if it is necessary) 0167 //! Building the result of the operation. 0168 Standard_EXPORT void Build( 0169 const Message_ProgressRange& theRange = Message_ProgressRange()) override; 0170 0171 //! get the face of the first part giving section edge <E>. 0172 //! Returns True on the 3 following conditions : 0173 //! 1/ <E> is an edge returned by the Shape() metwod. 0174 //! 2/ First part of section performed is a shape. 0175 //! 3/ <E> is built on a intersection curve (i.e <E> 0176 //! is not the result of common edges) 0177 //! When False, F remains untouched. 0178 //! Obsolete 0179 Standard_EXPORT bool HasAncestorFaceOn1(const TopoDS_Shape& E, TopoDS_Shape& F) const; 0180 0181 //! Identifies the ancestor faces of 0182 //! the intersection edge E resulting from the last 0183 //! computation performed in this framework, that is, the faces of 0184 //! the two original shapes on which the edge E lies: 0185 //! - HasAncestorFaceOn1 gives the ancestor face in the first shape, and 0186 //! - HasAncestorFaceOn2 gives the ancestor face in the second shape. 0187 //! These functions return true if an ancestor face F is found, or false if not. 0188 //! An ancestor face is identifiable for the edge E if the following 0189 //! conditions are satisfied: 0190 //! - the first part on which this algorithm performed its 0191 //! last computation is a shape, that is, it was not given as 0192 //! a surface or a plane at the time of construction of this 0193 //! algorithm or at a later time by the Init1 function, 0194 //! - E is one of the elementary edges built by the 0195 //! last computation of this section algorithm. 0196 //! To use these functions properly, you have to test the returned 0197 //! Boolean value before using the ancestor face: F is significant 0198 //! only if the returned Boolean value equals true. 0199 //! Obsolete 0200 Standard_EXPORT bool HasAncestorFaceOn2(const TopoDS_Shape& E, TopoDS_Shape& F) const; 0201 0202 protected: 0203 Standard_EXPORT void Init(const bool PerformNow); 0204 0205 Standard_EXPORT void SetAttributes() override; 0206 0207 private: 0208 bool myApprox; 0209 bool myComputePCurve1; 0210 bool myComputePCurve2; 0211 }; 0212 0213 #endif // _BRepAlgoAPI_Section_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|