Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-04-14
0002 // Created by: Olga PILLOT
0003 // Copyright (c) 1997-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 _BRepFeat_MakeLinearForm_HeaderFile
0018 #define _BRepFeat_MakeLinearForm_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <gp_Vec.hxx>
0025 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0026 #include <TopTools_ListOfShape.hxx>
0027 #include <BRepFeat_RibSlot.hxx>
0028 #include <Standard_Integer.hxx>
0029 class Geom_Curve;
0030 class Geom_Plane;
0031 class TopoDS_Shape;
0032 class TopoDS_Wire;
0033 class TopoDS_Edge;
0034 class TopoDS_Face;
0035 class gp_Pnt;
0036 
0037 
0038 //! Builds a rib or a groove along a developable, planar surface.
0039 //! The semantics of mechanical features is built around
0040 //! giving thickness to a contour. This thickness can either
0041 //! be symmetrical - on one side of the contour - or
0042 //! dissymmetrical - on both sides. As in the semantics of
0043 //! form features, the thickness is defined by construction of
0044 //! shapes in specific contexts.
0045 //! The development contexts differ, however, in case of
0046 //! mechanical features. Here they include extrusion:
0047 //! -   to a limiting face of the basis shape
0048 //! -   to or from a limiting plane
0049 //! -   to a height.
0050 class BRepFeat_MakeLinearForm  : public BRepFeat_RibSlot
0051 {
0052 public:
0053 
0054   DEFINE_STANDARD_ALLOC
0055 
0056   
0057   //! initializes the linear form class
0058     BRepFeat_MakeLinearForm();
0059   
0060   //! contour W, a shape Sbase and a
0061   //! plane P are initialized to serve as the basic
0062   //! elements in the construction of the rib or groove.
0063   //! Direction and Direction1 give The vectors for
0064   //! defining the direction(s) in which thickness will be built up.
0065   //! Fuse offers a choice between:
0066   //! -   removing matter with a Boolean cut using the
0067   //! setting 0 in case of the groove
0068   //! -   adding matter with Boolean fusion using the
0069   //! setting 1 in case of the rib.
0070     BRepFeat_MakeLinearForm(const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& P, const gp_Vec& Direction, const gp_Vec& Direction1, const Standard_Integer Fuse, const Standard_Boolean Modify);
0071   
0072   //! Initializes this construction algorithm.
0073   //! A contour W, a shape Sbase and a plane P are
0074   //! initialized to serve as the basic elements in the
0075   //! construction of the rib or groove. The vectors for
0076   //! defining the direction(s) in which thickness will be built
0077   //! up are given by Direction and Direction1.
0078   //! Fuse offers a choice between:
0079   //! -   removing matter with a Boolean cut using the setting
0080   //! 0 in case of the groove
0081   //! -   adding matter with Boolean fusion using the setting 1
0082   //! in case of the rib.
0083   Standard_EXPORT void Init (const TopoDS_Shape& Sbase, const TopoDS_Wire& W, const Handle(Geom_Plane)& P, const gp_Vec& Direction, const gp_Vec& Direction1, const Standard_Integer Fuse, const Standard_Boolean Modify);
0084   
0085   //! Indicates that the edge <E> will slide on the face
0086   //! <OnFace>.
0087   //! Raises ConstructionError if the  face does not belong to the
0088   //! basis shape, or the edge to the prismed shape.
0089   Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace);
0090   
0091   //! Performs a prism from the wire to the plane along the
0092   //! basis shape Sbase. Reconstructs the feature topologically.
0093   Standard_EXPORT void Perform();
0094   
0095   //! Limits construction of the linear form feature by using
0096   //! one of the following three semantics:
0097   //! -   from a limiting plane
0098   //! -   to a limiting plane
0099   //! -   from one limiting plane to another.
0100   //! The setting is provided by a flag, flag, which can be set
0101   //! to from and/or until. The third semantic possibility above
0102   //! is selected by showing both from and until at the same time.
0103   Standard_EXPORT void TransformShapeFU (const Standard_Integer flag);
0104   
0105   Standard_EXPORT Standard_Boolean Propagate (TopTools_ListOfShape& L, const TopoDS_Face& F, const gp_Pnt& FPoint, const gp_Pnt& LPoint, Standard_Boolean& falseside);
0106 
0107 
0108 
0109 
0110 protected:
0111 
0112 
0113 
0114 
0115 
0116 private:
0117 
0118 
0119 
0120   Handle(Geom_Curve) myCrv;
0121   gp_Vec myDir;
0122   gp_Vec myDir1;
0123   Handle(Geom_Plane) myPln;
0124   Standard_Real myBnd;
0125   TopTools_DataMapOfShapeListOfShape mySlface;
0126   TopTools_ListOfShape myListOfEdges;
0127   Standard_Real myTol;
0128 
0129 
0130 };
0131 
0132 
0133 #include <BRepFeat_MakeLinearForm.lxx>
0134 
0135 
0136 
0137 
0138 
0139 #endif // _BRepFeat_MakeLinearForm_HeaderFile