Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/BRepOffsetAPI_MakeEvolved.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1995-09-18
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1995-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _BRepOffsetAPI_MakeEvolved_HeaderFile
0018 #define _BRepOffsetAPI_MakeEvolved_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <BRepFill_Evolved.hxx>
0024 #include <BRepFill_AdvancedEvolved.hxx>
0025 #include <BRepBuilderAPI_MakeShape.hxx>
0026 #include <GeomAbs_JoinType.hxx>
0027 #include <TopoDS_Shape.hxx>
0028 #include <NCollection_List.hxx>
0029 class TopoDS_Wire;
0030 class TopoDS_Shape;
0031 
0032 //! Describes functions to build evolved shapes.
0033 //! An evolved shape is built from a planar spine (face or
0034 //! wire) and a profile (wire). The evolved shape is the
0035 //! unlooped sweep (pipe) of the profile along the spine.
0036 //! Self-intersections are removed.
0037 //! A MakeEvolved object provides a framework for:
0038 //! - defining the construction of an evolved shape,
0039 //! - implementing the construction algorithm, and
0040 //! - consulting the result.
0041 //! Computes an Evolved by
0042 //! 1 - sweeping a profile along a spine.
0043 //! 2 - removing the self-intersections.
0044 //!
0045 //! The Profile is expected to be planar and can be a line
0046 //! (which lies in infinite number of planes).
0047 //!
0048 //! The profile is defined in a Referential R. The position of
0049 //! the profile at the current point of the spine is given by
0050 //! confusing R and the local referential given by (D0, D1
0051 //! and the normal of the Spine).
0052 //!
0053 //! The coordinate system is determined by theIsAxeProf argument:
0054 //! - if theIsAxeProf is true, R is the global coordinate system,
0055 //! - if theIsAxeProf is false, R is computed so that:
0056 //!     * its origin is given by the point on the spine which is
0057 //!         closest to the profile,
0058 //!     * its "X Axis" is given by the tangent to the spine at this point, and
0059 //!     * its "Z Axis" is the normal to the plane which contains the spine.
0060 //!
0061 //! theJoinType defines the type of pipe generated by the salient
0062 //! vertices of the spine. The default type is GeomAbs_Arc
0063 //! where the vertices generate revolved pipes about the
0064 //! axis passing along the vertex and the normal to the
0065 //! plane of the spine. At present, this is the only
0066 //! construction type implemented.
0067 //!
0068 //! if <theIsSolid> is TRUE the Shape result is completed to be a
0069 //! solid or a compound of solids.
0070 //!
0071 //! If theIsProfOnSpine == TRUE then the profile must connect with the spine.
0072 //!
0073 //! If theIsVolume option is switched on then self-intersections
0074 //! in the result of Pipe-algorithm will be removed by
0075 //! BOPAlgo_MakerVolume algorithm. At that the arguments
0076 //! "theJoinType", "theIsAxeProf", "theIsProfOnSpine" are not used.
0077 
0078 class BRepOffsetAPI_MakeEvolved : public BRepBuilderAPI_MakeShape
0079 {
0080 public:
0081   DEFINE_STANDARD_ALLOC
0082 
0083   Standard_EXPORT BRepOffsetAPI_MakeEvolved();
0084 
0085   //! Constructs an evolved shape by sweeping the profile
0086   //! (theProfile) along the spine (theSpine).
0087   //! theSpine can be shape only of type wire or face.
0088   //! See description to this class for detailed information.
0089   Standard_EXPORT BRepOffsetAPI_MakeEvolved(const TopoDS_Shape&    theSpine,
0090                                             const TopoDS_Wire&     theProfile,
0091                                             const GeomAbs_JoinType theJoinType      = GeomAbs_Arc,
0092                                             const bool             theIsAxeProf     = true,
0093                                             const bool             theIsSolid       = false,
0094                                             const bool             theIsProfOnSpine = false,
0095                                             const double           theTol           = 0.0000001,
0096                                             const bool             theIsVolume      = false,
0097                                             const bool             theRunInParallel = false);
0098 
0099   Standard_EXPORT const BRepFill_Evolved& Evolved() const;
0100 
0101   //! Builds the resulting shape (redefined from MakeShape).
0102   Standard_EXPORT void Build(
0103     const Message_ProgressRange& theRange = Message_ProgressRange()) override;
0104 
0105   //! Returns the shapes created from a subshape
0106   //! <SpineShape> of the spine and a subshape
0107   //! <ProfShape> on the profile.
0108   Standard_EXPORT const NCollection_List<TopoDS_Shape>& GeneratedShapes(
0109     const TopoDS_Shape& SpineShape,
0110     const TopoDS_Shape& ProfShape) const;
0111 
0112   //! Return the face Top if <Solid> is True in the constructor.
0113   Standard_EXPORT const TopoDS_Shape& Top() const;
0114 
0115   //! Return the face Bottom if <Solid> is True in the constructor.
0116   Standard_EXPORT const TopoDS_Shape& Bottom() const;
0117 
0118 private:
0119   BRepFill_Evolved         myEvolved;
0120   BRepFill_AdvancedEvolved myVolume;
0121   bool                     myIsVolume;
0122 };
0123 
0124 #endif // _BRepOffsetAPI_MakeEvolved_HeaderFile