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

Visualization
TKV3d
AIS


AIS_Relation Class Reference

One of the four types of interactive object in
AIS,comprising dimensions and constraints. Serves
as the abstract class for the seven relation classes as
well as the seven dimension classes.
The statuses available for relations between shapes are as follows:
- 0 - there is no connection to a shape;
- 1 - there is a connection to the first shape;
- 2 - there is a connection to the second shape.
The connection takes the form of an edge between the two shapes.
.

#include <AIS_Relation.hxx>

Inheritance diagram for AIS_Relation:

Inheritance graph
[legend]

Public Member Functions

Standard_EXPORT void SetColor (const Quantity_NameOfColor aColor)
 Allows you to provide settings for the color aColor
of the lines representing the relation between the two shapes.
.
Standard_EXPORT void SetColor (const Quantity_Color &aColor)
Standard_EXPORT void UnsetColor ()
 Allows you to remove settings for the color of the
lines representing the relation between the two shapes.
.
virtual AIS_KindOfInteractive Type () const
 Returns the kind of Interactive Object:
- None
- Datum
- Relation
- Object
By default, the interactive object has a None type.
Because specific shapes entail different behavior
according to their sub-shapes, you may need to
create a Local Context. This will allow you to
specify the additional characteristics which you
need to handle these shapes.
.
virtual Standard_EXPORT AIS_KindOfDimension KindOfDimension () const
 Indicates that the type of dimension is unknown.
.
virtual Standard_EXPORT Standard_Boolean IsMovable () const
 Returns true if the interactive object is movable.
.
const TopoDS_Shape & FirstShape () const
virtual Standard_EXPORT void SetFirstShape (const TopoDS_Shape &aFShape)
const TopoDS_Shape & SecondShape () const
 Returns the second shape.
.
virtual Standard_EXPORT void SetSecondShape (const TopoDS_Shape &aSShape)
 Allows you to identify the second shape aSShape
relative to the first.
.
void SetBndBox (const Standard_Real Xmin, const Standard_Real Ymin, const Standard_Real Zmin, const Standard_Real Xmax, const Standard_Real Ymax, const Standard_Real Zmax)
void UnsetBndBox ()
const Handle_Geom_Plane & Plane () const
 Returns the plane.
.
void SetPlane (const Handle(Geom_Plane)&aPlane)
 Allows you to set the plane aPlane. This is used to
define relations and dimensions in several daughter classes.
.
Standard_Real Value () const
 Returns the value of each object in the relation.
.
void SetValue (const Standard_Real aVal)
 Allows you to provide settings for the value aVal for
each object in the relation.
.
const gp_Pnt & Position () const
 Returns the position set using SetPosition.
.
void SetPosition (const gp_Pnt &aPosition)
 Allows you to provide the objects in the relation with
settings for a non-default position.
.
const TCollection_ExtendedString & Text () const
 Returns settings for text aspect.
.
void SetText (const TCollection_ExtendedString &aText)
 Allows you to provide the settings aText for text aspect.
.
Standard_Real ArrowSize () const
 Returns the value for the size of the arrow identifying
the relation between the two shapes.
.
void SetArrowSize (const Standard_Real anArrowSize)
 Allows you to provide settings for the size of the
arrow anArrowsize identifying the relation between the two shapes.
.
DsgPrs_ArrowSide SymbolPrs () const
 Returns the value of the symbol presentation. This will be one of:
- AS_NONE - none
- AS_FIRSTAR - first arrow
- AS_LASTAR - last arrow
- AS_BOTHAR - both arrows
- AS_FIRSTPT - first point
- AS_LASTPT - last point
- AS_BOTHPT - both points
- AS_FIRSTAR_LASTPT - first arrow, last point
- AS_FIRSTPT_LASTAR - first point, last arrow
.
void SetSymbolPrs (const DsgPrs_ArrowSide aSymbolPrs)
 Allows you to provide settings for the symbol presentation.
.
void SetExtShape (const Standard_Integer aIndex)
 Allows you to set the status of the extension shape by
the index aIndex.
The status will be one of the following:
- 0 - there is no connection to a shape;
- 1 - there is a connection to the first shape;
- 2 - there is a connection to the second shape.
.
Standard_Integer ExtShape () const
 Returns the status index of the extension shape.
.
virtual Standard_EXPORT Standard_Boolean AcceptDisplayMode (const Standard_Integer aMode) const
 Returns true if the display mode aMode is accepted
for the Interactive Objects in the relation.
ComputeProjPresentation(me;
aPres : mutable Presentation from Prs3d;
Curve1 : Curve from Geom;
Curve2 : Curve from Geom;
FirstP1 : Pnt from gp;
LastP1 : Pnt from gp;
FirstP2 : Pnt from gp;
LastP2 : Pnt from gp;
aColor : NameOfColor from Quantity = Quantity_NOC_PURPLE;
aWidth : Real from Standard = 2;
aProjTOL : TypeOfLine from Aspect = Aspect_TOL_DASH;
aCallTOL : TypeOfLine from Aspect = Aspect_TOL_DOT)
.
void SetAutomaticPosition (const Standard_Boolean aStatus)
Standard_Boolean AutomaticPosition () const
Standard_EXPORT const Handle (Standard_Type)&DynamicType() const

