1 // Created on: 1997-04-14
2 // Created by: Olga PILLOT
3 // Copyright (c) 1997-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 _BRepFeat_MakeLinearForm_HeaderFile
18 #define _BRepFeat_MakeLinearForm_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
25 #include <Standard_Real.hxx>
26 #include <TopTools_DataMapOfShapeListOfShape.hxx>
27 #include <TopTools_ListOfShape.hxx>
28 #include <BRepFeat_RibSlot.hxx>
29 #include <Standard_Integer.hxx>
30 #include <Standard_Boolean.hxx>
33 class Standard_ConstructionError;
42 //! Builds a rib or a groove along a developable, planar surface.
43 //! The semantics of mechanical features is built around
44 //! giving thickness to a contour. This thickness can either
45 //! be symmetrical - on one side of the contour - or
46 //! dissymmetrical - on both sides. As in the semantics of
47 //! form features, the thickness is defined by construction of
48 //! shapes in specific contexts.
49 //! The development contexts differ, however, in case of
50 //! mechanical features. Here they include extrusion:
51 //! - to a limiting face of the basis shape
52 //! - to or from a limiting plane
54 class BRepFeat_MakeLinearForm : public BRepFeat_RibSlot
61 //! initializes the linear form class
62 BRepFeat_MakeLinearForm();
64 //! contour W, a shape Sbase and a
65 //! plane P are initialized to serve as the basic
66 //! elements in the construction of the rib or groove.
67 //! Direction and Direction1 give The vectors for
68 //! defining the direction(s) in which thickness will be built up.
69 //! Fuse offers a choice between:
70 //! - removing matter with a Boolean cut using the
71 //! setting 0 in case of the groove
72 //! - adding matter with Boolean fusion using the
73 //! setting 1 in case of the rib.
74 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);
76 //! Initializes this construction algorithm.
77 //! A contour W, a shape Sbase and a plane P are
78 //! initialized to serve as the basic elements in the
79 //! construction of the rib or groove. The vectors for
80 //! defining the direction(s) in which thickness will be built
81 //! up are given by Direction and Direction1.
82 //! Fuse offers a choice between:
83 //! - removing matter with a Boolean cut using the setting
84 //! 0 in case of the groove
85 //! - adding matter with Boolean fusion using the setting 1
86 //! in case of the rib.
87 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);
89 //! Indicates that the edge <E> will slide on the face
91 //! Raises ConstructionError if the face does not belong to the
92 //! basis shape, or the edge to the prismed shape.
93 Standard_EXPORT void Add (const TopoDS_Edge& E, const TopoDS_Face& OnFace);
95 //! Performs a prism from the wire to the plane along the
96 //! basis shape Sbase. Reconstructs the feature topologically.
97 Standard_EXPORT void Perform();
99 //! Limits construction of the linear form feature by using
100 //! one of the following three semantics:
101 //! - from a limiting plane
102 //! - to a limiting plane
103 //! - from one limiting plane to another.
104 //! The setting is provided by a flag, flag, which can be set
105 //! to from and/or until. The third semantic possibility above
106 //! is selected by showing both from and until at the same time.
107 Standard_EXPORT void TransformShapeFU (const Standard_Integer flag);
109 Standard_EXPORT Standard_Boolean Propagate (TopTools_ListOfShape& L, const TopoDS_Face& F, const gp_Pnt& FPoint, const gp_Pnt& LPoint, Standard_Boolean& falseside);
124 Handle(Geom_Curve) myCrv;
127 Handle(Geom_Plane) myPln;
129 TopTools_DataMapOfShapeListOfShape mySlface;
130 TopTools_ListOfShape myListOfEdges;
137 #include <BRepFeat_MakeLinearForm.lxx>
143 #endif // _BRepFeat_MakeLinearForm_HeaderFile