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 //! A framework to define display of radii. <br>
20 //! These displays serve as relational references in 3D <br>
21 //! presentations of surfaces, and are particularly useful <br>
22 //! in viewing fillets. The display consists of arrows and <br>
23 //! text giving the length of a radius. This display is <br>
24 //! recalculated if the applicative owner shape changes <br>
25 //! in dimension, and the text gives the modified length. <br>
26 //! The algorithm analyzes a length along a face as an <br>
27 //! arc. It then reconstructs the circle corresponding to <br>
28 //! the arc and calculates the radius of this circle. <br>
30 #ifndef _AIS_RadiusDimension_HeaderFile
31 #define _AIS_RadiusDimension_HeaderFile
34 #include <AIS_Dimension.hxx>
35 #include <gp_Circ.hxx>
37 #include <Prs3d_DimensionAspect.hxx>
38 #include <Standard.hxx>
39 #include <Standard_Macro.hxx>
40 #include <TopoDS_Shape.hxx>
42 DEFINE_STANDARD_HANDLE(AIS_RadiusDimension,AIS_Dimension)
44 class AIS_RadiusDimension : public AIS_Dimension
48 Standard_EXPORT AIS_RadiusDimension (const gp_Circ& theCircle);
50 Standard_EXPORT AIS_RadiusDimension (const gp_Circ& theCircle,
51 const gp_Pnt& theAttachPoint);
53 //! Constructs the radius display object defined by the <br>
54 //! shape aShape, the dimension aVal, and the text aText.
55 Standard_EXPORT AIS_RadiusDimension (const TopoDS_Shape& aShape);
57 DEFINE_STANDARD_RTTI(AIS_RadiusDimension)
61 //! Computes dimension value in display units
62 Standard_EXPORT virtual void computeValue ();
64 //! Fills default plane object if it is possible to count plane automatically.
65 Standard_EXPORT virtual void countDefaultPlane ();
69 virtual void Compute (const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
70 const Handle(Prs3d_Presentation)& thePresentation,
71 const Standard_Integer theMode = 0);