|
||||
File indexing completed on 2025-01-18 10:05:28
0001 // Created on: 1992-01-30 0002 // Created by: Didier PIFFAULT 0003 // Copyright (c) 1992-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 _TopTrans_SurfaceTransition_HeaderFile 0018 #define _TopTrans_SurfaceTransition_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 0023 #include <gp_Dir.hxx> 0024 #include <TColStd_Array2OfReal.hxx> 0025 #include <TopTrans_Array2OfOrientation.hxx> 0026 #include <TopAbs_Orientation.hxx> 0027 #include <TopAbs_State.hxx> 0028 0029 0030 //! This algorithm is used to compute the transition 0031 //! of a 3D surface intersecting a topological surfacic 0032 //! boundary on a 3D curve ( intersection curve ). 0033 //! The boundary is described by a set of faces 0034 //! each face is described by 0035 //! - its support surface, 0036 //! - an orientation defining its matter side. 0037 //! The geometric elements are described locally at the 0038 //! intersection point by a second order development. 0039 //! A surface is described by the normal vector, the 0040 //! principal directions and the principal curvatures. 0041 //! A curve is described by the tangent, the normal 0042 //! and the curvature. 0043 //! The algorithm keeps track of the two faces elements 0044 //! closest to the part of the curve "before" and "after" 0045 //! the intersection, these two elements are updated 0046 //! for each new face. 0047 //! The position of the curve can be computed when at 0048 //! least one surface element has been given, this 0049 //! position is "In","Out" or "On" for the part of the 0050 //! curve "Before" or "After" the intersection. 0051 class TopTrans_SurfaceTransition 0052 { 0053 public: 0054 0055 DEFINE_STANDARD_ALLOC 0056 0057 0058 //! Create an empty Surface Transition. 0059 Standard_EXPORT TopTrans_SurfaceTransition(); 0060 0061 //! Initialize a Surface Transition with the local 0062 //! description of the intersection curve and of the 0063 //! reference surface. 0064 //! PREQUESITORY : Norm oriented OUTSIDE "geometric matter" 0065 Standard_EXPORT void Reset (const gp_Dir& Tgt, const gp_Dir& Norm, const gp_Dir& MaxD, const gp_Dir& MinD, const Standard_Real MaxCurv, const Standard_Real MinCurv); 0066 0067 //! Initialize a Surface Transition with the local 0068 //! description of a straight line. 0069 Standard_EXPORT void Reset (const gp_Dir& Tgt, const gp_Dir& Norm); 0070 0071 //! Add a face element to the boundary. 0072 //! 0073 //! - S defines topological orientation for the face : 0074 //! S FORWARD means: along the intersection curve on the 0075 //! reference surface, transition states while crossing 0076 //! the face are OUT,IN. 0077 //! S REVERSED means states are IN,OUT. 0078 //! S INTERNAL means states are IN,IN. 0079 //! 0080 //! - O defines curve's position on face : 0081 //! O FORWARD means the face is before the intersection 0082 //! O REVERSED means the face is AFTER 0083 //! O INTERNAL means the curve intersection is in the face. 0084 //! PREQUESITORY : Norm oriented OUTSIDE "geometric matter" 0085 Standard_EXPORT void Compare (const Standard_Real Tole, const gp_Dir& Norm, const gp_Dir& MaxD, const gp_Dir& MinD, const Standard_Real MaxCurv, const Standard_Real MinCurv, const TopAbs_Orientation S, const TopAbs_Orientation O); 0086 0087 //! Add a plane or a cylindric face to the boundary. 0088 Standard_EXPORT void Compare (const Standard_Real Tole, const gp_Dir& Norm, const TopAbs_Orientation S, const TopAbs_Orientation O); 0089 0090 //! Returns the state of the reference surface before 0091 //! the interference, this is the position relative to 0092 //! the surface of a point very close to the intersection 0093 //! on the negative side of the tangent. 0094 Standard_EXPORT TopAbs_State StateBefore() const; 0095 0096 //! Returns the state of the reference surface after 0097 //! interference, this is the position relative to the 0098 //! surface of a point very close to the intersection 0099 //! on the positive side of the tangent. 0100 Standard_EXPORT TopAbs_State StateAfter() const; 0101 0102 Standard_EXPORT static TopAbs_State GetBefore (const TopAbs_Orientation Tran); 0103 0104 Standard_EXPORT static TopAbs_State GetAfter (const TopAbs_Orientation Tran); 0105 0106 0107 0108 0109 protected: 0110 0111 0112 0113 0114 0115 private: 0116 0117 0118 Standard_EXPORT void UpdateReference (const Standard_Real Tole, const Standard_Boolean isInfRef, Standard_Real& CosInf, Standard_Real& CosSup, const TopAbs_Orientation Tran, TopAbs_Orientation& TranRef); 0119 0120 Standard_EXPORT Standard_Real ComputeCos (const Standard_Real Tole, const gp_Dir& Norm, const TopAbs_Orientation O, Standard_Boolean& isleft) const; 0121 0122 0123 gp_Dir myTgt; 0124 gp_Dir myNorm; 0125 gp_Dir beafter; 0126 Standard_Real myCurvRef; 0127 TColStd_Array2OfReal myAng; 0128 TColStd_Array2OfReal myCurv; 0129 TopTrans_Array2OfOrientation myOri; 0130 Standard_Boolean myTouchFlag; 0131 0132 0133 }; 0134 0135 0136 0137 0138 0139 0140 0141 #endif // _TopTrans_SurfaceTransition_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |