b311480e |
1 | -- Created on: 1994-10-03 |
2 | -- Created by: Arnaud BOUZY |
3 | -- Copyright (c) 1994-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 | package DsgPrs |
24 | |
25 | ---Purpose: Describes Standard Presentations for DsgIHM objects |
26 | |
27 | uses Prs3d, |
28 | gp, |
29 | TCollection, |
30 | TopoDS, |
31 | Quantity, |
32 | Geom |
33 | |
34 | is |
35 | enumeration ArrowSide is AS_NONE,AS_FIRSTAR,AS_LASTAR,AS_BOTHAR,AS_FIRSTPT,AS_LASTPT,AS_BOTHPT, |
36 | AS_FIRSTAR_LASTPT,AS_FIRSTPT_LASTAR; |
37 | ---Purpose: Designates how many arrows will be displayed and |
38 | -- where they will be displayed in presenting a length. |
39 | |
40 | class EllipseRadiusPresentation; |
41 | |
42 | class LengthPresentation; |
43 | |
44 | class RadiusPresentation; |
45 | |
46 | class DiameterPresentation; |
47 | |
48 | class FilletRadiusPresentation; |
49 | |
50 | class AnglePresentation; |
51 | |
52 | class Chamf2dPresentation; |
53 | |
54 | class ParalPresentation; |
55 | |
56 | class PerpenPresentation; |
57 | |
58 | class SymmetricPresentation; -- presentation for axial symmetry |
59 | |
60 | class MidPointPresentation; -- presentation for equal distance from point |
61 | |
62 | class TangentPresentation; |
63 | |
64 | class ConcentricPresentation; |
65 | |
66 | class FixPresentation; |
67 | |
68 | class IdenticPresentation; |
69 | |
70 | class EqualRadiusPresentation; |
71 | |
72 | class EqualDistancePresentation; |
73 | |
74 | class SymbPresentation; |
75 | |
76 | class ShapeDirPresentation; |
77 | |
78 | class OffsetPresentation; |
79 | |
80 | class DatumTool; |
81 | |
82 | class DatumPrs instantiates Datum from Prs3d(Ax2 from gp, |
83 | DatumTool from DsgPrs); |
84 | class XYZAxisPresentation; |
85 | |
86 | class XYZPlanePresentation; |
87 | |
88 | class ShadedPlanePresentation; |
89 | |
90 | ComputeSymbol(aPresentation: Presentation from Prs3d; |
91 | anAspect: AngleAspect from Prs3d; |
92 | pt1,pt2:Pnt from gp; |
93 | dir1,dir2: Dir from gp; |
94 | ArrowSide: ArrowSide from DsgPrs); |
95 | ---Purpose: draws symbols ((one or two) arrows,(one or two)points |
96 | -- at thebeginning and at the end of the dimension |
97 | |
98 | ComputeSymbol(aPresentation: Presentation from Prs3d; |
99 | anAspect: LengthAspect from Prs3d; |
100 | pt1,pt2:Pnt from gp; |
101 | dir1,dir2: Dir from gp; |
102 | ArrowSide: ArrowSide from DsgPrs; |
103 | drawFromCenter: Boolean = Standard_True); |
104 | ---Purpose: draws symbols ((one or two) arrows,(one or two)points |
105 | -- at thebeginning and at the end of the dimension |
106 | |
107 | ComputePlanarFacesLengthPresentation( FirstArrowLength : Real from Standard; |
108 | SecondArrowLength : Real from Standard; |
109 | AttachmentPoint1 : Pnt from gp; |
110 | AttachmentPoint2 : Pnt from gp; |
111 | DirAttach : Dir from gp; |
112 | OffsetPoint : Pnt from gp; |
113 | PlaneOfFaces : Pln from gp; |
114 | EndOfArrow1 : out Pnt from gp; |
115 | EndOfArrow2 : out Pnt from gp; |
116 | DirOfArrow1 : out Dir from gp ); |
117 | |
118 | ComputeCurvilinearFacesLengthPresentation( FirstArrowLength : Real from Standard; |
119 | SecondArrowLength : Real from Standard; |
120 | SecondSurf : Surface from Geom; |
121 | AttachmentPoint1 : Pnt from gp; |
122 | AttachmentPoint2 : Pnt from gp; |
123 | DirAttach : Dir from gp; |
124 | EndOfArrow2 : out Pnt from gp; |
125 | DirOfArrow1 : out Dir from gp; |
126 | VCurve : out Curve from Geom; |
127 | UCurve : out Curve from Geom; |
128 | FirstU : out Real from Standard; |
129 | deltaU : out Real from Standard; |
130 | FirstV : out Real from Standard; |
131 | deltaV : out Real from Standard ); |
132 | |
133 | |
134 | |
135 | ComputeFacesAnglePresentation( ArrowLength : Real from Standard; |
136 | Value : Real from Standard; |
137 | CenterPoint : Pnt from gp; |
138 | AttachmentPoint1 : Pnt from gp; |
139 | AttachmentPoint2 : Pnt from gp; |
140 | dir1 : Dir from gp; |
141 | dir2 : Dir from gp; |
142 | axisdir : Dir from gp; |
143 | isPlane : Boolean from Standard; |
144 | AxisOfSurf : Ax1 from gp; |
145 | OffsetPoint : Pnt from gp; |
146 | AngleCirc : out Circ from gp; |
147 | FirstParAngleCirc : out Real from Standard; |
148 | LastParAngleCirc : out Real from Standard; |
149 | EndOfArrow1 : out Pnt from gp; |
150 | EndOfArrow2 : out Pnt from gp; |
151 | DirOfArrow1 : out Dir from gp; |
152 | DirOfArrow2 : out Dir from gp; |
153 | ProjAttachPoint2 : out Pnt from gp; |
154 | AttachCirc : out Circ from gp; |
155 | FirstParAttachCirc : out Real from Standard; |
156 | LastParAttachCirc : out Real from Standard ); |
157 | |
158 | |
159 | ComputeRadiusLine( aCenter : Pnt from gp; |
160 | anEndOfArrow : Pnt from gp; |
161 | aPosition : Pnt from gp; |
162 | drawFromCenter: Boolean from Standard; |
163 | aRadLineOrign : out Pnt from gp; |
164 | aRadLineEnd : out Pnt from gp); |
165 | |
166 | ComputeFilletRadiusPresentation( ArrowLength : Real from Standard; |
167 | Value : Real from Standard; |
168 | Position : Pnt from gp; |
169 | NormalDir : Dir from gp; |
170 | FirstPoint : Pnt from gp; |
171 | SecondPoint : Pnt from gp; |
172 | Center : Pnt from gp; |
173 | BasePnt : Pnt from gp; |
174 | drawRevers : Boolean from Standard; |
175 | SpecCase : out Boolean from Standard; |
176 | FilletCirc : out Circ from gp; |
177 | FirstParCirc : out Real from Standard; |
178 | LastParCirc : out Real from Standard; |
179 | EndOfArrow : out Pnt from gp; |
180 | DirOfArrow : out Dir from gp; |
181 | DrawPosition : out Pnt from gp ); |
182 | ---Purpose: computes Geometry for fillet radius presentation; |
183 | -- special case flag SpecCase equal Standard_True if |
184 | -- radius of fillet circle = 0 or if anngle between |
185 | -- Vec1(Center, FirstPoint) and Vec2(Center,SecondPoint) equal 0 or PI |
186 | |
187 | |
188 | DistanceFromApex( elips : Elips from gp; |
189 | Apex : Pnt from gp; |
190 | par : Real from Standard) |
191 | returns Real from Standard; |
192 | ---Purpose: computes length of ellipse arc in parametric units |
193 | |
194 | end DsgPrs; |
195 | |