File indexing completed on 2026-09-12 09:16:51
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepOffsetAPI_ThruSections_HeaderFile
0018 #define _BRepOffsetAPI_ThruSections_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <BRepFill_ThruSectionErrorStatus.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <NCollection_Sequence.hxx>
0027 #include <TopoDS_Face.hxx>
0028 #include <TopTools_ShapeMapHasher.hxx>
0029 #include <NCollection_DataMap.hxx>
0030 #include <Standard_Integer.hxx>
0031 #include <NCollection_List.hxx>
0032 #include <GeomAbs_Shape.hxx>
0033 #include <Approx_ParametrizationType.hxx>
0034 #include <BRepBuilderAPI_MakeShape.hxx>
0035 #include <NCollection_Array1.hxx>
0036 #include <NCollection_Handle.hxx>
0037
0038 class TopoDS_Wire;
0039 class TopoDS_Vertex;
0040 class TopoDS_Shape;
0041 class Geom_BSplineSurface;
0042 class BRepFill_Generator;
0043
0044
0045
0046
0047
0048 class BRepOffsetAPI_ThruSections : public BRepBuilderAPI_MakeShape
0049 {
0050 public:
0051 DEFINE_STANDARD_ALLOC
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065 Standard_EXPORT BRepOffsetAPI_ThruSections(const bool isSolid = false,
0066 const bool ruled = false,
0067 const double pres3d = 1.0e-06);
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081 Standard_EXPORT void Init(const bool isSolid = false,
0082 const bool ruled = false,
0083 const double pres3d = 1.0e-06);
0084
0085
0086
0087
0088 Standard_EXPORT void AddWire(const TopoDS_Wire& wire);
0089
0090
0091
0092
0093
0094
0095 Standard_EXPORT void AddVertex(const TopoDS_Vertex& aVertex);
0096
0097
0098
0099
0100 Standard_EXPORT void CheckCompatibility(const bool check = true);
0101
0102
0103 Standard_EXPORT void SetSmoothing(const bool UseSmoothing);
0104
0105
0106 Standard_EXPORT void SetParType(const Approx_ParametrizationType ParType);
0107
0108
0109 Standard_EXPORT void SetContinuity(const GeomAbs_Shape C);
0110
0111
0112
0113
0114
0115 Standard_EXPORT void SetCriteriumWeight(const double W1, const double W2, const double W3);
0116
0117
0118 Standard_EXPORT void SetMaxDegree(const int MaxDeg);
0119
0120
0121 Standard_EXPORT Approx_ParametrizationType ParType() const;
0122
0123
0124 Standard_EXPORT GeomAbs_Shape Continuity() const;
0125
0126
0127 Standard_EXPORT int MaxDegree() const;
0128
0129
0130 Standard_EXPORT bool UseSmoothing() const;
0131
0132
0133
0134 Standard_EXPORT void CriteriumWeight(double& W1, double& W2, double& W3) const;
0135
0136 Standard_EXPORT void Build(
0137 const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0138
0139
0140 Standard_EXPORT const TopoDS_Shape& FirstShape() const;
0141
0142
0143 Standard_EXPORT const TopoDS_Shape& LastShape() const;
0144
0145
0146
0147
0148
0149
0150 Standard_EXPORT TopoDS_Shape GeneratedFace(const TopoDS_Shape& Edge) const;
0151
0152
0153
0154
0155 Standard_EXPORT void SetMutableInput(const bool theIsMutableInput);
0156
0157
0158
0159
0160
0161 Standard_EXPORT const NCollection_List<TopoDS_Shape>& Generated(const TopoDS_Shape& S) override;
0162
0163
0164 const NCollection_List<TopoDS_Shape>& Wires() const { return myInputWires; }
0165
0166
0167 Standard_EXPORT bool IsMutableInput() const;
0168
0169
0170 BRepFill_ThruSectionErrorStatus GetStatus() const { return myStatus; }
0171
0172 private:
0173 Standard_EXPORT void CreateRuled();
0174
0175 Standard_EXPORT void CreateSmoothed();
0176
0177 Standard_EXPORT occ::handle<Geom_BSplineSurface> TotalSurf(
0178 const NCollection_Array1<TopoDS_Shape>& shapes,
0179 const int NbSect,
0180 const int NbEdges,
0181 const bool w1Point,
0182 const bool w2Point,
0183 const bool vClosed) const;
0184
0185 NCollection_List<TopoDS_Shape> myInputWires;
0186 NCollection_Sequence<TopoDS_Shape> myWires;
0187 NCollection_DataMap<TopoDS_Shape, NCollection_List<int>, TopTools_ShapeMapHasher>
0188 myEdgeNewIndices;
0189 NCollection_DataMap<TopoDS_Shape, int, TopTools_ShapeMapHasher> myVertexIndex;
0190 int myNbEdgesInSection;
0191 bool myIsSolid;
0192 bool myIsRuled;
0193 bool myWCheck;
0194 double myPres3d;
0195 TopoDS_Face myFirst;
0196 TopoDS_Face myLast;
0197 bool myDegen1;
0198 bool myDegen2;
0199 NCollection_DataMap<TopoDS_Shape, TopoDS_Shape, TopTools_ShapeMapHasher> myEdgeFace;
0200 GeomAbs_Shape myContinuity;
0201 Approx_ParametrizationType myParamType;
0202 int myDegMax;
0203 double myCritWeights[3];
0204 bool myUseSmoothing;
0205 bool myMutableInput;
0206 NCollection_Handle<BRepFill_Generator> myBFGenerator;
0207 BRepFill_ThruSectionErrorStatus myStatus;
0208 };
0209
0210 #endif