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