File indexing completed on 2026-10-28 09:17:08
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _IntPolyh_Intersection_HeaderFile
0018 #define _IntPolyh_Intersection_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntPolyh_ArrayOfPointNormal.hxx>
0022 #include <IntPolyh_ArrayOfSectionLines.hxx>
0023 #include <IntPolyh_ArrayOfTangentZones.hxx>
0024 #include <NCollection_List.hxx>
0025 #include <IntPolyh_Couple.hxx>
0026 #include <IntPolyh_PMaillageAffinage.hxx>
0027 #include <NCollection_Array1.hxx>
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 class IntPolyh_Intersection
0045 {
0046 public:
0047 DEFINE_STANDARD_ALLOC
0048
0049 public:
0050
0051
0052 Standard_EXPORT IntPolyh_Intersection(const occ::handle<Adaptor3d_Surface>& theS1,
0053 const occ::handle<Adaptor3d_Surface>& theS2);
0054
0055
0056
0057
0058
0059
0060 Standard_EXPORT IntPolyh_Intersection(const occ::handle<Adaptor3d_Surface>& theS1,
0061 const int theNbSU1,
0062 const int theNbSV1,
0063 const occ::handle<Adaptor3d_Surface>& theS2,
0064 const int theNbSU2,
0065 const int theNbSV2);
0066
0067
0068
0069 Standard_EXPORT IntPolyh_Intersection(const occ::handle<Adaptor3d_Surface>& theS1,
0070 const NCollection_Array1<double>& theUPars1,
0071 const NCollection_Array1<double>& theVPars1,
0072 const occ::handle<Adaptor3d_Surface>& theS2,
0073 const NCollection_Array1<double>& theUPars2,
0074 const NCollection_Array1<double>& theVPars2);
0075
0076 public:
0077
0078 bool IsDone() const { return myIsDone; }
0079
0080
0081 bool IsParallel() const { return myIsParallel; }
0082
0083
0084 int NbSectionLines() const { return mySectionLines.NbItems(); }
0085
0086
0087 int NbPointsInLine(const int IndexLine) const
0088 {
0089 return mySectionLines[IndexLine - 1].NbStartPoints();
0090 }
0091
0092
0093 int NbTangentZones() const { return myTangentZones.NbItems(); }
0094
0095
0096 int NbPointsInTangentZone(const int) const { return 1; }
0097
0098
0099 Standard_EXPORT void GetLinePoint(const int IndexLine,
0100 const int IndexPoint,
0101 double& x,
0102 double& y,
0103 double& z,
0104 double& u1,
0105 double& v1,
0106 double& u2,
0107 double& v2,
0108 double& incidence) const;
0109
0110
0111 Standard_EXPORT void GetTangentZonePoint(const int IndexLine,
0112 const int IndexPoint,
0113 double& x,
0114 double& y,
0115 double& z,
0116 double& u1,
0117 double& v1,
0118 double& u2,
0119 double& v2) const;
0120
0121 private:
0122
0123 Standard_EXPORT void Perform();
0124
0125
0126 Standard_EXPORT void Perform(const NCollection_Array1<double>& theUPars1,
0127 const NCollection_Array1<double>& theVPars1,
0128 const NCollection_Array1<double>& theUPars2,
0129 const NCollection_Array1<double>& theVPars2);
0130
0131
0132 Standard_EXPORT bool PerformStd(const NCollection_Array1<double>& theUPars1,
0133 const NCollection_Array1<double>& theVPars1,
0134 const NCollection_Array1<double>& theUPars2,
0135 const NCollection_Array1<double>& theVPars2,
0136 const double theDeflTol1,
0137 const double theDeflTol2,
0138 IntPolyh_PMaillageAffinage& theMaillageS,
0139 int& theNbCouples);
0140
0141
0142
0143 Standard_EXPORT bool PerformAdv(const NCollection_Array1<double>& theUPars1,
0144 const NCollection_Array1<double>& theVPars1,
0145 const NCollection_Array1<double>& theUPars2,
0146 const NCollection_Array1<double>& theVPars2,
0147 const double theDeflTol1,
0148 const double theDeflTol2,
0149 IntPolyh_PMaillageAffinage& theMaillageFF,
0150 IntPolyh_PMaillageAffinage& theMaillageFR,
0151 IntPolyh_PMaillageAffinage& theMaillageRF,
0152 IntPolyh_PMaillageAffinage& theMaillageRR,
0153 int& theNbCouples);
0154
0155
0156 Standard_EXPORT bool PerformMaillage(const NCollection_Array1<double>& theUPars1,
0157 const NCollection_Array1<double>& theVPars1,
0158 const NCollection_Array1<double>& theUPars2,
0159 const NCollection_Array1<double>& theVPars2,
0160 const double theDeflTol1,
0161 const double theDeflTol2,
0162 IntPolyh_PMaillageAffinage& theMaillage);
0163
0164
0165 Standard_EXPORT bool PerformMaillage(const NCollection_Array1<double>& theUPars1,
0166 const NCollection_Array1<double>& theVPars1,
0167 const NCollection_Array1<double>& theUPars2,
0168 const NCollection_Array1<double>& theVPars2,
0169 const double theDeflTol1,
0170 const double theDeflTol2,
0171 const IntPolyh_ArrayOfPointNormal& thePoints1,
0172 const IntPolyh_ArrayOfPointNormal& thePoints2,
0173 const bool theIsFirstFwd,
0174 const bool theIsSecondFwd,
0175 IntPolyh_PMaillageAffinage& theMaillage);
0176
0177
0178 Standard_EXPORT void MergeCouples(NCollection_List<IntPolyh_Couple>& theArrayFF,
0179 NCollection_List<IntPolyh_Couple>& theArrayFR,
0180 NCollection_List<IntPolyh_Couple>& theArrayRF,
0181 NCollection_List<IntPolyh_Couple>& theArrayRR) const;
0182
0183 bool AnalyzeIntersection(IntPolyh_PMaillageAffinage& theMaillage);
0184 bool IsAdvRequired(IntPolyh_PMaillageAffinage& theMaillage);
0185
0186 private:
0187
0188 occ::handle<Adaptor3d_Surface> mySurf1;
0189 occ::handle<Adaptor3d_Surface> mySurf2;
0190
0191 int myNbSU1;
0192 int myNbSV1;
0193 int myNbSU2;
0194 int myNbSV2;
0195
0196
0197 bool myIsDone;
0198 IntPolyh_ArrayOfSectionLines mySectionLines;
0199 IntPolyh_ArrayOfTangentZones myTangentZones;
0200 bool myIsParallel;
0201 };
0202
0203 #endif