1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
19 #include <Prs3d_PlaneAspect.ixx>
21 Prs3d_PlaneAspect::Prs3d_PlaneAspect()
23 myEdgesAspect = new Prs3d_LineAspect(Quantity_NOC_GREEN,Aspect_TOL_SOLID,1.);
24 myIsoAspect = new Prs3d_LineAspect(Quantity_NOC_GRAY75,Aspect_TOL_SOLID,0.5);
25 myArrowAspect = new Prs3d_LineAspect(Quantity_NOC_PEACHPUFF,Aspect_TOL_SOLID,1.);
26 myDrawCenterArrow = Standard_False;
27 myDrawEdgesArrows = Standard_False;
28 myDrawEdges = Standard_True;
29 myDrawIso = Standard_False;
35 myArrowsAngle=M_PI/8.;
38 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::EdgesAspect() const
43 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::IsoAspect() const
48 Handle(Prs3d_LineAspect) Prs3d_PlaneAspect::ArrowAspect() const
53 void Prs3d_PlaneAspect::SetDisplayCenterArrow(const Standard_Boolean draw)
55 myDrawCenterArrow = draw;
58 void Prs3d_PlaneAspect::SetDisplayEdgesArrows(const Standard_Boolean draw)
60 myDrawEdgesArrows = draw;
63 void Prs3d_PlaneAspect::SetDisplayEdges(const Standard_Boolean draw)
68 void Prs3d_PlaneAspect::SetDisplayIso(const Standard_Boolean draw)
73 Standard_Boolean Prs3d_PlaneAspect::DisplayCenterArrow() const
75 return myDrawCenterArrow;
78 Standard_Boolean Prs3d_PlaneAspect::DisplayEdgesArrows() const
80 return myDrawEdgesArrows;
83 Standard_Boolean Prs3d_PlaneAspect::DisplayEdges() const
88 Standard_Boolean Prs3d_PlaneAspect::DisplayIso() const
93 void Prs3d_PlaneAspect::SetPlaneLength(const Quantity_Length lX,
94 const Quantity_Length lY)
100 Quantity_Length Prs3d_PlaneAspect::PlaneXLength() const
102 return myPlaneXLength;
105 Quantity_Length Prs3d_PlaneAspect::PlaneYLength() const
107 return myPlaneYLength;
110 void Prs3d_PlaneAspect::SetIsoDistance(const Quantity_Length l)
115 Quantity_Length Prs3d_PlaneAspect::IsoDistance() const
117 return myIsoDistance;
120 void Prs3d_PlaneAspect::SetArrowsLength(const Quantity_Length L)
125 Quantity_Length Prs3d_PlaneAspect::ArrowsLength() const
127 return myArrowsLength;
130 void Prs3d_PlaneAspect::SetArrowsSize(const Quantity_Length L)
135 Quantity_Length Prs3d_PlaneAspect::ArrowsSize() const
140 void Prs3d_PlaneAspect::SetArrowsAngle(const Quantity_PlaneAngle ang)
145 Quantity_Length Prs3d_PlaneAspect::ArrowsAngle() const
147 return myArrowsAngle;