File indexing completed on 2025-01-18 10:03:21
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _ChFi3d_ChBuilder_HeaderFile
0018 #define _ChFi3d_ChBuilder_HeaderFile
0019
0020 #include <BRepAdaptor_Surface.hxx>
0021 #include <ChFi3d_Builder.hxx>
0022 #include <ChFiDS_ChamfMethod.hxx>
0023 #include <ChFiDS_ChamfMode.hxx>
0024 #include <ChFiDS_SecHArray1.hxx>
0025 #include <ChFiDS_ListOfStripe.hxx>
0026 #include <ChFiDS_SequenceOfSurfData.hxx>
0027 #include <ChFiDS_ElSpine.hxx>
0028 #include <math_Vector.hxx>
0029 #include <TopAbs_Orientation.hxx>
0030 #include <TopAbs_State.hxx>
0031
0032 class TopoDS_Shape;
0033 class TopoDS_Edge;
0034 class TopoDS_Face;
0035 class ChFiDS_SurfData;
0036 class ChFiDS_Spine;
0037 class Adaptor3d_TopolTool;
0038 class TopoDS_Vertex;
0039 class ChFiDS_Stripe;
0040
0041
0042
0043 class ChFi3d_ChBuilder : public ChFi3d_Builder
0044 {
0045 public:
0046
0047 DEFINE_STANDARD_ALLOC
0048
0049
0050
0051
0052 Standard_EXPORT ChFi3d_ChBuilder(const TopoDS_Shape& S, const Standard_Real Ta = 1.0e-2);
0053
0054
0055
0056
0057
0058
0059 Standard_EXPORT void Add (const TopoDS_Edge& E);
0060
0061
0062
0063
0064
0065 Standard_EXPORT void Add (const Standard_Real Dis, const TopoDS_Edge& E);
0066
0067
0068
0069
0070
0071 Standard_EXPORT void SetDist (const Standard_Real Dis,
0072 const Standard_Integer IC,
0073 const TopoDS_Face& F);
0074
0075
0076
0077 Standard_EXPORT void GetDist (const Standard_Integer IC, Standard_Real& Dis) const;
0078
0079
0080
0081
0082
0083 Standard_EXPORT void Add (const Standard_Real Dis1,
0084 const Standard_Real Dis2,
0085 const TopoDS_Edge& E,
0086 const TopoDS_Face& F);
0087
0088
0089
0090
0091
0092 Standard_EXPORT void SetDists (const Standard_Real Dis1,
0093 const Standard_Real Dis2,
0094 const Standard_Integer IC,
0095 const TopoDS_Face& F);
0096
0097
0098
0099 Standard_EXPORT void Dists (const Standard_Integer IC,
0100 Standard_Real& Dis1,
0101 Standard_Real& Dis2) const;
0102
0103
0104
0105
0106
0107 Standard_EXPORT void AddDA (const Standard_Real Dis,
0108 const Standard_Real Angle,
0109 const TopoDS_Edge& E,
0110 const TopoDS_Face& F);
0111
0112
0113
0114
0115
0116 Standard_EXPORT void SetDistAngle (const Standard_Real Dis,
0117 const Standard_Real Angle,
0118 const Standard_Integer IC,
0119 const TopoDS_Face& F);
0120
0121
0122
0123 Standard_EXPORT void GetDistAngle (const Standard_Integer IC,
0124 Standard_Real& Dis,
0125 Standard_Real& Angle) const;
0126
0127
0128 Standard_EXPORT void SetMode (const ChFiDS_ChamfMode theMode);
0129
0130
0131 Standard_EXPORT ChFiDS_ChamfMethod IsChamfer (const Standard_Integer IC) const;
0132
0133
0134 Standard_EXPORT ChFiDS_ChamfMode Mode () const;
0135
0136
0137 Standard_EXPORT void ResetContour (const Standard_Integer IC);
0138
0139 Standard_EXPORT void Simulate (const Standard_Integer IC);
0140
0141 Standard_EXPORT Standard_Integer NbSurf (const Standard_Integer IC) const;
0142
0143 Standard_EXPORT Handle(ChFiDS_SecHArray1) Sect (const Standard_Integer IC,
0144 const Standard_Integer IS) const;
0145
0146 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data,
0147 const Handle(ChFiDS_ElSpine)& Guide,
0148 const Handle(ChFiDS_Spine)& Spine,
0149 const Standard_Integer Choix,
0150 const Handle(BRepAdaptor_Surface)& S1,
0151 const Handle(Adaptor3d_TopolTool)& I1,
0152 const Handle(BRepAdaptor_Curve2d)& PC1,
0153 const Handle(BRepAdaptor_Surface)& Sref1,
0154 const Handle(BRepAdaptor_Curve2d)& PCref1,
0155 Standard_Boolean& Decroch1,
0156 const Handle(BRepAdaptor_Surface)& S2,
0157 const Handle(Adaptor3d_TopolTool)& I2,
0158 const TopAbs_Orientation Or2,
0159 const Standard_Real Fleche,
0160 const Standard_Real TolGuide,
0161 Standard_Real& First,
0162 Standard_Real& Last,
0163 const Standard_Boolean Inside,
0164 const Standard_Boolean Appro,
0165 const Standard_Boolean Forward,
0166 const Standard_Boolean RecP,
0167 const Standard_Boolean RecS,
0168 const Standard_Boolean RecRst,
0169 const math_Vector& Soldep) Standard_OVERRIDE;
0170
0171 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data,
0172 const Handle(ChFiDS_ElSpine)& Guide,
0173 const Handle(ChFiDS_Spine)& Spine,
0174 const Standard_Integer Choix,
0175 const Handle(BRepAdaptor_Surface)& S1,
0176 const Handle(Adaptor3d_TopolTool)& I1,
0177 const TopAbs_Orientation Or1,
0178 const Handle(BRepAdaptor_Surface)& S2,
0179 const Handle(Adaptor3d_TopolTool)& I2,
0180 const Handle(BRepAdaptor_Curve2d)& PC2,
0181 const Handle(BRepAdaptor_Surface)& Sref2,
0182 const Handle(BRepAdaptor_Curve2d)& PCref2,
0183 Standard_Boolean& Decroch2,
0184 const Standard_Real Fleche,
0185 const Standard_Real TolGuide,
0186 Standard_Real& First,
0187 Standard_Real& Last,
0188 const Standard_Boolean Inside,
0189 const Standard_Boolean Appro,
0190 const Standard_Boolean Forward,
0191 const Standard_Boolean RecP,
0192 const Standard_Boolean RecS,
0193 const Standard_Boolean RecRst,
0194 const math_Vector& Soldep) Standard_OVERRIDE;
0195
0196 Standard_EXPORT virtual void SimulSurf (Handle(ChFiDS_SurfData)& Data,
0197 const Handle(ChFiDS_ElSpine)& Guide,
0198 const Handle(ChFiDS_Spine)& Spine,
0199 const Standard_Integer Choix,
0200 const Handle(BRepAdaptor_Surface)& S1,
0201 const Handle(Adaptor3d_TopolTool)& I1,
0202 const Handle(BRepAdaptor_Curve2d)& PC1,
0203 const Handle(BRepAdaptor_Surface)& Sref1,
0204 const Handle(BRepAdaptor_Curve2d)& PCref1,
0205 Standard_Boolean& Decroch1,
0206 const TopAbs_Orientation Or1,
0207 const Handle(BRepAdaptor_Surface)& S2,
0208 const Handle(Adaptor3d_TopolTool)& I2,
0209 const Handle(BRepAdaptor_Curve2d)& PC2,
0210 const Handle(BRepAdaptor_Surface)& Sref2,
0211 const Handle(BRepAdaptor_Curve2d)& PCref2,
0212 Standard_Boolean& Decroch2,
0213 const TopAbs_Orientation Or2,
0214 const Standard_Real Fleche,
0215 const Standard_Real TolGuide,
0216 Standard_Real& First,
0217 Standard_Real& Last,
0218 const Standard_Boolean Inside,
0219 const Standard_Boolean Appro,
0220 const Standard_Boolean Forward,
0221 const Standard_Boolean RecP1,
0222 const Standard_Boolean RecRst1,
0223 const Standard_Boolean RecP2,
0224 const Standard_Boolean RecRst2,
0225 const math_Vector& Soldep) Standard_OVERRIDE;
0226
0227
0228
0229
0230 Standard_EXPORT virtual Standard_Boolean PerformSurf (ChFiDS_SequenceOfSurfData& Data,
0231 const Handle(ChFiDS_ElSpine)& Guide,
0232 const Handle(ChFiDS_Spine)& Spine,
0233 const Standard_Integer Choix,
0234 const Handle(BRepAdaptor_Surface)& S1,
0235 const Handle(Adaptor3d_TopolTool)& I1,
0236 const Handle(BRepAdaptor_Surface)& S2,
0237 const Handle(Adaptor3d_TopolTool)& I2,
0238 const Standard_Real MaxStep,
0239 const Standard_Real Fleche,
0240 const Standard_Real TolGuide,
0241 Standard_Real& First,
0242 Standard_Real& Last,
0243 const Standard_Boolean Inside,
0244 const Standard_Boolean Appro,
0245 const Standard_Boolean Forward,
0246 const Standard_Boolean RecOnS1,
0247 const Standard_Boolean RecOnS2,
0248 const math_Vector& Soldep,
0249 Standard_Integer& Intf,
0250 Standard_Integer& Intl) Standard_OVERRIDE;
0251
0252
0253
0254
0255 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data,
0256 const Handle(ChFiDS_ElSpine)& Guide,
0257 const Handle(ChFiDS_Spine)& Spine,
0258 const Standard_Integer Choix,
0259 const Handle(BRepAdaptor_Surface)& S1,
0260 const Handle(Adaptor3d_TopolTool)& I1,
0261 const Handle(BRepAdaptor_Curve2d)& PC1,
0262 const Handle(BRepAdaptor_Surface)& Sref1,
0263 const Handle(BRepAdaptor_Curve2d)& PCref1,
0264 Standard_Boolean& Decroch1,
0265 const Handle(BRepAdaptor_Surface)& S2,
0266 const Handle(Adaptor3d_TopolTool)& I2,
0267 const TopAbs_Orientation Or2,
0268 const Standard_Real MaxStep,
0269 const Standard_Real Fleche,
0270 const Standard_Real TolGuide,
0271 Standard_Real& First,
0272 Standard_Real& Last,
0273 const Standard_Boolean Inside,
0274 const Standard_Boolean Appro,
0275 const Standard_Boolean Forward,
0276 const Standard_Boolean RecP,
0277 const Standard_Boolean RecS,
0278 const Standard_Boolean RecRst,
0279 const math_Vector& Soldep) Standard_OVERRIDE;
0280
0281
0282
0283
0284 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data,
0285 const Handle(ChFiDS_ElSpine)& Guide,
0286 const Handle(ChFiDS_Spine)& Spine,
0287 const Standard_Integer Choix,
0288 const Handle(BRepAdaptor_Surface)& S1,
0289 const Handle(Adaptor3d_TopolTool)& I1,
0290 const TopAbs_Orientation Or1,
0291 const Handle(BRepAdaptor_Surface)& S2,
0292 const Handle(Adaptor3d_TopolTool)& I2,
0293 const Handle(BRepAdaptor_Curve2d)& PC2,
0294 const Handle(BRepAdaptor_Surface)& Sref2,
0295 const Handle(BRepAdaptor_Curve2d)& PCref2,
0296 Standard_Boolean& Decroch2,
0297 const Standard_Real MaxStep,
0298 const Standard_Real Fleche,
0299 const Standard_Real TolGuide,
0300 Standard_Real& First,
0301 Standard_Real& Last,
0302 const Standard_Boolean Inside,
0303 const Standard_Boolean Appro,
0304 const Standard_Boolean Forward,
0305 const Standard_Boolean RecP,
0306 const Standard_Boolean RecS,
0307 const Standard_Boolean RecRst,
0308 const math_Vector& Soldep) Standard_OVERRIDE;
0309
0310
0311
0312
0313 Standard_EXPORT virtual void PerformSurf (ChFiDS_SequenceOfSurfData& Data,
0314 const Handle(ChFiDS_ElSpine)& Guide,
0315 const Handle(ChFiDS_Spine)& Spine,
0316 const Standard_Integer Choix,
0317 const Handle(BRepAdaptor_Surface)& S1,
0318 const Handle(Adaptor3d_TopolTool)& I1,
0319 const Handle(BRepAdaptor_Curve2d)& PC1,
0320 const Handle(BRepAdaptor_Surface)& Sref1,
0321 const Handle(BRepAdaptor_Curve2d)& PCref1,
0322 Standard_Boolean& Decroch1,
0323 const TopAbs_Orientation Or1,
0324 const Handle(BRepAdaptor_Surface)& S2,
0325 const Handle(Adaptor3d_TopolTool)& I2,
0326 const Handle(BRepAdaptor_Curve2d)& PC2,
0327 const Handle(BRepAdaptor_Surface)& Sref2,
0328 const Handle(BRepAdaptor_Curve2d)& PCref2,
0329 Standard_Boolean& Decroch2,
0330 const TopAbs_Orientation Or2,
0331 const Standard_Real MaxStep,
0332 const Standard_Real Fleche,
0333 const Standard_Real TolGuide,
0334 Standard_Real& First,
0335 Standard_Real& Last,
0336 const Standard_Boolean Inside,
0337 const Standard_Boolean Appro,
0338 const Standard_Boolean Forward,
0339 const Standard_Boolean RecP1,
0340 const Standard_Boolean RecRst1,
0341 const Standard_Boolean RecP2,
0342 const Standard_Boolean RecRst2,
0343 const math_Vector& Soldep) Standard_OVERRIDE;
0344
0345
0346
0347
0348 protected:
0349
0350
0351 Standard_EXPORT void SimulKPart (const Handle(ChFiDS_SurfData)& SD) const Standard_OVERRIDE;
0352
0353 Standard_EXPORT Standard_Boolean SimulSurf (Handle(ChFiDS_SurfData)& Data,
0354 const Handle(ChFiDS_ElSpine)& Guide,
0355 const Handle(ChFiDS_Spine)& Spine,
0356 const Standard_Integer Choix,
0357 const Handle(BRepAdaptor_Surface)& S1,
0358 const Handle(Adaptor3d_TopolTool)& I1,
0359 const Handle(BRepAdaptor_Surface)& S2,
0360 const Handle(Adaptor3d_TopolTool)& I2,
0361 const Standard_Real TolGuide,
0362 Standard_Real& First,
0363 Standard_Real& Last,
0364 const Standard_Boolean Inside,
0365 const Standard_Boolean Appro,
0366 const Standard_Boolean Forward,
0367 const Standard_Boolean RecOnS1,
0368 const Standard_Boolean RecOnS2,
0369 const math_Vector& Soldep,
0370 Standard_Integer& Intf,
0371 Standard_Integer& Intl) Standard_OVERRIDE;
0372
0373 Standard_EXPORT Standard_Boolean PerformFirstSection (const Handle(ChFiDS_Spine)& S,
0374 const Handle(ChFiDS_ElSpine)& HGuide,
0375 const Standard_Integer Choix,
0376 Handle(BRepAdaptor_Surface)& S1,
0377 Handle(BRepAdaptor_Surface)& S2,
0378 const Handle(Adaptor3d_TopolTool)& I1,
0379 const Handle(Adaptor3d_TopolTool)& I2,
0380 const Standard_Real Par,
0381 math_Vector& SolDep,
0382 TopAbs_State& Pos1,
0383 TopAbs_State& Pos2) const Standard_OVERRIDE;
0384
0385
0386
0387 Standard_EXPORT void PerformTwoCorner (const Standard_Integer Index) Standard_OVERRIDE;
0388
0389
0390
0391 Standard_EXPORT void PerformThreeCorner (const Standard_Integer Index) Standard_OVERRIDE;
0392
0393
0394
0395 Standard_EXPORT void ExtentOneCorner (const TopoDS_Vertex& V,
0396 const Handle(ChFiDS_Stripe)& S) Standard_OVERRIDE;
0397
0398
0399
0400 Standard_EXPORT void ExtentTwoCorner (const TopoDS_Vertex& V,
0401 const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
0402
0403
0404
0405 Standard_EXPORT void ExtentThreeCorner (const TopoDS_Vertex& V,
0406 const ChFiDS_ListOfStripe& LS) Standard_OVERRIDE;
0407
0408
0409 Standard_EXPORT void SetRegul() Standard_OVERRIDE;
0410
0411
0412
0413
0414 private:
0415
0416
0417 Standard_EXPORT void ConexFaces (const Handle(ChFiDS_Spine)& Sp,
0418 const Standard_Integer IEdge,
0419 TopoDS_Face& F1,
0420 TopoDS_Face& F2) const;
0421
0422 ChFiDS_ChamfMode myMode;
0423
0424
0425 };
0426
0427
0428
0429
0430
0431
0432
0433 #endif