Open CASCADE Technology 6.6.0
|
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>
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_Shape & | FirstShape () const |
virtual void | SetFirstShape (const TopoDS_Shape &aFShape) |
const TopoDS_Shape & | SecondShape () 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_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: | |
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 |
AIS_Relation::AIS_Relation | ( | const PrsMgr_TypeOfPresentation3d | aTypeOfPresentation3d = PrsMgr_TOP_AllView | ) | [protected] |
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] |
Reimplemented in AIS_EllipseRadiusDimension, AIS_LengthDimension, AIS_AngleDimension, AIS_RadiusDimension, AIS_DiameterDimension, AIS_Chamf2dDimension, AIS_Chamf3dDimension, AIS_OffsetDimension, AIS_FixRelation, AIS_ParallelRelation, AIS_IdenticRelation, AIS_SymmetricRelation, and AIS_MidPointRelation.
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 | ) |
virtual void AIS_Relation::SetFirstShape | ( | const TopoDS_Shape & | aFShape | ) | [virtual] |
Reimplemented in AIS_LengthDimension, AIS_AngleDimension, and AIS_RadiusDimension.
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 |
const TCollection_ExtendedString& AIS_Relation::Text | ( | ) | const |
virtual AIS_KindOfInteractive AIS_Relation::Type | ( | ) | const [virtual] |
Reimplemented from AIS_InteractiveObject.
void AIS_Relation::UnsetBndBox | ( | ) |
void AIS_Relation::UnsetColor | ( | ) | [virtual] |
Reimplemented from AIS_InteractiveObject.
Standard_Real AIS_Relation::Value | ( | ) | const |
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] |