OCC Main Page | Visualization | Toolkits | Packages | Class Hierarchy | Data Structures | File List | Data Fields | Globals

Visualization
TKV3d
AIS


AIS_DiameterDimension Class Reference

A framework to display diameter dimensions.
A diameter is displayed with arrows and text. The
text gives the length of the diameter.
The algorithm takes a length along a face and
analyzes it as an arc. It then reconstructs the circle
corresponding to the arc and calculates the
diameter of this circle. This diameter serves as a
relational reference in 3d presentations of the surface.
.

#include <AIS_DiameterDimension.hxx>

Inheritance diagram for AIS_DiameterDimension:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT AIS_DiameterDimension (const TopoDS_Shape &aShape, const Standard_Real aVal, const TCollection_ExtendedString &aText)
 Constructs a diameter display object defined by the
shape aFShape, the dimension aVal and the text aText.
.
Standard_EXPORT AIS_DiameterDimension (const TopoDS_Shape &aShape, const Standard_Real aVal, const TCollection_ExtendedString &aText, const gp_Pnt &aPosition, const DsgPrs_ArrowSide aSymbolPrs, const Standard_Boolean aDiamSymbol, const Standard_Real anArrowSize=0.0)
 Constructs a diameter display object defined by the
shape aFShape, the dimension aVal and the text
aText, the point of origin of the diameter aPosition,
and the type of arrow aSymbolPrs with the size anArrowSize.
If the Boolean aDiamSymbol is true.
.
virtual AIS_KindOfDimension KindOfDimension () const
 Indicates that we are concerned with a length.
.
virtual Standard_Boolean IsMovable () const
 Returns true if the diameter dimension is movable
.
Standard_Boolean DiamSymbol ()
 Returns the symbol for diameter dimension. This will
be either arrow, text, or a combination of both.
.
void SetDiamSymbol (const Standard_Boolean aDiamSymbol)
 Sets the symbol for diameter dimension aDiamSymbol.
This can be an arrow, a text or both.
.
virtual Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Geom_Transformation)&aTrsf, const Handle(Prs3d_Presentation)&aPresentation)
 computes the presentation according to a point of view
given by <aprojector>.
To be Used when the associated degenerated Presentations
have been transformed by <atrsf> which is not a Pure
Translation. The HLR Prs can't be deducted automatically
WARNING :<atrsf> must be applied
to the object to display before computation !!!

Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Private Member Functions

virtual Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager3d)&aPresentationManager, const Handle(Prs3d_Presentation)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
.
Standard_EXPORT void Compute (const Handle(Prs3d_Projector)&aProjector, const Handle(Prs3d_Presentation)&aPresentation)
 Calculates the 3D view aPresentation and its
updates. The latter are managed by
aPresentationManager. Each of the views in the
viewer and every modification such as rotation, for
example, entails recalculation.
It must be redefined to implement hidden line removal
for the object. The user never calls this method
himself. This is done via the InteractiveContext object
and is dependent on the point of view from which the
object is displayed.
.
Standard_EXPORT void Compute (const Handle(PrsMgr_PresentationManager2d)&aPresentationManager, const Handle(Graphic2d_GraphicObject)&aPresentation, const Standard_Integer aMode=0)
 Calculates the 2D view aPresentation and its
updates. The latter are managed by aPresentationManager.
aPresentableObject has the display mode aMode;
this has the default value of 0, that is, the wireframe display mode.
Note that this syntax is not used in AIS as that
package only concerns 3D display.
.
virtual Standard_EXPORT void ComputeSelection (const Handle(SelectMgr_Selection)&aSelection, const Standard_Integer aMode)
 Recovers and calculates any sensitive primitive,