Protected Member Functions

Standard_EXPORT AIS_Relation (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d=PrsMgr_TOP_AllView)
Standard_EXPORT void ComputeProjEdgePresentation (const Handle(Prs3d_Presentation)&aPres, const TopoDS_Edge &anEdge, const Handle(Geom_Curve)&ProjCurve, const gp_Pnt &FirstP, const gp_Pnt &LastP, const Quantity_NameOfColor aColor=Quantity_NOC_PURPLE, const Standard_Real aWidth=2, const Aspect_TypeOfLine aProjTOL=Aspect_TOL_DASH, const Aspect_TypeOfLine aCallTOL=Aspect_TOL_DOT) const
 Calculates the presentation aPres of the the edge
anEdge and the curve it defines, ProjCurve. The later
is also specified by the first point FirstP and the last point LastP.
The presentation includes settings for color aColor,
type - aProjTOL and aCallTOL - and width of line, aWidth.
.
Standard_EXPORT void ComputeProjVertexPresentation (const Handle(Prs3d_Presentation)&aPres, const TopoDS_Vertex &aVertex, const gp_Pnt &ProjPoint, const Quantity_NameOfColor aColor=Quantity_NOC_PURPLE, const Standard_Real aWidth=2, const Aspect_TypeOfMarker aProjTOM=Aspect_TOM_PLUS, const Aspect_TypeOfLine aCallTOL=Aspect_TOL_DOT) const
 Calculates the presentation aPres of the the vertex
aVertex and the point it defines, ProjPoint.
The presentation includes settings for color aColor,
type - aProjTOM and aCallTOL - and width of line, aWidth.
.

Protected Attributes

TopoDS_Shape myFShape
TopoDS_Shape mySShape
Handle_Geom_Plane myPlane
Standard_Real myVal
gp_Pnt myPosition
TCollection_ExtendedString myText
Standard_Real myArrowSize
Standard_Boolean myAutomaticPosition
DsgPrs_ArrowSide mySymbolPrs
Standard_Integer myExtShape
gp_Pln myFirstPlane
gp_Pln mySecondPlane
Handle_Geom_Surface myFirstBasisSurf
Handle_Geom_Surface mySecondBasisSurf
AIS_KindOfSurface myFirstSurfType
AIS_KindOfSurface mySecondSurfType
Standard_Real myFirstOffset
Standard_Real mySecondOffset
Bnd_Box myBndBox
Standard_Boolean myIsSetBndBox
Standard_Boolean myArrowSizeIsDefined

Constructor & Destructor Documentation

Standard_EXPORT AIS_Relation::AIS_Relation const PrsMgr_TypeOfPresentation3d  aTypeOfPresentation3d = PrsMgr_TOP_AllView  )  [protected]
 


Member Function Documentation

virtual Standard_EXPORT Standard_Boolean AIS_Relation::AcceptDisplayMode const Standard_Integer  aMode  )  const [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_Real AIS_Relation::ArrowSize  )  const [inline]
 

Standard_Boolean AIS_Relation::AutomaticPosition  )  const [inline]
 

Standard_EXPORT void AIS_Relation::ComputeProjEdgePresentation const Handle(Prs3d_Presentation)&  aPres,
const TopoDS_Edge &  anEdge,
const Handle(Geom_Curve)&  ProjCurve,
const gp_Pnt &  FirstP,
const gp_Pnt &  LastP,
const Quantity_NameOfColor  aColor = Quantity_NOC_PURPLE,
const Standard_Real  aWidth = 2,
const Aspect_TypeOfLine  aProjTOL = Aspect_TOL_DASH,
const Aspect_TypeOfLine  aCallTOL = Aspect_TOL_DOT
const [protected]
 

Standard_EXPORT void AIS_Relation::ComputeProjVertexPresentation const Handle(Prs3d_Presentation)&  aPres,
const TopoDS_Vertex &  aVertex,
const gp_Pnt &  ProjPoint,
const Quantity_NameOfColor  aColor = Quantity_NOC_PURPLE,
const Standard_Real  aWidth = 2,
const Aspect_TypeOfMarker  aProjTOM = Aspect_TOM_PLUS,
const Aspect_TypeOfLine  aCallTOL = Aspect_TOL_DOT
const [protected]
 

Standard_Integer AIS_Relation::ExtShape  )  const [inline]
 

const TopoDS_Shape & AIS_Relation::FirstShape  )  const [inline]
 

Standard_EXPORT const AIS_Relation::Handle Standard_Type   )  const
 

Reimplemented from AIS_InteractiveObject.

Reimplemented in AIS_AngleDimension, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_ConcentricRelation, AIS_DiameterDimension, AIS_EllipseRadiusDimension, AIS_EqualDistanceRelation, AIS_EqualRadiusRelation, AIS_FixRelation, AIS_IdenticRelation, AIS_LengthDimension, AIS_MaxRadiusDimension, AIS_MidPointRelation, AIS_MinRadiusDimension, AIS_OffsetDimension, AIS_ParallelRelation, AIS_PerpendicularRelation, AIS_RadiusDimension, AIS_SymmetricRelation, and AIS_TangentRelation.

