Open CASCADE Technology 6.6.0
Public Member Functions | Protected Member Functions | Protected Attributes
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:
More...

#include <AIS_Relation.hxx>

Inheritance diagram for AIS_Relation:
Inheritance graph
[legend]

Public Member Functions

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.

void SetColor (const Quantity_Color &aColor)
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:

virtual AIS_KindOfDimension KindOfDimension () const
 Indicates that the type of dimension is unknown.

virtual Standard_Boolean IsMovable () const
 Returns true if the interactive object is movable.

const TopoDS_ShapeFirstShape () const
virtual void SetFirstShape (const TopoDS_Shape &aFShape)
const TopoDS_ShapeSecondShape () const
 Returns the second shape.

virtual 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_PntPosition () 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_ExtendedStringText () 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:

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:

Standard_Integer ExtShape () const
 Returns the status index of the extension shape.

virtual 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

Protected Member Functions

 AIS_Relation (const PrsMgr_TypeOfPresentation3d aTypeOfPresentation3d=PrsMgr_TOP_AllView)
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.

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

Detailed Description


Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented from AIS_InteractiveObject.

Standard_Real AIS_Relation::ArrowSize ( ) const
Standard_Boolean AIS_Relation::AutomaticPosition ( ) const
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]
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
const TopoDS_Shape& AIS_Relation::FirstShape ( ) const
virtual Standard_Boolean AIS_Relation::IsMovable ( ) const [virtual]
virtual AIS_KindOfDimension AIS_Relation::KindOfDimension ( ) const [virtual]
const Handle_Geom_Plane& AIS_Relation::Plane ( ) const
const gp_Pnt& AIS_Relation::Position ( ) const
const TopoDS_Shape& AIS_Relation::SecondShape ( ) const
void AIS_Relation::SetArrowSize ( const Standard_Real  anArrowSize)
void AIS_Relation::SetAutomaticPosition ( const Standard_Boolean  aStatus)
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 
)
void AIS_Relation::SetColor ( const Quantity_NameOfColor  aColor) [virtual]

Reimplemented from AIS_InteractiveObject.

void AIS_Relation::SetColor ( const Quantity_Color aColor) [virtual]

Reimplemented from AIS_InteractiveObject.

void AIS_Relation::SetExtShape ( const Standard_Integer  aIndex)
  • 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.
virtual void AIS_Relation::SetFirstShape ( const TopoDS_Shape aFShape) [virtual]
void AIS_Relation::SetPlane ( const Handle< Geom_Plane > &  aPlane)
void AIS_Relation::SetPosition ( const gp_Pnt aPosition)
virtual void AIS_Relation::SetSecondShape ( const TopoDS_Shape aSShape) [virtual]

Reimplemented in AIS_LengthDimension, and AIS_AngleDimension.

void AIS_Relation::SetSymbolPrs ( const DsgPrs_ArrowSide  aSymbolPrs)
void AIS_Relation::SetText ( const TCollection_ExtendedString aText)
void AIS_Relation::SetValue ( const Standard_Real  aVal)
DsgPrs_ArrowSide AIS_Relation::SymbolPrs ( ) const
  • 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
const TCollection_ExtendedString& AIS_Relation::Text ( ) const
virtual AIS_KindOfInteractive AIS_Relation::Type ( ) const [virtual]
  • 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.

Reimplemented from AIS_InteractiveObject.

void AIS_Relation::UnsetBndBox ( )
void AIS_Relation::UnsetColor ( ) [virtual]

Reimplemented from AIS_InteractiveObject.

Standard_Real AIS_Relation::Value ( ) const

Field Documentation

Handle_Geom_Surface AIS_Relation::myFirstBasisSurf [protected]
Handle_Geom_Plane AIS_Relation::myPlane [protected]
Handle_Geom_Surface AIS_Relation::mySecondBasisSurf [protected]

The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines