Open CASCADE Technology  6.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Static Public Member Functions
AIS Class Reference

Application Interactive Services provide the means to
create links between an application GUI viewer and
the packages which are used to manage selection
and presentation. The tools AIS defined in order to
do this include different sorts of entities: both the
selectable viewable objects themselves and the
context and attribute managers to define their
selection and display.
To orient the user as he works in a modeling
environment, views and selections must be
comprehensible. There must be several different sorts
of selectable and viewable object defined. These must
also be interactive, that is, connecting graphic
representation and the underlying reference
geometry. These entities are called Interactive
Objects, and are divided into four types:
More...

#include <AIS.hxx>

Static Public Member Functions

static gp_Pnt Nearest (const TopoDS_Shape &aShape, const gp_Pnt &aPoint)
 Returns the nearest point in a shape. This is used by
several classes in calculation of dimensions.
More...
 
static gp_Pnt Nearest (const gp_Lin &theLine, const gp_Pnt &thePoint)
 
static Standard_Boolean Nearest (const Handle< Geom_Curve > &theCurve, const gp_Pnt &thePoint, const gp_Pnt &theFirstPoint, const gp_Pnt &theLastPoint, gp_Pnt &theNearestPoint)
 For the given point finds nearest point on the curve,
More...
 
static gp_Pnt Farest (const TopoDS_Shape &aShape, const gp_Pnt &aPoint)
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theEdge, Handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt)
 Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any
Return TRUE if ok.
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theEdge, Handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt, Standard_Boolean &theIsInfinite)
 Used by dimensions only.
Computes the 3d geometry of <anEdge>.
Return TRUE if ok.
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theEdge, Handle< Geom_Curve > &theCurve, gp_Pnt &theFirstPnt, gp_Pnt &theLastPnt, Handle< Geom_Curve > &theExtCurve, Standard_Boolean &theIsInfinite, Standard_Boolean &theIsOnPlane, const Handle< Geom_Plane > &thePlane)
 Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any.
If <aCurve> is not in the current plane, <extCurve> contains
the not projected curve associated to <anEdge>.
If <anEdge> is infinite, <isinfinite> = true and the 2
parameters <FirstPnt> and <LastPnt> have no signification.
Return TRUE if ok.
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, Handle< Geom_Curve > &theFirstCurve, Handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, const Handle< Geom_Plane > &thePlane)
 Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any
Return TRUE if ok.
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, Handle< Geom_Curve > &theFirstCurve, Handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, Standard_Boolean &theIsinfinite1, Standard_Boolean &theIsinfinite2)
 Used by dimensions only.Computes the 3d geometry
of<anEdge1> and <anEdge2> and checks if they are infinite.
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Edge &theFirstEdge, const TopoDS_Edge &theSecondEdge, Standard_Integer &theExtIndex, Handle< Geom_Curve > &theFirstCurve, Handle< Geom_Curve > &theSecondCurve, gp_Pnt &theFirstPnt1, gp_Pnt &theLastPnt1, gp_Pnt &theFirstPnt2, gp_Pnt &theLastPnt2, Handle< Geom_Curve > &theExtCurve, Standard_Boolean &theIsinfinite1, Standard_Boolean &theIsinfinite2, const Handle< Geom_Plane > &thePlane)
 Used by 2d Relation only Computes the 3d geometry
of<anEdge1> and <anEdge2> in the current Plane and the
extremities if any. Return in ExtCurve the 3d curve
(not projected in the plane) of the first edge if
<indexExt> =1 or of the 2nd edge if <indexExt> = 2. If
<indexExt> = 0, ExtCurve is Null. if there is an edge
external to the plane, <isinfinite> is true if this
edge is infinite. So, the extremities of it are not
significant. Return TRUE if ok
More...
 
static Standard_Boolean ComputeGeomCurve (Handle< Geom_Curve > &aCurve, const Standard_Real first1, const Standard_Real last1, gp_Pnt &FirstPnt1, gp_Pnt &LastPnt1, const Handle< Geom_Plane > &aPlane, Standard_Boolean &isOnPlane)
 Checks if aCurve belongs to aPlane; if not, projects aCurve in aPlane
and returns aCurve;
Return TRUE if ok
More...
 
static Standard_Boolean ComputeGeometry (const TopoDS_Vertex &aVertex, gp_Pnt &point, const Handle< Geom_Plane > &aPlane, Standard_Boolean &isOnPlane)
 
