1 // Created on: 1995-09-18
2 // Created by: Bruno DUMORTIER
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepOffsetAPI_MakeEvolved_HeaderFile
18 #define _BRepOffsetAPI_MakeEvolved_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <BRepFill_Evolved.hxx>
25 #include <BRepBuilderAPI_MakeShape.hxx>
26 #include <GeomAbs_JoinType.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <Standard_Real.hxx>
29 #include <TopTools_ListOfShape.hxx>
32 class BRepFill_Evolved;
36 //! Describes functions to build evolved shapes.
37 //! An evolved shape is built from a planar spine (face or
38 //! wire) and a profile (wire). The evolved shape is the
39 //! unlooped sweep (pipe) of the profile along the spine.
40 //! Self-intersections are removed.
41 //! A MakeEvolved object provides a framework for:
42 //! - defining the construction of an evolved shape,
43 //! - implementing the construction algorithm, and
44 //! - consulting the result.
45 //! Computes an Evolved by
46 //! 1 - sweeping a profil along a spine.
47 //! 2 - removing the self-intersections.
49 //! The profile is defined in a Referential R. The position of
50 //! the profile at the current point of the spine is given by
51 //! confusing R and the local referential given by ( D0, D1
52 //! and the normal of the Spine)
54 //! If the Boolean <AxeProf> is true, R is O,X,Y,Z
55 //! else R is defined as the local refential at the nearest
56 //! point of the profil to the spine.
58 //! if <Solid> is TRUE the Shape result is completed to be a
59 //! solid or a compound of solids.
60 class BRepOffsetAPI_MakeEvolved : public BRepBuilderAPI_MakeShape
67 Standard_EXPORT BRepOffsetAPI_MakeEvolved();
69 Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Wire& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean AxeProf = Standard_True, const Standard_Boolean Solid = Standard_False, const Standard_Boolean ProfOnSpine = Standard_False, const Standard_Real Tol = 0.0000001);
71 //! These constructors construct an evolved shape by sweeping the profile
72 //! Profile along the spine Spine.
73 //! The profile is defined in a coordinate system R.
74 //! The coordinate system is determined by AxeProf:
75 //! - if AxeProf is true, R is the global coordinate system,
76 //! - if AxeProf is false, R is computed so that:
77 //! - its origin is given by the point on the spine which is
78 //! closest to the profile,
79 //! - its "X Axis" is given by the tangent to the spine at this point, and
80 //! - its "Z Axis" is the normal to the plane which contains the spine.
81 //! The position of the profile at the current point of the
82 //! spine is given by making R coincident with the local
83 //! coordinate system given by the current point, the
84 //! tangent vector and the normal to the spine.
85 //! Join defines the type of pipe generated by the salient
86 //! vertices of the spine. The default type is GeomAbs_Arc
87 //! where the vertices generate revolved pipes about the
88 //! axis passing along the vertex and the normal to the
89 //! plane of the spine. At present, this is the only
90 //! construction type implemented.
91 Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Face& Spine, const TopoDS_Wire& Profil, const GeomAbs_JoinType Join = GeomAbs_Arc, const Standard_Boolean AxeProf = Standard_True, const Standard_Boolean Solid = Standard_False, const Standard_Boolean ProfOnSpine = Standard_False, const Standard_Real Tol = 0.0000001);
93 Standard_EXPORT const BRepFill_Evolved& Evolved() const;
95 //! Builds the resulting shape (redefined from MakeShape).
96 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
98 //! Returns the shapes created from a subshape
99 //! <SpineShape> of the spine and a subshape
100 //! <ProfShape> on the profile.
101 Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const;
103 //! Return the face Top if <Solid> is True in the constructor.
104 Standard_EXPORT const TopoDS_Shape& Top() const;
106 //! Return the face Bottom if <Solid> is True in the constructor.
107 Standard_EXPORT const TopoDS_Shape& Bottom() const;
122 BRepFill_Evolved myEvolved;
133 #endif // _BRepOffsetAPI_MakeEvolved_HeaderFile