b311480e |
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 |
5 | -- |
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. |
10 | -- |
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. |
13 | -- |
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. |
20 | |
7fd59977 |
21 | |
22 | |
23 | |
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 |
36 | -- - to a height. |
37 | |
38 | uses Shape from TopoDS, |
39 | Face from TopoDS, |
40 | Wire from TopoDS, |
41 | Edge from TopoDS, |
42 | DataMapOfShapeListOfShape from TopTools, |
43 | Dir from gp, |
44 | Vec from gp, |
45 | DataMapOfShapeShape from TopTools, |
46 | ListOfShape from TopTools, |
47 | SequenceOfCurve from TColGeom, |
48 | Curve from Geom, |
49 | Plane from Geom, |
50 | Pnt from gp, |
51 | StatusError from BRepFeat |
52 | |
53 | raises ConstructionError from Standard |
54 | |
55 | is |
56 | |
57 | |
58 | Create |
59 | |
60 | returns MakeLinearForm from BRepFeat; |
61 | ---Purpose: initializes the linear form class |
62 | ---C++: inline |
63 | |
64 | Create(Sbase : Shape from TopoDS; |
65 | W : Wire from TopoDS; |
66 | P : Plane from Geom; |
67 | Direction : Vec from gp; |
68 | Direction1: Vec from gp; |
69 | Fuse : Integer from Standard; |
70 | Modify : Boolean from Standard) |
71 | |
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. |
82 | ---C++: inline |
83 | returns MakeLinearForm from BRepFeat; |
84 | |
85 | |
86 | Init(me: in out; Sbase : Shape from TopoDS; |
87 | W : Wire from TopoDS; |
88 | P : Plane from Geom; |
89 | Direction : Vec from gp; |
90 | Direction1: Vec from gp; |
91 | Fuse : Integer from Standard; |
92 | Modify : Boolean from Standard) |
93 | |
94 | is static; |
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. |
106 | |
107 | Add(me: in out; E: Edge from TopoDS; OnFace: Face from TopoDS) |
108 | |
109 | ---Purpose: Indicates that the edge <E> will slide on the face |
110 | -- <OnFace>. |
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 |
114 | |
115 | is static; |
116 | |
117 | |
118 | |
119 | Perform(me: in out) |
120 | |
121 | is static; |
122 | ---Purpose: Performs a prism from the wire to the plane along the |
123 | -- basis shape Sbase. Reconstructs the feature topologically. |
124 | |
125 | TransformShapeFU(me: in out; flag: Integer from Standard) |
126 | |
127 | is static; |
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. |
136 | |
137 | Propagate(me: in out; L: in out ListOfShape from TopTools; |
138 | F: Face from TopoDS; |
139 | FPoint, LPoint: Pnt from gp; |
140 | falseside : in out Boolean from Standard) |
141 | returns Boolean from Standard |
142 | is static; |
143 | |
144 | |
145 | fields |
146 | |
147 | myCrv : Curve from Geom; |
148 | myDir : Vec from gp; |
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; |
155 | |
156 | end MakeLinearForm; |
157 | |
158 | |
159 | |