0029523: Problem with BRepOffsetAPI_MakeEvolved
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_MakeEvolved.hxx
CommitLineData
42cf5bc1 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
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 _BRepOffsetAPI_MakeEvolved_HeaderFile
18#define _BRepOffsetAPI_MakeEvolved_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <BRepFill_Evolved.hxx>
85843588 25#include <BRepFill_AdvancedEvolved.hxx>
42cf5bc1 26#include <BRepBuilderAPI_MakeShape.hxx>
27#include <GeomAbs_JoinType.hxx>
28#include <Standard_Boolean.hxx>
29#include <Standard_Real.hxx>
30#include <TopTools_ListOfShape.hxx>
31class TopoDS_Wire;
32class TopoDS_Face;
33class BRepFill_Evolved;
34class TopoDS_Shape;
35
36
37//! Describes functions to build evolved shapes.
38//! An evolved shape is built from a planar spine (face or
39//! wire) and a profile (wire). The evolved shape is the
40//! unlooped sweep (pipe) of the profile along the spine.
41//! Self-intersections are removed.
42//! A MakeEvolved object provides a framework for:
43//! - defining the construction of an evolved shape,
44//! - implementing the construction algorithm, and
45//! - consulting the result.
46//! Computes an Evolved by
85843588 47//! 1 - sweeping a profile along a spine.
42cf5bc1 48//! 2 - removing the self-intersections.
49//!
85843588 50//! The Profile is expected to be planar and can be a line
51//! (which lies in infinite number of planes).
52//!
42cf5bc1 53//! The profile is defined in a Referential R. The position of
54//! the profile at the current point of the spine is given by
55//! confusing R and the local referential given by ( D0, D1
85843588 56//! and the normal of the Spine).
42cf5bc1 57//!
85843588 58//! The coordinate system is determined by theIsAxeProf argument:
59//! - if theIsAxeProf is true, R is the global coordinate system,
60//! - if theIsAxeProf is false, R is computed so that:
61//! * its origin is given by the point on the spine which is
62//! closest to the profile,
63//! * its "X Axis" is given by the tangent to the spine at this point, and
64//! * its "Z Axis" is the normal to the plane which contains the spine.
42cf5bc1 65//!
85843588 66//! theJoinType defines the type of pipe generated by the salient
67//! vertices of the spine. The default type is GeomAbs_Arc
68//! where the vertices generate revolved pipes about the
69//! axis passing along the vertex and the normal to the
70//! plane of the spine. At present, this is the only
71//! construction type implemented.
72//!
73//! if <theIsSolid> is TRUE the Shape result is completed to be a
42cf5bc1 74//! solid or a compound of solids.
85843588 75//!
76//! If theIsProfOnSpine == TRUE then the profile must connect with the spine.
77//!
78//! If theIsVolume option is switched on then self-intersections
79//! in the result of Pipe-algorithm will be removed by
80//! BOPAlgo_MakerVolume algorithm. At that the arguments
81//! "theJoinType", "theIsAxeProf", "theIsProfOnSpine" are not used.
82
42cf5bc1 83class BRepOffsetAPI_MakeEvolved : public BRepBuilderAPI_MakeShape
84{
85public:
86
87 DEFINE_STANDARD_ALLOC
88
89
90 Standard_EXPORT BRepOffsetAPI_MakeEvolved();
91
85843588 92 //! Constructs an evolved shape by sweeping the profile
93 //! (theProfile) along the spine (theSpine).
94 //! theSpine can be shape only of type wire or face.
95 //! See description to this class for detailed information.
96 Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Shape& theSpine,
97 const TopoDS_Wire& theProfile,
98 const GeomAbs_JoinType theJoinType = GeomAbs_Arc,
99 const Standard_Boolean theIsAxeProf = Standard_True,
100 const Standard_Boolean theIsSolid = Standard_False,
101 const Standard_Boolean theIsProfOnSpine = Standard_False,
102 const Standard_Real theTol = 0.0000001,
103 const Standard_Boolean theIsVolume = Standard_False,
104 const Standard_Boolean theRunInParallel = Standard_False);
42cf5bc1 105
106 Standard_EXPORT const BRepFill_Evolved& Evolved() const;
107
108 //! Builds the resulting shape (redefined from MakeShape).
109 Standard_EXPORT virtual void Build() Standard_OVERRIDE;
110
111 //! Returns the shapes created from a subshape
112 //! <SpineShape> of the spine and a subshape
113 //! <ProfShape> on the profile.
114 Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const;
115
116 //! Return the face Top if <Solid> is True in the constructor.
117 Standard_EXPORT const TopoDS_Shape& Top() const;
118
119 //! Return the face Bottom if <Solid> is True in the constructor.
120 Standard_EXPORT const TopoDS_Shape& Bottom() const;
121
122
123
124
125protected:
126
127
128
129
130
131private:
132
133
42cf5bc1 134 BRepFill_Evolved myEvolved;
85843588 135 BRepFill_AdvancedEvolved myVolume;
136 Standard_Boolean myIsVolume;
42cf5bc1 137
138};
139
140
141
142
143
144
145
146#endif // _BRepOffsetAPI_MakeEvolved_HeaderFile