static Standard_Boolean GetPlaneFromFace (const TopoDS_Face &aFace, gp_Pln &aPlane, Handle< Geom_Surface > &aSurf, AIS_KindOfSurface &aSurfType, Standard_Real &Offset)
 Tryes to get Plane from Face. Returns Surface of Face
in aSurf. Returns Standard_True and Plane of Face in
aPlane in following cases:
Face is Plane, Offset of Plane,
Extrusion of Line and Offset of Extrusion of Line
Returns pure type of Surface which can be:
Plane, Cylinder, Cone, Sphere, Torus,
SurfaceOfRevolution, SurfaceOfExtrusion
More...
 
static void InitFaceLength (const TopoDS_Face &aFace, gp_Pln &aPlane, Handle< Geom_Surface > &aSurface, AIS_KindOfSurface &aSurfaceType, Standard_Real &anOffset)
 
static void InitLengthBetweenCurvilinearFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, Handle< Geom_Surface > &theFirstSurf, Handle< Geom_Surface > &theSecondSurf, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, gp_Dir &theDirOnPlane)
 Finds attachment points on two curvilinear faces for length dimension.
More...
 
static Standard_Boolean InitAngleBetweenPlanarFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, gp_Pnt &theCenter, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, const Standard_Boolean theIsFirstPointSet=Standard_False)
 
 Finds three points for the angle dimension between <br>

two planes.
More...

 
static Standard_Boolean InitAngleBetweenCurvilinearFaces (const TopoDS_Face &theFirstFace, const TopoDS_Face &theSecondFace, const AIS_KindOfSurface theFirstSurfType, const AIS_KindOfSurface theSecondSurfType, gp_Pnt &theCenter, gp_Pnt &theFirstAttach, gp_Pnt &theSecondAttach, const Standard_Boolean theIsFirstPointSet=Standard_False)
 
 Finds three points for the angle dimension between <br>

two curvilinear surfaces.
More...

 
static gp_Pnt ProjectPointOnPlane (const gp_Pnt &aPoint, const gp_Pln &aPlane)
 
static gp_Pnt ProjectPointOnLine (const gp_Pnt &aPoint, const gp_Lin &aLine)
 
static gp_Pnt TranslatePointToBound (const gp_Pnt &aPoint, const gp_Dir &aDir, const Bnd_Box &aBndBox)
 
static Standard_Boolean InDomain (const Standard_Real aFirstPar, const Standard_Real aLastPar, const Standard_Real anAttachPar)
 returns True if point with anAttachPar is
in domain of arc
More...
 
static gp_Pnt NearestApex (const gp_Elips &elips, const gp_Pnt &pApex, const gp_Pnt &nApex, const Standard_Real fpara, const Standard_Real lpara, Standard_Boolean &IsInDomain)
 computes nearest to ellipse arc apex
More...
 
static Standard_Real DistanceFromApex (const gp_Elips &elips, const gp_Pnt &Apex, const Standard_Real par)
 computes length of ellipse arc in parametric units
More...
 
static void ComputeProjEdgePresentation (const Handle< Prs3d_Presentation > &aPres, const Handle< AIS_Drawer > &aDrawer, 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)
 
static void ComputeProjVertexPresentation (const Handle< Prs3d_Presentation > &aPres, const Handle< AIS_Drawer > &aDrawer, 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)
 

Detailed Description

Application Interactive Services provide the means to
create links between an application GUI viewer and
the packages which are used to manage selection
and presentation. The tools AIS defined in order to
do this include different sorts of entities: both the
selectable viewable objects themselves and the
context and attribute managers to define their
selection and display.
To orient the user as he works in a modeling
environment, views and selections must be
comprehensible. There must be several different sorts
of selectable and viewable object defined. These must
also be interactive, that is, connecting graphic
representation and the underlying reference
geometry. These entities are called Interactive
Objects, and are divided into four types:

Member Function Documentation

static Standard_Boolean AIS::ComputeGeomCurve ( Handle< Geom_Curve > &  aCurve,
const Standard_Real  first1,
const Standard_Real  last1,
gp_Pnt FirstPnt1,
gp_Pnt LastPnt1,
const Handle< Geom_Plane > &  aPlane,
Standard_Boolean isOnPlane 
)
static

