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 class MakeLinearForm from BRepFeat inherits RibSlot from BRepFeat
18 ---Purpose: Builds a rib or a groove along a developable, planar surface.
19 -- The semantics of mechanical features is built around
20 -- giving thickness to a contour. This thickness can either
21 -- be symmetrical - on one side of the contour - or
22 -- dissymmetrical - on both sides. As in the semantics of
23 -- form features, the thickness is defined by construction of
24 -- shapes in specific contexts.
25 -- The development contexts differ, however, in case of
26 -- mechanical features. Here they include extrusion:
27 -- - to a limiting face of the basis shape
28 -- - to or from a limiting plane
31 uses Shape from TopoDS,
35 DataMapOfShapeListOfShape from TopTools,
38 DataMapOfShapeShape from TopTools,
39 ListOfShape from TopTools,
40 SequenceOfCurve from TColGeom,
44 StatusError from BRepFeat
46 raises ConstructionError from Standard
53 returns MakeLinearForm from BRepFeat;
54 ---Purpose: initializes the linear form class
57 Create(Sbase : Shape from TopoDS;
60 Direction : Vec from gp;
61 Direction1: Vec from gp;
62 Fuse : Integer from Standard;
63 Modify : Boolean from Standard)
65 ---Purpose: contour W, a shape Sbase and a
66 -- plane P are initialized to serve as the basic
67 -- elements in the construction of the rib or groove.
68 -- Direction and Direction1 give The vectors for
69 -- defining the direction(s) in which thickness will be built up.
70 -- Fuse offers a choice between:
71 -- - removing matter with a Boolean cut using the
72 -- setting 0 in case of the groove
73 -- - adding matter with Boolean fusion using the
74 -- setting 1 in case of the rib.
76 returns MakeLinearForm from BRepFeat;
79 Init(me: in out; Sbase : Shape from TopoDS;
82 Direction : Vec from gp;
83 Direction1: Vec from gp;
84 Fuse : Integer from Standard;
85 Modify : Boolean from Standard)
88 ---Purpose: Initializes this construction algorithm.
89 -- A contour W, a shape Sbase and a plane P are
90 -- initialized to serve as the basic elements in the
91 -- construction of the rib or groove. The vectors for
92 -- defining the direction(s) in which thickness will be built
93 -- up are given by Direction and Direction1.
94 -- Fuse offers a choice between:
95 -- - removing matter with a Boolean cut using the setting
96 -- 0 in case of the groove
97 -- - adding matter with Boolean fusion using the setting 1
98 -- in case of the rib.
100 Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS)
102 ---Purpose: Indicates that the edge <E> will slide on the face
104 -- Raises ConstructionError if the face does not belong to the
105 -- basis shape, or the edge to the prismed shape.
106 raises ConstructionError from Standard
115 ---Purpose: Performs a prism from the wire to the plane along the
116 -- basis shape Sbase. Reconstructs the feature topologically.
118 TransformShapeFU(me: in out; flag: Integer from Standard)
121 ---Purpose: Limits construction of the linear form feature by using
122 -- one of the following three semantics:
123 -- - from a limiting plane
124 -- - to a limiting plane
125 -- - from one limiting plane to another.
126 -- The setting is provided by a flag, flag, which can be set
127 -- to from and/or until. The third semantic possibility above
128 -- is selected by showing both from and until at the same time.
130 Propagate(me: in out; L: in out ListOfShape from TopTools;
132 FPoint, LPoint: Pnt from gp;
133 falseside : in out Boolean from Standard)
134 returns Boolean from Standard
140 myCrv : Curve from Geom;
142 myDir1 : Vec from gp;
143 myPln : Plane from Geom;
144 myBnd : Real from Standard;
145 mySlface : DataMapOfShapeListOfShape from TopTools;
146 myListOfEdges : ListOfShape from TopTools;
147 myTol : Real from Standard;