b311480e |
1 | -- Created on: 1996-12-05 |
2 | -- Created by: Jean-Pierre COMBE/Odile Olivier |
3 | -- Copyright (c) 1996-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 | class ParallelRelation from AIS inherits Relation from AIS |
24 | |
25 | ---Purpose: A framework to display constraints of parallelism |
26 | -- between two or more Interactive Objects. These |
27 | -- entities can be faces or edges. |
28 | |
29 | uses Shape from TopoDS, |
30 | Presentation from Prs3d, |
31 | PresentationManager3d from PrsMgr, |
32 | Selection from SelectMgr, |
33 | Plane from Geom, |
34 | Dir from gp, |
35 | Pnt from gp, |
36 | Projector from Prs3d, |
128cc8df |
37 | Transformation from Geom, |
7fd59977 |
38 | ArrowSide from DsgPrs |
39 | |
40 | is |
41 | Create (aFShape : Shape from TopoDS; |
42 | aSShape : Shape from TopoDS; |
43 | aPlane : Plane from Geom) |
44 | ---Purpose: Constructs an object to display parallel constraints. |
45 | -- This object is defined by the first shape aFShape and |
46 | -- the second shape aSShape and the plane aPlane. |
47 | returns mutable ParallelRelation from AIS; |
48 | |
49 | Create (aFShape : Shape from TopoDS; |
50 | aSShape : Shape from TopoDS; |
51 | aPlane : Plane from Geom; |
52 | aPosition : Pnt from gp; |
53 | aSymbolPrs : ArrowSide from DsgPrs; |
54 | anArrowSize : Real from Standard = 0.01) |
55 | ---Purpose: Constructs an object to display parallel constraints. |
56 | -- This object is defined by the first shape aFShape and |
57 | -- the second shape aSShape the plane aPlane, the |
58 | -- position aPosition, the type of arrow, aSymbolPrs and |
59 | -- its size anArrowSize. |
60 | returns mutable ParallelRelation from AIS; |
61 | |
62 | IsMovable(me) returns Boolean from Standard |
63 | ---Purpose: Returns true if the parallelism is movable. |
64 | ---C++: inline |
65 | is redefined; |
66 | |
67 | -- Methods from PresentableObject |
68 | |
69 | Compute(me : mutable; |
70 | aPresentationManager: PresentationManager3d from PrsMgr; |
71 | aPresentation : mutable Presentation from Prs3d; |
72 | aMode : Integer from Standard= 0) |
73 | is redefined static private; |
74 | |
75 | Compute(me:mutable; |
76 | aProjector: Projector from Prs3d; |
77 | aPresentation: mutable Presentation from Prs3d) |
78 | is redefined static private; |
79 | |
7fd59977 |
80 | Compute(me : mutable; |
81 | aProjector : Projector from Prs3d; |
82 | aTrsf : Transformation from Geom; |
83 | aPresentation : mutable Presentation from Prs3d) |
84 | is redefined; |
85 | ---Purpose: computes the presentation according to a point of view |
86 | -- given by <aProjector>. |
87 | -- To be Used when the associated degenerated Presentations |
88 | -- have been transformed by <aTrsf> which is not a Pure |
89 | -- Translation. The HLR Prs can't be deducted automatically |
90 | -- WARNING :<aTrsf> must be applied |
91 | -- to the object to display before computation !!! |
92 | |
93 | -- Methods from SelectableObject |
94 | |
95 | ComputeSelection(me : mutable; |
96 | aSelection : mutable Selection from SelectMgr; |
97 | aMode : Integer from Standard)is private; |
98 | |
99 | |
100 | |
101 | -- |
102 | -- Computation private methods |
103 | -- |
104 | |
105 | ComputeTwoFacesParallel(me: mutable; |
106 | aPresentation : mutable Presentation from Prs3d) |
107 | is private; |
108 | |
109 | ComputeTwoEdgesParallel(me: mutable; |
110 | aPresentation : mutable Presentation from Prs3d) |
111 | is private; |
112 | |
113 | |
114 | fields |
115 | |
116 | myFAttach : Pnt from gp; |
117 | mySAttach : Pnt from gp; |
118 | myDirAttach : Dir from gp; |
119 | |
120 | end ParallelRelation; |
121 | |