1 -- Created on: 1997-04-14
2 -- Created by: Olga PILLOT
3 -- Copyright (c) 1997-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
24 class MakeLinearForm from BRepFeat inherits RibSlot from BRepFeat
25 ---Purpose: Builds a rib or a groove along a developable, planar surface.
26 -- The semantics of mechanical features is built around
27 -- giving thickness to a contour. This thickness can either
28 -- be symmetrical - on one side of the contour - or
29 -- dissymmetrical - on both sides. As in the semantics of
30 -- form features, the thickness is defined by construction of
31 -- shapes in specific contexts.
32 -- The development contexts differ, however, in case of
33 -- mechanical features. Here they include extrusion:
34 -- - to a limiting face of the basis shape
35 -- - to or from a limiting plane
38 uses Shape from TopoDS,
42 DataMapOfShapeListOfShape from TopTools,
45 DataMapOfShapeShape from TopTools,
46 ListOfShape from TopTools,
47 SequenceOfCurve from TColGeom,
51 StatusError from BRepFeat
53 raises ConstructionError from Standard
60 returns MakeLinearForm from BRepFeat;
61 ---Purpose: initializes the linear form class
64 Create(Sbase : Shape from TopoDS;
67 Direction : Vec from gp;
68 Direction1: Vec from gp;
69 Fuse : Integer from Standard;
70 Modify : Boolean from Standard)
72 ---Purpose: contour W, a shape Sbase and a
73 -- plane P are initialized to serve as the basic
74 -- elements in the construction of the rib or groove.
75 -- Direction and Direction1 give The vectors for
76 -- defining the direction(s) in which thickness will be built up.
77 -- Fuse offers a choice between:
78 -- - removing matter with a Boolean cut using the
79 -- setting 0 in case of the groove
80 -- - adding matter with Boolean fusion using the
81 -- setting 1 in case of the rib.
83 returns MakeLinearForm from BRepFeat;
86 Init(me: in out; Sbase : Shape from TopoDS;
89 Direction : Vec from gp;
90 Direction1: Vec from gp;
91 Fuse : Integer from Standard;
92 Modify : Boolean from Standard)
95 ---Purpose: Initializes this construction algorithm.
96 -- A contour W, a shape Sbase and a plane P are
97 -- initialized to serve as the basic elements in the
98 -- construction of the rib or groove. The vectors for
99 -- defining the direction(s) in which thickness will be built
100 -- up are given by Direction and Direction1.
101 -- Fuse offers a choice between:
102 -- - removing matter with a Boolean cut using the setting
103 -- 0 in case of the groove
104 -- - adding matter with Boolean fusion using the setting 1
105 -- in case of the rib.
107 Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS)
109 ---Purpose: Indicates that the edge <E> will slide on the face
111 -- Raises ConstructionError if the face does not belong to the
112 -- basis shape, or the edge to the prismed shape.
113 raises ConstructionError from Standard
122 ---Purpose: Performs a prism from the wire to the plane along the
123 -- basis shape Sbase. Reconstructs the feature topologically.
125 TransformShapeFU(me: in out; flag: Integer from Standard)
128 ---Purpose: Limits construction of the linear form feature by using
129 -- one of the following three semantics:
130 -- - from a limiting plane
131 -- - to a limiting plane
132 -- - from one limiting plane to another.
133 -- The setting is provided by a flag, flag, which can be set
134 -- to from and/or until. The third semantic possibility above
135 -- is selected by showing both from and until at the same time.
137 Propagate(me: in out; L: in out ListOfShape from TopTools;
139 FPoint, LPoint: Pnt from gp;
140 falseside : in out Boolean from Standard)
141 returns Boolean from Standard
147 myCrv : Curve from Geom;
149 myDir1 : Vec from gp;
150 myPln : Plane from Geom;
151 myBnd : Real from Standard;
152 mySlface : DataMapOfShapeListOfShape from TopTools;
153 myListOfEdges : ListOfShape from TopTools;
154 myTol : Real from Standard;