1 -- Created on: 1994-10-03
2 -- Created by: Arnaud BOUZY
3 -- Copyright (c) 1994-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.
19 ---Purpose: Describes Standard Presentations for DsgIHM objects
29 enumeration ArrowSide is AS_NONE,AS_FIRSTAR,AS_LASTAR,AS_BOTHAR,AS_FIRSTPT,AS_LASTPT,AS_BOTHPT,
30 AS_FIRSTAR_LASTPT,AS_FIRSTPT_LASTAR;
31 ---Purpose: Designates how many arrows will be displayed and
32 -- where they will be displayed in presenting a length.
34 class EllipseRadiusPresentation;
36 class LengthPresentation;
38 class RadiusPresentation;
40 class DiameterPresentation;
42 class FilletRadiusPresentation;
44 class AnglePresentation;
46 class Chamf2dPresentation;
48 class ParalPresentation;
50 class PerpenPresentation;
52 class SymmetricPresentation; -- presentation for axial symmetry
54 class MidPointPresentation; -- presentation for equal distance from point
56 class TangentPresentation;
58 class ConcentricPresentation;
60 class FixPresentation;
62 class IdenticPresentation;
64 class EqualRadiusPresentation;
66 class EqualDistancePresentation;
68 class SymbPresentation;
70 class ShapeDirPresentation;
72 class OffsetPresentation;
74 class XYZAxisPresentation;
76 class XYZPlanePresentation;
78 class ShadedPlanePresentation;
82 ComputeSymbol(aPresentation: Presentation from Prs3d;
83 anAspect: DimensionAspect from Prs3d;
85 dir1,dir2: Dir from gp;
86 ArrowSide: ArrowSide from DsgPrs;
87 drawFromCenter: Boolean = Standard_True);
88 ---Purpose: draws symbols ((one or two) arrows,(one or two)points
89 -- at thebeginning and at the end of the dimension
91 ComputePlanarFacesLengthPresentation( FirstArrowLength : Real from Standard;
92 SecondArrowLength : Real from Standard;
93 AttachmentPoint1 : Pnt from gp;
94 AttachmentPoint2 : Pnt from gp;
95 DirAttach : Dir from gp;
96 OffsetPoint : Pnt from gp;
97 PlaneOfFaces : Pln from gp;
98 EndOfArrow1 : out Pnt from gp;
99 EndOfArrow2 : out Pnt from gp;
100 DirOfArrow1 : out Dir from gp );
102 ComputeCurvilinearFacesLengthPresentation( FirstArrowLength : Real from Standard;
103 SecondArrowLength : Real from Standard;
104 SecondSurf : Surface from Geom;
105 AttachmentPoint1 : Pnt from gp;
106 AttachmentPoint2 : Pnt from gp;
107 DirAttach : Dir from gp;
108 EndOfArrow2 : out Pnt from gp;
109 DirOfArrow1 : out Dir from gp;
110 VCurve : out Curve from Geom;
111 UCurve : out Curve from Geom;
112 FirstU : out Real from Standard;
113 deltaU : out Real from Standard;
114 FirstV : out Real from Standard;
115 deltaV : out Real from Standard );
119 ComputeFacesAnglePresentation( ArrowLength : Real from Standard;
120 Value : Real from Standard;
121 CenterPoint : Pnt from gp;
122 AttachmentPoint1 : Pnt from gp;
123 AttachmentPoint2 : Pnt from gp;
126 axisdir : Dir from gp;
127 isPlane : Boolean from Standard;
128 AxisOfSurf : Ax1 from gp;
129 OffsetPoint : Pnt from gp;
130 AngleCirc : out Circ from gp;
131 FirstParAngleCirc : out Real from Standard;
132 LastParAngleCirc : out Real from Standard;
133 EndOfArrow1 : out Pnt from gp;
134 EndOfArrow2 : out Pnt from gp;
135 DirOfArrow1 : out Dir from gp;
136 DirOfArrow2 : out Dir from gp;
137 ProjAttachPoint2 : out Pnt from gp;
138 AttachCirc : out Circ from gp;
139 FirstParAttachCirc : out Real from Standard;
140 LastParAttachCirc : out Real from Standard );
143 ComputeRadiusLine( aCenter : Pnt from gp;
144 anEndOfArrow : Pnt from gp;
145 aPosition : Pnt from gp;
146 drawFromCenter: Boolean from Standard;
147 aRadLineOrign : out Pnt from gp;
148 aRadLineEnd : out Pnt from gp);
150 ComputeFilletRadiusPresentation( ArrowLength : Real from Standard;
151 Value : Real from Standard;
152 Position : Pnt from gp;
153 NormalDir : Dir from gp;
154 FirstPoint : Pnt from gp;
155 SecondPoint : Pnt from gp;
156 Center : Pnt from gp;
157 BasePnt : Pnt from gp;
158 drawRevers : Boolean from Standard;
159 SpecCase : out Boolean from Standard;
160 FilletCirc : out Circ from gp;
161 FirstParCirc : out Real from Standard;
162 LastParCirc : out Real from Standard;
163 EndOfArrow : out Pnt from gp;
164 DirOfArrow : out Dir from gp;
165 DrawPosition : out Pnt from gp );
166 ---Purpose: computes Geometry for fillet radius presentation;
167 -- special case flag SpecCase equal Standard_True if
168 -- radius of fillet circle = 0 or if anngle between
169 -- Vec1(Center, FirstPoint) and Vec2(Center,SecondPoint) equal 0 or PI
171 DistanceFromApex( elips : Elips from gp;
173 par : Real from Standard)
174 returns Real from Standard;
175 ---Purpose: computes length of ellipse arc in parametric units