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