|
|
|||
File indexing completed on 2026-09-12 09:17:21
0001 // Created on: 1997-05-05 0002 // Created by: Jerome LEMONIER 0003 // Copyright (c) 1997-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 _GeomPlate_PointConstraint_HeaderFile 0018 #define _GeomPlate_PointConstraint_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_Type.hxx> 0022 0023 #include <GeomLProp_SLProps.hxx> 0024 #include <gp_Pnt.hxx> 0025 #include <gp_Pnt2d.hxx> 0026 #include <gp_Vec.hxx> 0027 #include <Standard_Integer.hxx> 0028 #include <Standard_Transient.hxx> 0029 class Geom_Surface; 0030 0031 //! Defines points as constraints to be used to deform a surface. 0032 class GeomPlate_PointConstraint : public Standard_Transient 0033 { 0034 0035 public: 0036 //! Constructs a point constraint object defined by Pt, a 3D point 0037 //! Order gives the order of constraint, one of: 0038 //! - -1 i.e. none, or 0 i.e.G0 when assigned to Pt 0039 //! - -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when 0040 //! assigned to U, V and Surf. 0041 //! In this constructor, only TolDist is given. 0042 //! Distance tolerance represents the greatest distance 0043 //! allowed between the constraint and the target surface. 0044 //! Angular tolerance represents the largest angle allowed 0045 //! between the constraint and the target surface. Curvature 0046 //! tolerance represents the greatest difference in curvature 0047 //! allowed between the constraint and the target surface. 0048 //! Raises ConstructionError if Order is not 0 or -1 0049 Standard_EXPORT GeomPlate_PointConstraint(const gp_Pnt& Pt, 0050 const int Order, 0051 const double TolDist = 0.0001); 0052 0053 //! Constructs a point constraint object defined by 0054 //! the intersection point of U and V on the surface Surf. 0055 //! Order gives the order of constraint, one of: 0056 //! - -1 i.e. none, or 0 i.e.G0 when assigned to Pt 0057 //! - -1 i.e. none, 0 i.e. G0, 1 i.e. G1, 2 i.e. G2 when 0058 //! assigned to U, V and Surf. 0059 //! In this constructor the surface to be generated must 0060 //! respect several tolerance values only: 0061 //! - the distance tolerance TolDist 0062 //! - the angular tolerance TolAng 0063 //! - the curvature tolerance, TolCurv. 0064 //! Distance tolerance represents the greatest distance 0065 //! allowed between the constraint and the target surface. 0066 //! Angular tolerance represents the largest angle allowed 0067 //! between the constraint and the target surface. Curvature 0068 //! tolerance represents the greatest difference in curvature 0069 //! allowed between the constraint and the target surface.Creates a punctual constraint. 0070 Standard_EXPORT GeomPlate_PointConstraint(const double U, 0071 const double V, 0072 const occ::handle<Geom_Surface>& Surf, 0073 const int Order, 0074 const double TolDist = 0.0001, 0075 const double TolAng = 0.01, 0076 const double TolCurv = 0.1); 0077 0078 Standard_EXPORT void SetOrder(const int Order); 0079 0080 //! Returns the order of constraint: G0, G1, and G2, 0081 //! controlled respectively by G0Criterion G1Criterion and G2Criterion. 0082 Standard_EXPORT int Order() const; 0083 0084 //! Allows you to set the G0 criterion. This is the law 0085 //! defining the greatest distance allowed between the 0086 //! constraint and the target surface. If this criterion is not 0087 //! set, {TolDist, the distance tolerance from the constructor, is used 0088 Standard_EXPORT void SetG0Criterion(const double TolDist); 0089 0090 //! Allows you to set the G1 criterion. This is the law 0091 //! defining the greatest angle allowed between the 0092 //! constraint and the target surface. If this criterion is not 0093 //! set, TolAng, the angular tolerance from the constructor, is used. 0094 //! Raises ConstructionError if the point is not on the surface 0095 Standard_EXPORT void SetG1Criterion(const double TolAng); 0096 0097 //! Allows you to set the G2 criterion. This is the law 0098 //! defining the greatest difference in curvature allowed 0099 //! between the constraint and the target surface. If this 0100 //! criterion is not set, TolCurv, the curvature tolerance from 0101 //! the constructor, is used. 0102 //! Raises ConstructionError if the point is not on the surface 0103 Standard_EXPORT void SetG2Criterion(const double TolCurv); 0104 0105 //! Returns the G0 criterion. This is the greatest distance 0106 //! allowed between the constraint and the target surface. 0107 Standard_EXPORT double G0Criterion() const; 0108 0109 //! Returns the G1 criterion. This is the greatest angle 0110 //! allowed between the constraint and the target surface. 0111 //! Raises ConstructionError if the point is not on the surface. 0112 Standard_EXPORT double G1Criterion() const; 0113 0114 //! Returns the G2 criterion. This is the greatest difference 0115 //! in curvature allowed between the constraint and the target surface. 0116 //! Raises ConstructionError if the point is not on the surface 0117 Standard_EXPORT double G2Criterion() const; 0118 0119 Standard_EXPORT void D0(gp_Pnt& P) const; 0120 0121 Standard_EXPORT void D1(gp_Pnt& P, gp_Vec& V1, gp_Vec& V2) const; 0122 0123 Standard_EXPORT void D2(gp_Pnt& P, gp_Vec& V1, gp_Vec& V2, gp_Vec& V3, gp_Vec& V4, gp_Vec& V5) 0124 const; 0125 0126 Standard_EXPORT bool HasPnt2dOnSurf() const; 0127 0128 Standard_EXPORT void SetPnt2dOnSurf(const gp_Pnt2d& Pnt); 0129 0130 Standard_EXPORT gp_Pnt2d Pnt2dOnSurf() const; 0131 0132 Standard_EXPORT GeomLProp_SLProps& LPropSurf(); 0133 0134 DEFINE_STANDARD_RTTIEXT(GeomPlate_PointConstraint, Standard_Transient) 0135 0136 protected: 0137 int myOrder; 0138 0139 private: 0140 GeomLProp_SLProps myLProp; 0141 gp_Pnt myPoint; 0142 gp_Pnt2d myPt2d; 0143 occ::handle<Geom_Surface> mySurf; 0144 gp_Vec myD11; 0145 gp_Vec myD12; 0146 gp_Vec myD21; 0147 gp_Vec myD22; 0148 gp_Vec myD23; 0149 double myU; 0150 double myV; 0151 double myTolDist; 0152 double myTolAng; 0153 double myTolCurv; 0154 bool hasPnt2dOnSurf; 0155 }; 0156 0157 #endif // _GeomPlate_PointConstraint_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|