Checks if aCurve belongs to aPlane; if not, projects aCurve in aPlane
and returns aCurve;
Return TRUE if ok

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theEdge,
Handle< Geom_Curve > &  theCurve,
gp_Pnt theFirstPnt,
gp_Pnt theLastPnt 
)
static

Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any
Return TRUE if ok.

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theEdge,
Handle< Geom_Curve > &  theCurve,
gp_Pnt theFirstPnt,
gp_Pnt theLastPnt,
Standard_Boolean theIsInfinite 
)
static

Used by dimensions only.
Computes the 3d geometry of <anEdge>.
Return TRUE if ok.

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theEdge,
Handle< Geom_Curve > &  theCurve,
gp_Pnt theFirstPnt,
gp_Pnt theLastPnt,
Handle< Geom_Curve > &  theExtCurve,
Standard_Boolean theIsInfinite,
Standard_Boolean theIsOnPlane,
const Handle< Geom_Plane > &  thePlane 
)
static

Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any.
If <aCurve> is not in the current plane, <extCurve> contains
the not projected curve associated to <anEdge>.
If <anEdge> is infinite, <isinfinite> = true and the 2
parameters <FirstPnt> and <LastPnt> have no signification.
Return TRUE if ok.

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theFirstEdge,
const TopoDS_Edge theSecondEdge,
Handle< Geom_Curve > &  theFirstCurve,
Handle< Geom_Curve > &  theSecondCurve,
gp_Pnt theFirstPnt1,
gp_Pnt theLastPnt1,
gp_Pnt theFirstPnt2,
gp_Pnt theLastPnt2,
const Handle< Geom_Plane > &  thePlane 
)
static

Used by 2d Relation only
Computes the 3d geometry of <anEdge> in the current WorkingPlane
and the extremities if any
Return TRUE if ok.

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theFirstEdge,
const TopoDS_Edge theSecondEdge,
Handle< Geom_Curve > &  theFirstCurve,
Handle< Geom_Curve > &  theSecondCurve,
gp_Pnt theFirstPnt1,
gp_Pnt theLastPnt1,
gp_Pnt theFirstPnt2,
gp_Pnt theLastPnt2,
Standard_Boolean theIsinfinite1,
Standard_Boolean theIsinfinite2 
)
static

Used by dimensions only.Computes the 3d geometry
of<anEdge1> and <anEdge2> and checks if they are infinite.

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Edge theFirstEdge,
const TopoDS_Edge theSecondEdge,
Standard_Integer theExtIndex,
Handle< Geom_Curve > &  theFirstCurve,
Handle< Geom_Curve > &  theSecondCurve,
gp_Pnt theFirstPnt1,
gp_Pnt theLastPnt1,
gp_Pnt theFirstPnt2,
gp_Pnt theLastPnt2,
Handle< Geom_Curve > &  theExtCurve,
Standard_Boolean theIsinfinite1,
Standard_Boolean theIsinfinite2,
const Handle< Geom_Plane > &  thePlane 
)
static

Used by 2d Relation only Computes the 3d geometry
of<anEdge1> and <anEdge2> in the current Plane and the
extremities if any. Return in ExtCurve the 3d curve
(not projected in the plane) of the first edge if
<indexExt> =1 or of the 2nd edge if <indexExt> = 2. If
<indexExt> = 0, ExtCurve is Null. if there is an edge
external to the plane, <isinfinite> is true if this
edge is infinite. So, the extremities of it are not
significant. Return TRUE if ok

static Standard_Boolean AIS::ComputeGeometry ( const TopoDS_Vertex aVertex,
gp_Pnt point,
const Handle< Geom_Plane > &  aPlane,
Standard_Boolean isOnPlane 
)
static
static void AIS::ComputeProjEdgePresentation ( const Handle< Prs3d_Presentation > &  aPres,
const Handle< AIS_Drawer > &  aDrawer,
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 
)
static
static void AIS::ComputeProjVertexPresentation ( const Handle< Prs3d_Presentation > &  aPres,
const Handle< AIS_Drawer > &  aDrawer,
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 
)
static
static Standard_Real AIS::DistanceFromApex ( const gp_Elips elips,
const gp_Pnt Apex,
const Standard_Real  par 
)
static

computes length of ellipse arc in parametric units

