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
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.
25 ---Purpose: Describes Standard Presentations for DsgIHM objects
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.
40 class EllipseRadiusPresentation;
42 class LengthPresentation;
44 class RadiusPresentation;
46 class DiameterPresentation;
48 class FilletRadiusPresentation;
50 class AnglePresentation;
52 class Chamf2dPresentation;
54 class ParalPresentation;
56 class PerpenPresentation;
58 class SymmetricPresentation; -- presentation for axial symmetry
60 class MidPointPresentation; -- presentation for equal distance from point
62 class TangentPresentation;
64 class ConcentricPresentation;
66 class FixPresentation;
68 class IdenticPresentation;
70 class EqualRadiusPresentation;
72 class EqualDistancePresentation;
74 class SymbPresentation;
76 class ShapeDirPresentation;
78 class OffsetPresentation;
80 class XYZAxisPresentation;
82 class XYZPlanePresentation;
84 class ShadedPlanePresentation;
88 ComputeSymbol(aPresentation: Presentation from Prs3d;
89 anAspect: DimensionAspect from Prs3d;
91 dir1,dir2: Dir from gp;
92 ArrowSide: ArrowSide from DsgPrs;
93 drawFromCenter: Boolean = Standard_True);
94 ---Purpose: draws symbols ((one or two) arrows,(one or two)points
95 -- at thebeginning and at the end of the dimension
97 ComputePlanarFacesLengthPresentation( FirstArrowLength : Real from Standard;
98 SecondArrowLength : Real from Standard;
99 AttachmentPoint1 : Pnt from gp;
100 AttachmentPoint2 : Pnt from gp;
101 DirAttach : Dir from gp;
102 OffsetPoint : Pnt from gp;
103 PlaneOfFaces : Pln from gp;
104 EndOfArrow1 : out Pnt from gp;
105 EndOfArrow2 : out Pnt from gp;
106 DirOfArrow1 : out Dir from gp );
108 ComputeCurvilinearFacesLengthPresentation( FirstArrowLength : Real from Standard;
109 SecondArrowLength : Real from Standard;
110 SecondSurf : Surface from Geom;
111 AttachmentPoint1 : Pnt from gp;
112 AttachmentPoint2 : Pnt from gp;
113 DirAttach : Dir from gp;
114 EndOfArrow2 : out Pnt from gp;
115 DirOfArrow1 : out Dir from gp;
116 VCurve : out Curve from Geom;
117 UCurve : out Curve from Geom;
118 FirstU : out Real from Standard;
119 deltaU : out Real from Standard;
120 FirstV : out Real from Standard;
121 deltaV : out Real from Standard );
125 ComputeFacesAnglePresentation( ArrowLength : Real from Standard;
126 Value : Real from Standard;
127 CenterPoint : Pnt from gp;
128 AttachmentPoint1 : Pnt from gp;
129 AttachmentPoint2 : Pnt from gp;
132 axisdir : Dir from gp;
133 isPlane : Boolean from Standard;
134 AxisOfSurf : Ax1 from gp;
135 OffsetPoint : Pnt from gp;
136 AngleCirc : out Circ from gp;
137 FirstParAngleCirc : out Real from Standard;
138 LastParAngleCirc : out Real from Standard;
139 EndOfArrow1 : out Pnt from gp;
140 EndOfArrow2 : out Pnt from gp;
141 DirOfArrow1 : out Dir from gp;
142 DirOfArrow2 : out Dir from gp;
143 ProjAttachPoint2 : out Pnt from gp;
144 AttachCirc : out Circ from gp;
145 FirstParAttachCirc : out Real from Standard;
146 LastParAttachCirc : out Real from Standard );
149 ComputeRadiusLine( aCenter : Pnt from gp;
150 anEndOfArrow : Pnt from gp;
151 aPosition : Pnt from gp;
152 drawFromCenter: Boolean from Standard;
153 aRadLineOrign : out Pnt from gp;
154 aRadLineEnd : out Pnt from gp);
156 ComputeFilletRadiusPresentation( ArrowLength : Real from Standard;
157 Value : Real from Standard;
158 Position : Pnt from gp;
159 NormalDir : Dir from gp;
160 FirstPoint : Pnt from gp;
161 SecondPoint : Pnt from gp;
162 Center : Pnt from gp;
163 BasePnt : Pnt from gp;
164 drawRevers : Boolean from Standard;
165 SpecCase : out Boolean from Standard;
166 FilletCirc : out Circ from gp;
167 FirstParCirc : out Real from Standard;
168 LastParCirc : out Real from Standard;
169 EndOfArrow : out Pnt from gp;
170 DirOfArrow : out Dir from gp;
171 DrawPosition : out Pnt from gp );
172 ---Purpose: computes Geometry for fillet radius presentation;
173 -- special case flag SpecCase equal Standard_True if
174 -- radius of fillet circle = 0 or if anngle between
175 -- Vec1(Center, FirstPoint) and Vec2(Center,SecondPoint) equal 0 or PI
177 DistanceFromApex( elips : Elips from gp;
179 par : Real from Standard)
180 returns Real from Standard;
181 ---Purpose: computes length of ellipse arc in parametric units