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