aSelection, available in Shape mode, specified by
aMode. As a rule, these are sensitive faces.
This method is defined as virtual. This enables you to
implement it in the creation of a new class of AIS
Interactive Object. You need to do this and in so
doing, redefine this method, if you create a class
which enriches the list of signatures and types.
.
Standard_EXPORT void ComputeOneFaceDiameter (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeOneCylFaceDiameter (const Handle(Prs3d_Presentation)&aPresentation, const AIS_KindOfSurface aSurfType, const Handle(Geom_Surface)&aSurf)
Standard_EXPORT void ComputeOnePlanarFaceDiameter (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeOneEdgeDiameter (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeCircleDiameter (const Handle(Prs3d_Presentation)&aPresentation)
Standard_EXPORT void ComputeArcDiameter (const Handle(Prs3d_Presentation)&aPresentation, const gp_Pnt &ptFirst, const gp_Pnt &ptend)
Standard_EXPORT void ComputeArcSelection (const Handle(SelectMgr_Selection)&aSelection)

Private Attributes

gp_Circ myCircle
Standard_Boolean myIsAnArc
Standard_Boolean myDiamSymbol
Standard_Real myFirstPar
Standard_Real myLastPar

Constructor & Destructor Documentation

Standard_EXPORT AIS_DiameterDimension::AIS_DiameterDimension const TopoDS_Shape &  aShape,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText
 

Standard_EXPORT AIS_DiameterDimension::AIS_DiameterDimension const TopoDS_Shape &  aShape,
const Standard_Real  aVal,
const TCollection_ExtendedString &  aText,
const gp_Pnt &  aPosition,
const DsgPrs_ArrowSide  aSymbolPrs,
const Standard_Boolean  aDiamSymbol,
const Standard_Real  anArrowSize = 0.0
 


Member Function Documentation

Standard_EXPORT void AIS_DiameterDimension::Compute const Handle(PrsMgr_PresentationManager2d)&  aPresentationManager,
const Handle(Graphic2d_GraphicObject)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_DiameterDimension::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Prs3d_Presentation)&  aPresentation
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

virtual Standard_EXPORT void AIS_DiameterDimension::Compute const Handle(PrsMgr_PresentationManager3d)&  aPresentationManager,
const Handle(Prs3d_Presentation)&  aPresentation,
const Standard_Integer  aMode = 0
[private, virtual]
 

Reimplemented from PrsMgr_PresentableObject.

virtual Standard_EXPORT void AIS_DiameterDimension::Compute const Handle(Prs3d_Projector)&  aProjector,
const Handle(Geom_Transformation)&  aTrsf,
const Handle(Prs3d_Presentation)&  aPresentation
[virtual]
 

Reimplemented from PrsMgr_PresentableObject.

Standard_EXPORT void AIS_DiameterDimension::ComputeArcDiameter const Handle(Prs3d_Presentation)&  aPresentation,
const gp_Pnt &  ptFirst,
const gp_Pnt &  ptend
[private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeArcSelection const Handle(SelectMgr_Selection)&  aSelection  )  [private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeCircleDiameter const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeOneCylFaceDiameter const Handle(Prs3d_Presentation)&  aPresentation,
const AIS_KindOfSurface  aSurfType,
const Handle(Geom_Surface)&  aSurf
[private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeOneEdgeDiameter const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeOneFaceDiameter const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

Standard_EXPORT void AIS_DiameterDimension::ComputeOnePlanarFaceDiameter const Handle(Prs3d_Presentation)&  aPresentation  )  [private]
 

virtual Standard_EXPORT void AIS_DiameterDimension::ComputeSelection const Handle(SelectMgr_Selection)&  aSelection,
const Standard_Integer  aMode
[private, virtual]
 

Implements SelectMgr_SelectableObject.

Standard_Boolean AIS_DiameterDimension::DiamSymbol  )  [inline]
 

Standard_EXPORT const AIS_DiameterDimension::Handle Standard_Type   )  const
 

Reimplemented from AIS_Relation.

Standard_Boolean AIS_DiameterDimension::IsMovable  )  const [inline, virtual]
 

Reimplemented from AIS_Relation.

AIS_KindOfDimension AIS_DiameterDimension::KindOfDimension  )  const [inline, virtual]
 

Reimplemented from AIS_Relation.

void AIS_DiameterDimension::SetDiamSymbol const Standard_Boolean  aDiamSymbol  )  [inline]
 


Field Documentation

gp_Circ AIS_DiameterDimension::myCircle [private]
 

Standard_Boolean AIS_DiameterDimension::myDiamSymbol [private]
 

Standard_Real AIS_DiameterDimension::myFirstPar [private]
 

Standard_Boolean AIS_DiameterDimension::myIsAnArc [private]
 

Standard_Real AIS_DiameterDimension::myLastPar [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Aug 25 13:55:08 2008 for OpenCASCADE by  doxygen 1.4.1