virtual Standard_EXPORT Standard_Boolean AIS_Relation::IsMovable  )  const [virtual]
 

Reimplemented in AIS_AngleDimension, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_DiameterDimension, AIS_EllipseRadiusDimension, AIS_FixRelation, AIS_IdenticRelation, AIS_LengthDimension, AIS_MidPointRelation, AIS_OffsetDimension, AIS_ParallelRelation, AIS_RadiusDimension, and AIS_SymmetricRelation.

virtual Standard_EXPORT AIS_KindOfDimension AIS_Relation::KindOfDimension  )  const [virtual]
 

Reimplemented in AIS_AngleDimension, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_DiameterDimension, AIS_EllipseRadiusDimension, AIS_LengthDimension, AIS_OffsetDimension, and AIS_RadiusDimension.

const Handle_Geom_Plane& AIS_Relation::Plane  )  const
 

const gp_Pnt & AIS_Relation::Position  )  const [inline]
 

const TopoDS_Shape & AIS_Relation::SecondShape  )  const [inline]
 

void AIS_Relation::SetArrowSize const Standard_Real  anArrowSize  )  [inline]
 

void AIS_Relation::SetAutomaticPosition const Standard_Boolean  aStatus  )  [inline]
 

void AIS_Relation::SetBndBox const Standard_Real  Xmin,
const Standard_Real  Ymin,
const Standard_Real  Zmin,
const Standard_Real  Xmax,
const Standard_Real  Ymax,
const Standard_Real  Zmax
[inline]
 

Standard_EXPORT void AIS_Relation::SetColor const Quantity_Color &  aColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_EXPORT void AIS_Relation::SetColor const Quantity_NameOfColor  aColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

void AIS_Relation::SetExtShape const Standard_Integer  aIndex  )  [inline]
 

virtual Standard_EXPORT void AIS_Relation::SetFirstShape const TopoDS_Shape &  aFShape  )  [virtual]
 

Reimplemented in AIS_AngleDimension, AIS_LengthDimension, and AIS_RadiusDimension.

void AIS_Relation::SetPlane const Handle(Geom_Plane)&  aPlane  )  [inline]
 

void AIS_Relation::SetPosition const gp_Pnt &  aPosition  )  [inline]
 

virtual Standard_EXPORT void AIS_Relation::SetSecondShape const TopoDS_Shape &  aSShape  )  [virtual]
 

Reimplemented in AIS_AngleDimension, and AIS_LengthDimension.

void AIS_Relation::SetSymbolPrs const DsgPrs_ArrowSide  aSymbolPrs  )  [inline]
 

void AIS_Relation::SetText const TCollection_ExtendedString &  aText  )  [inline]
 

void AIS_Relation::SetValue const Standard_Real  aVal  )  [inline]
 

DsgPrs_ArrowSide AIS_Relation::SymbolPrs  )  const [inline]
 

const TCollection_ExtendedString & AIS_Relation::Text  )  const [inline]
 

AIS_KindOfInteractive AIS_Relation::Type  )  const [inline, virtual]
 

Reimplemented from AIS_InteractiveObject.

void AIS_Relation::UnsetBndBox  )  [inline]
 

Standard_EXPORT void AIS_Relation::UnsetColor  )  [virtual]
 

Reimplemented from AIS_InteractiveObject.

Standard_Real AIS_Relation::Value  )  const [inline]
 


Field Documentation

Standard_Real AIS_Relation::myArrowSize [protected]
 

Standard_Boolean AIS_Relation::myArrowSizeIsDefined [protected]
 

Standard_Boolean AIS_Relation::myAutomaticPosition [protected]
 

Bnd_Box AIS_Relation::myBndBox [protected]
 

Standard_Integer AIS_Relation::myExtShape [protected]
 

Handle_Geom_Surface AIS_Relation::myFirstBasisSurf [protected]
 

Standard_Real AIS_Relation::myFirstOffset [protected]
 

gp_Pln AIS_Relation::myFirstPlane [protected]
 

AIS_KindOfSurface AIS_Relation::myFirstSurfType [protected]
 

TopoDS_Shape AIS_Relation::myFShape [protected]
 

Standard_Boolean AIS_Relation::myIsSetBndBox [protected]
 

Handle_Geom_Plane AIS_Relation::myPlane [protected]
 

gp_Pnt AIS_Relation::myPosition [protected]
 

Handle_Geom_Surface AIS_Relation::mySecondBasisSurf [protected]
 

Standard_Real AIS_Relation::mySecondOffset [protected]
 

gp_Pln AIS_Relation::mySecondPlane [protected]
 

AIS_KindOfSurface AIS_Relation::mySecondSurfType [protected]
 

TopoDS_Shape AIS_Relation::mySShape [protected]
 

DsgPrs_ArrowSide AIS_Relation::mySymbolPrs [protected]
 

TCollection_ExtendedString AIS_Relation::myText [protected]
 

Standard_Real AIS_Relation::myVal [protected]
 


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