0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRepFill / BRepFill_Evolved.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-10-03
2// Created by: Bruno DUMORTIER
3// Copyright (c) 1994-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepFill_Evolved_HeaderFile
18#define _BRepFill_Evolved_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
42cf5bc1 22
23#include <TopoDS_Face.hxx>
24#include <TopoDS_Wire.hxx>
25#include <TopoDS_Shape.hxx>
42cf5bc1 26#include <GeomAbs_JoinType.hxx>
27#include <BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx>
28#include <TopTools_ListOfShape.hxx>
29#include <TopTools_DataMapOfShapeShape.hxx>
42cf5bc1 30class gp_Ax3;
42cf5bc1 31class BRepMAT2d_BisectingLocus;
32class BRepMAT2d_LinkTopoBilo;
33class BRepTools_Quilt;
34class TopLoc_Location;
35class TopoDS_Edge;
36class TopoDS_Vertex;
37
38
39//! Constructs an evolved volume from a spine (wire or face)
40//! and a profile ( wire).
41class BRepFill_Evolved
42{
43public:
44
45 DEFINE_STANDARD_ALLOC
46
47
48 Standard_EXPORT BRepFill_Evolved();
49
50 //! Creates an evolved shape by sweeping the <Profile>
51 //! along the <Spine>. <AxeProf> is used to set the
52 //! position of <Profile> along <Spine> as follows:
53 //! <AxeProf> slides on the profile with direction
54 //! colinear to the normal to <Spine>, and its
55 //! <XDirection> mixed with the tangent to <Spine>.
56 Standard_EXPORT BRepFill_Evolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
57
58 //! Creates an evolved shape by sweeping the <Profile>
59 //! along the <Spine>
60 Standard_EXPORT BRepFill_Evolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
61
62 //! Performs an evolved shape by sweeping the <Profile>
63 //! along the <Spine>
64 Standard_EXPORT void Perform (const TopoDS_Wire& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
65
66 //! Performs an evolved shape by sweeping the <Profile>
67 //! along the <Spine>
68 Standard_EXPORT void Perform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
69
70 Standard_EXPORT Standard_Boolean IsDone() const;
71
72 //! returns the generated shape.
73 Standard_EXPORT const TopoDS_Shape& Shape() const;
74
75 //! Returns the shapes created from a subshape
76 //! <SpineShape> of the spine and a subshape
77 //! <ProfShape> on the profile.
78 Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const;
79
80 Standard_EXPORT GeomAbs_JoinType JoinType() const;
81
82 //! Return the face Top if <Solid> is True in the constructor.
83 Standard_EXPORT const TopoDS_Shape& Top() const;
84
85 //! Return the face Bottom if <Solid> is True in the constructor.
86 Standard_EXPORT const TopoDS_Shape& Bottom() const;
87
88
89
90
91protected:
92
93
94
95
96
97private:
98
99
100 Standard_EXPORT void PrivatePerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const gp_Ax3& AxeProf, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean Solid = Standard_False);
101
102 Standard_EXPORT void SetWork (const TopoDS_Face& Spine, const TopoDS_Wire& Profile);
103
104 Standard_EXPORT void ElementaryPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
105
106 Standard_EXPORT void PlanarPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
107
108 Standard_EXPORT void VerticalPerform (const TopoDS_Face& Spine, const TopoDS_Wire& Profile, const BRepMAT2d_BisectingLocus& Locus, BRepMAT2d_LinkTopoBilo& Link, const GeomAbs_JoinType Join = GeomAbs_Arc);
109
110 Standard_EXPORT BRepFill_DataMapOfShapeDataMapOfShapeListOfShape& Generated();
111
112 Standard_EXPORT void Add (BRepFill_Evolved& Vevo, const TopoDS_Wire& Prof, BRepTools_Quilt& Glue);
113
114 Standard_EXPORT TopoDS_Shape& ChangeShape();
115
116 Standard_EXPORT void Transfert (BRepFill_Evolved& Vevo, const TopTools_DataMapOfShapeShape& MapProf, const TopTools_DataMapOfShapeShape& MapSpine, const TopLoc_Location& LS, const TopLoc_Location& InitLS, const TopLoc_Location& InitLP);
117
118 //! Prepare the profil as follow
119 //! - Project the profile in the yOz Plane
120 //! - Cut the profile at the extrema of distance from the
121 //! Profile to the Oz Axis.
122 //! - building the new wires with the cutting edges.
123 Standard_EXPORT void PrepareProfile (TopTools_ListOfShape& WorkProf, TopTools_DataMapOfShapeShape& MapProf) const;
124
125 //! Prepare the spine as follow
126 //! - Cut the spine-Edges at the extrema of curvature and
127 //! at the inflexion points.
128 Standard_EXPORT void PrepareSpine (TopoDS_Face& WorkSpine, TopTools_DataMapOfShapeShape& SpineProf) const;
129
130 Standard_EXPORT void MakePipe (const TopoDS_Edge& SpineEdge, const gp_Ax3& ProfRef);
131
132 Standard_EXPORT void MakeRevol (const TopoDS_Edge& SpineEdge, const TopoDS_Vertex& SpineVertex, const gp_Ax3& ProfRef);
133
134 //! Find the location transforming the planar shape <Shape>
135 //! in the plane xOy
136 //! if the Shape is not planar.
137 Standard_EXPORT TopLoc_Location FindLocation (const TopoDS_Face& Face) const;
138
139 //! Apply the Location <LS> to <mySpine> and <LP> to
140 //! <myProfil>
141 //! in order to set the Shapes in the work space.
142 Standard_EXPORT void TransformInitWork (const TopLoc_Location& LS, const TopLoc_Location& LP);
143
144 Standard_EXPORT void ContinuityOnOffsetEdge (const TopTools_ListOfShape& WorkProf);
145
146 Standard_EXPORT void AddTopAndBottom (BRepTools_Quilt& Glue);
147
148 Standard_EXPORT void MakeSolid();
149
150
151 TopoDS_Face mySpine;
152 TopoDS_Wire myProfile;
153 TopoDS_Shape myShape;
154 Standard_Boolean myIsDone;
155 Standard_Boolean mySpineType;
156 GeomAbs_JoinType myJoinType;
157 BRepFill_DataMapOfShapeDataMapOfShapeListOfShape myMap;
158 TopoDS_Shape myTop;
159 TopoDS_Shape myBottom;
160
161
162};
163
164
165
166
167
168
169
170#endif // _BRepFill_Evolved_HeaderFile