0024133: Development of improvement of dimensions implementation; new length, radius...
[occt.git] / src / DsgPrs / DsgPrs.cdl
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
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 XYZAxisPresentation;
81
82     class XYZPlanePresentation;
83
84     class ShadedPlanePresentation;
85     
86     imported DatumPrs; 
87
88     ComputeSymbol(aPresentation: Presentation from Prs3d;
89                   anAspect: DimensionAspect from Prs3d;
90                   pt1,pt2:Pnt from gp;
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
96
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 );
107
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 );
122                                                
123
124
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;
130                                    dir1             : Dir     from gp;
131                                    dir2             : Dir     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 ); 
147                                    
148
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);
155     
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 
176     
177     DistanceFromApex( elips  :  Elips  from  gp; 
178                       Apex   :  Pnt    from  gp;
179                       par    :  Real   from  Standard) 
180     returns  Real  from  Standard;                                                           
181         ---Purpose:  computes  length  of  ellipse  arc  in  parametric  units  
182        
183     
184 end DsgPrs;
185