Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:11

0001 // Created on: 1994-10-03
0002 // Created by: Bruno DUMORTIER
0003 // Copyright (c) 1994-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 _BRepFill_Evolved_HeaderFile
0018 #define _BRepFill_Evolved_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopoDS_Face.hxx>
0024 #include <TopoDS_Wire.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <GeomAbs_JoinType.hxx>
0027 #include <BRepFill_DataMapOfShapeDataMapOfShapeListOfShape.hxx>
0028 #include <TopTools_ListOfShape.hxx>
0029 #include <TopTools_DataMapOfShapeShape.hxx>
0030 class gp_Ax3;
0031 class BRepMAT2d_BisectingLocus;
0032 class BRepMAT2d_LinkTopoBilo;
0033 class BRepTools_Quilt;
0034 class TopLoc_Location;
0035 class TopoDS_Edge;
0036 class TopoDS_Vertex;
0037 
0038 
0039 //! Constructs an evolved volume from a spine (wire or face)
0040 //! and  a profile ( wire).
0041 class BRepFill_Evolved 
0042 {
0043 public:
0044 
0045   DEFINE_STANDARD_ALLOC
0046 
0047   
0048   Standard_EXPORT BRepFill_Evolved();
0049   
0050   //! Creates an evolved shape by sweeping the <Profile>
0051   //! along the  <Spine>.  <AxeProf> is  used to set the
0052   //! position of <Profile> along  <Spine> as  follows:
0053   //! <AxeProf> slides on the profile with direction
0054   //! colinear to the normal to <Spine>, and its
0055   //! <XDirection> mixed with the tangent to <Spine>.
0056   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);
0057   
0058   //! Creates an  evolved shape  by sweeping the <Profile>
0059   //! along the <Spine>
0060   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);
0061   
0062   //! Performs an  evolved shape  by sweeping the <Profile>
0063   //! along the <Spine>
0064   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);
0065   
0066   //! Performs an  evolved shape  by sweeping the <Profile>
0067   //! along the <Spine>
0068   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);
0069   
0070   Standard_EXPORT Standard_Boolean IsDone() const;
0071   
0072   //! returns the generated shape.
0073   Standard_EXPORT const TopoDS_Shape& Shape() const;
0074   
0075   //! Returns   the  shapes  created  from   a  subshape
0076   //! <SpineShape>  of     the  spine   and   a subshape
0077   //! <ProfShape> on the profile.
0078   Standard_EXPORT const TopTools_ListOfShape& GeneratedShapes (const TopoDS_Shape& SpineShape, const TopoDS_Shape& ProfShape) const;
0079   
0080   Standard_EXPORT GeomAbs_JoinType JoinType() const;
0081   
0082   //! Return the face Top if <Solid> is True in the constructor.
0083   Standard_EXPORT const TopoDS_Shape& Top() const;
0084   
0085   //! Return the face Bottom  if <Solid> is True in the constructor.
0086   Standard_EXPORT const TopoDS_Shape& Bottom() const;
0087 
0088 
0089 
0090 
0091 protected:
0092 
0093 
0094 
0095 
0096 
0097 private:
0098 
0099   
0100   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);
0101   
0102   Standard_EXPORT void SetWork (const TopoDS_Face& Spine, const TopoDS_Wire& Profile);
0103   
0104   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);
0105   
0106   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);
0107   
0108   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);
0109   
0110   Standard_EXPORT BRepFill_DataMapOfShapeDataMapOfShapeListOfShape& Generated();
0111   
0112   Standard_EXPORT void Add (BRepFill_Evolved& Vevo, const TopoDS_Wire& Prof, BRepTools_Quilt& Glue);
0113   
0114   Standard_EXPORT TopoDS_Shape& ChangeShape();
0115   
0116   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);
0117   
0118   //! Prepare the profil as follow
0119   //! - Project the profile in the yOz Plane
0120   //! - Cut the profile at the extrema of distance from the
0121   //! Profile to the Oz Axis.
0122   //! - building the new wires with the cutting edges.
0123   Standard_EXPORT void PrepareProfile (TopTools_ListOfShape& WorkProf, TopTools_DataMapOfShapeShape& MapProf) const;
0124   
0125   //! Prepare the spine as follow
0126   //! - Cut the spine-Edges at the extrema of curvature and
0127   //! at the inflexion points.
0128   Standard_EXPORT void PrepareSpine (TopoDS_Face& WorkSpine, TopTools_DataMapOfShapeShape& SpineProf) const;
0129   
0130   Standard_EXPORT void MakePipe (const TopoDS_Edge& SpineEdge, const gp_Ax3& ProfRef);
0131   
0132   Standard_EXPORT void MakeRevol (const TopoDS_Edge& SpineEdge, const TopoDS_Vertex& SpineVertex, const gp_Ax3& ProfRef);
0133   
0134   //! Find the location transforming the planar shape <Shape>
0135   //! in the plane xOy
0136   //! if the Shape is not planar.
0137   Standard_EXPORT TopLoc_Location FindLocation (const TopoDS_Face& Face) const;
0138   
0139   //! Apply the Location <LS> to <mySpine> and  <LP> to
0140   //! <myProfil>
0141   //! in order to set the Shapes in the work space.
0142   Standard_EXPORT void TransformInitWork (const TopLoc_Location& LS, const TopLoc_Location& LP);
0143   
0144   Standard_EXPORT void ContinuityOnOffsetEdge (const TopTools_ListOfShape& WorkProf);
0145   
0146   Standard_EXPORT void AddTopAndBottom (BRepTools_Quilt& Glue);
0147   
0148   Standard_EXPORT void MakeSolid();
0149 
0150 
0151   TopoDS_Face mySpine;
0152   TopoDS_Wire myProfile;
0153   TopoDS_Shape myShape;
0154   Standard_Boolean myIsDone;
0155   Standard_Boolean mySpineType;
0156   GeomAbs_JoinType myJoinType;
0157   BRepFill_DataMapOfShapeDataMapOfShapeListOfShape myMap;
0158   TopoDS_Shape myTop;
0159   TopoDS_Shape myBottom;
0160 
0161 
0162 };
0163 
0164 
0165 
0166 
0167 
0168 
0169 
0170 #endif // _BRepFill_Evolved_HeaderFile