File indexing completed on 2025-01-18 10:04:55
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ShapeConstruct_ProjectCurveOnSurface_HeaderFile
0018 #define _ShapeConstruct_ProjectCurveOnSurface_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022
0023 #include <Standard_Integer.hxx>
0024 #include <gp_Pnt.hxx>
0025 #include <gp_Pnt2d.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <ShapeExtend_Status.hxx>
0028 #include <GeomAbs_Shape.hxx>
0029 #include <TColStd_Array1OfReal.hxx>
0030 #include <TColgp_HArray1OfPnt2d.hxx>
0031 #include <TColgp_HArray1OfPnt.hxx>
0032 #include <TColgp_SequenceOfPnt.hxx>
0033 #include <TColgp_SequenceOfPnt2d.hxx>
0034 #include <TColStd_SequenceOfReal.hxx>
0035 class ShapeAnalysis_Surface;
0036 class Geom_Surface;
0037 class Geom_Curve;
0038 class Geom2d_Curve;
0039
0040
0041 #ifdef Status
0042 #undef Status
0043 #endif
0044
0045 class ShapeConstruct_ProjectCurveOnSurface;
0046 DEFINE_STANDARD_HANDLE(ShapeConstruct_ProjectCurveOnSurface, Standard_Transient)
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058 class ShapeConstruct_ProjectCurveOnSurface : public Standard_Transient
0059 {
0060
0061 public:
0062
0063
0064
0065 Standard_EXPORT ShapeConstruct_ProjectCurveOnSurface();
0066
0067
0068
0069 Standard_EXPORT virtual void Init (const Handle(Geom_Surface)& surf, const Standard_Real preci);
0070
0071
0072
0073 Standard_EXPORT virtual void Init (const Handle(ShapeAnalysis_Surface)& surf, const Standard_Real preci);
0074
0075
0076 Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& surf);
0077
0078
0079 Standard_EXPORT void SetSurface (const Handle(ShapeAnalysis_Surface)& surf);
0080
0081
0082 Standard_EXPORT void SetPrecision (const Standard_Real preci);
0083
0084
0085
0086
0087 Standard_EXPORT Standard_Boolean& BuildCurveMode();
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100 Standard_EXPORT Standard_Integer& AdjustOverDegenMode();
0101
0102
0103 Standard_EXPORT Standard_Boolean Status (const ShapeExtend_Status theStatus) const;
0104
0105
0106
0107
0108
0109
0110
0111
0112
0113 Standard_EXPORT virtual Standard_Boolean Perform (Handle(Geom_Curve)& c3d,
0114 const Standard_Real First,
0115 const Standard_Real Last,
0116 Handle(Geom2d_Curve)& c2d,
0117 const Standard_Real TolFirst = -1,
0118 const Standard_Real TolLast = -1);
0119
0120
0121
0122
0123
0124
0125
0126
0127
0128
0129 Standard_EXPORT Standard_Boolean PerformByProjLib (Handle(Geom_Curve)& c3d,
0130 const Standard_Real First,
0131 const Standard_Real Last,
0132 Handle(Geom2d_Curve)& c2d,
0133 const GeomAbs_Shape continuity = GeomAbs_C1,
0134 const Standard_Integer maxdeg = 12,
0135 const Standard_Integer nbinterval = -1);
0136
0137
0138
0139 DEFINE_STANDARD_RTTIEXT(ShapeConstruct_ProjectCurveOnSurface,Standard_Transient)
0140
0141 protected:
0142
0143
0144
0145
0146
0147
0148
0149
0150
0151 Standard_EXPORT Handle(Geom2d_Curve) getLine (const TColgp_SequenceOfPnt& points,
0152 const TColStd_SequenceOfReal& params,
0153 TColgp_SequenceOfPnt2d& points2d,
0154 const Standard_Real theTol,
0155 Standard_Boolean& IsRecompute,
0156 Standard_Boolean &isFromCashe) const;
0157
0158 Handle(ShapeAnalysis_Surface) mySurf;
0159 Standard_Real myPreci;
0160 Standard_Boolean myBuild;
0161 Standard_Integer myStatus;
0162 Standard_Integer myAdjustOverDegen;
0163 Standard_Integer myNbCashe;
0164 gp_Pnt myCashe3d[2];
0165 gp_Pnt2d myCashe2d[2];
0166
0167
0168 private:
0169
0170
0171 Standard_EXPORT Handle(Geom2d_Curve) ProjectAnalytic (const Handle(Geom_Curve)& c3d) const;
0172
0173 Standard_EXPORT Standard_Boolean ApproxPCurve (const Standard_Integer nbrPnt,
0174 const Handle(Geom_Curve)& c3d,
0175 const Standard_Real TolFirst,
0176 const Standard_Real TolLast,
0177 TColgp_SequenceOfPnt& points,
0178 TColStd_SequenceOfReal& params,
0179 TColgp_SequenceOfPnt2d& points2d,
0180 Handle(Geom2d_Curve)& c2d);
0181
0182 Standard_EXPORT void CorrectExtremity(const Handle(Geom_Curve)& theC3d,
0183 const TColStd_SequenceOfReal& theParams,
0184 TColgp_SequenceOfPnt2d& thePnt2d,
0185 const Standard_Boolean theIsFirstPoint,
0186 const gp_Pnt2d& thePointOnIsoLine,
0187 const Standard_Boolean theIsUiso);
0188
0189 Standard_EXPORT void InsertAdditionalPointOrAdjust(Standard_Boolean& ToAdjust,
0190 const Standard_Integer theIndCoord,
0191 const Standard_Real Period,
0192 const Standard_Real TolOnPeriod,
0193 Standard_Real& CurCoord,
0194 const Standard_Real prevCoord,
0195 const Handle(Geom_Curve)& c3d,
0196 Standard_Integer& theIndex,
0197 TColgp_SequenceOfPnt& points,
0198 TColStd_SequenceOfReal& params,
0199 TColgp_SequenceOfPnt2d& pnt2d);
0200
0201 Standard_EXPORT Handle(Geom2d_Curve) InterpolatePCurve (const Standard_Integer nbrPnt,
0202 Handle(TColgp_HArray1OfPnt2d)& points2d,
0203 Handle(TColStd_HArray1OfReal)& params,
0204 const Handle(Geom_Curve)& orig) const;
0205
0206 Standard_EXPORT Handle(Geom2d_Curve) ApproximatePCurve (const Standard_Integer nbrPnt, Handle(TColgp_HArray1OfPnt2d)& points2d, Handle(TColStd_HArray1OfReal)& params, const Handle(Geom_Curve)& orig) const;
0207
0208 Standard_EXPORT Handle(Geom_Curve) InterpolateCurve3d (const Standard_Integer nbrPnt, Handle(TColgp_HArray1OfPnt)& points, Handle(TColStd_HArray1OfReal)& params, const Handle(Geom_Curve)& orig) const;
0209
0210 Standard_EXPORT void CheckPoints (Handle(TColgp_HArray1OfPnt)& points, Handle(TColStd_HArray1OfReal)& params, Standard_Real& preci) const;
0211
0212 Standard_EXPORT void CheckPoints2d (Handle(TColgp_HArray1OfPnt2d)& points, Handle(TColStd_HArray1OfReal)& params, Standard_Real& preci) const;
0213
0214 Standard_EXPORT Standard_Boolean IsAnIsoparametric (const Standard_Integer nbrPnt,
0215 const TColgp_SequenceOfPnt& points,
0216 const TColStd_SequenceOfReal& params,
0217 Standard_Boolean& isoTypeU,
0218 Standard_Boolean& p1OnIso,
0219 gp_Pnt2d& valueP1,
0220 Standard_Boolean& p2OnIso,
0221 gp_Pnt2d& valueP2,
0222 Standard_Boolean& isoPar2d3d,
0223 Handle(Geom_Curve)& cIso,
0224 Standard_Real& t1,
0225 Standard_Real& t2,
0226 TColStd_Array1OfReal& pout) const;
0227
0228
0229
0230 };
0231
0232
0233
0234
0235
0236
0237
0238 #endif