static gp_Pnt AIS::Farest ( const TopoDS_Shape aShape,
const gp_Pnt aPoint 
)
static
static Standard_Boolean AIS::GetPlaneFromFace ( const TopoDS_Face aFace,
gp_Pln aPlane,
Handle< Geom_Surface > &  aSurf,
AIS_KindOfSurface aSurfType,
Standard_Real Offset 
)
static

Tryes to get Plane from Face. Returns Surface of Face
in aSurf. Returns Standard_True and Plane of Face in
aPlane in following cases:
Face is Plane, Offset of Plane,
Extrusion of Line and Offset of Extrusion of Line
Returns pure type of Surface which can be:
Plane, Cylinder, Cone, Sphere, Torus,
SurfaceOfRevolution, SurfaceOfExtrusion

static Standard_Boolean AIS::InDomain ( const Standard_Real  aFirstPar,
const Standard_Real  aLastPar,
const Standard_Real  anAttachPar 
)
static

returns True if point with anAttachPar is
in domain of arc

static Standard_Boolean AIS::InitAngleBetweenCurvilinearFaces ( const TopoDS_Face theFirstFace,
const TopoDS_Face theSecondFace,
const AIS_KindOfSurface  theFirstSurfType,
const AIS_KindOfSurface  theSecondSurfType,
gp_Pnt theCenter,
gp_Pnt theFirstAttach,
gp_Pnt theSecondAttach,
const Standard_Boolean  theIsFirstPointSet = Standard_False 
)
static

 Finds three points for the angle dimension between <br>

two curvilinear surfaces.

static Standard_Boolean AIS::InitAngleBetweenPlanarFaces ( const TopoDS_Face theFirstFace,
const TopoDS_Face theSecondFace,
gp_Pnt theCenter,
gp_Pnt theFirstAttach,
gp_Pnt theSecondAttach,
const Standard_Boolean  theIsFirstPointSet = Standard_False 
)
static

 Finds three points for the angle dimension between <br>

two planes.

static void AIS::InitFaceLength ( const TopoDS_Face aFace,
gp_Pln aPlane,
Handle< Geom_Surface > &  aSurface,
AIS_KindOfSurface aSurfaceType,
Standard_Real anOffset 
)
static
static void AIS::InitLengthBetweenCurvilinearFaces ( const TopoDS_Face theFirstFace,
const TopoDS_Face theSecondFace,
Handle< Geom_Surface > &  theFirstSurf,
Handle< Geom_Surface > &  theSecondSurf,
gp_Pnt theFirstAttach,
gp_Pnt theSecondAttach,
gp_Dir theDirOnPlane 
)
static

Finds attachment points on two curvilinear faces for length dimension.

Parameters
thePlaneDir[in] the direction on the dimension plane to
compute the plane automatically. It will not be taken into account if
plane is defined by user.
static gp_Pnt AIS::Nearest ( const TopoDS_Shape aShape,
const gp_Pnt aPoint 
)
static

Returns the nearest point in a shape. This is used by
several classes in calculation of dimensions.

static gp_Pnt AIS::Nearest ( const gp_Lin theLine,
const gp_Pnt thePoint 
)
static
Returns
the nearest point on the line.
static Standard_Boolean AIS::Nearest ( const Handle< Geom_Curve > &  theCurve,
const gp_Pnt thePoint,
const gp_Pnt theFirstPoint,
const gp_Pnt theLastPoint,
gp_Pnt theNearestPoint 
)
static

For the given point finds nearest point on the curve,

Returns
TRUE if found point is belongs to the curve
and FALSE otherwise.
static gp_Pnt AIS::NearestApex ( const gp_Elips elips,
const gp_Pnt pApex,
const gp_Pnt nApex,
const Standard_Real  fpara,
const Standard_Real  lpara,
Standard_Boolean IsInDomain 
)
static

computes nearest to ellipse arc apex

static gp_Pnt AIS::ProjectPointOnLine ( const gp_Pnt aPoint,
const gp_Lin aLine 
)
static
static gp_Pnt AIS::ProjectPointOnPlane ( const gp_Pnt aPoint,
const gp_Pln aPlane 
)
static
static gp_Pnt AIS::TranslatePointToBound ( const gp_Pnt aPoint,
const gp_Dir aDir,
const Bnd_Box aBndBox 
)
static

The documentation for this class was generated from the following file: