PartGui::VectorAdapter Class Reference

Convert to vector. More...

#include <TaskDimension.h>

Public Member Functions

gp_Vec getPickPoint () const
 
bool isValid () const
 
 operator gp_Lin () const
 
 operator gp_Vec () const
 
 VectorAdapter ()
 
 VectorAdapter (const gp_Vec &vector1, const gp_Vec &vector2)
 
 VectorAdapter (const TopoDS_Edge &edgeIn, const gp_Vec &pickedPointIn)
 
 VectorAdapter (const TopoDS_Face &faceIn, const gp_Vec &pickedPointIn)
 
 VectorAdapter (const TopoDS_Vertex &vertex1In, const TopoDS_Vertex &vertex2In)
 

Detailed Description

Convert to vector.

Used to construct a vector from various input types

Constructor & Destructor Documentation

◆ VectorAdapter() [1/5]

PartGui::VectorAdapter::VectorAdapter ( )

default construction isValid is set to false

◆ VectorAdapter() [2/5]

PartGui::VectorAdapter::VectorAdapter ( const TopoDS_Face &  faceIn,
const gp_Vec &  pickedPointIn 
)

Build a vector from a faceIn

Parameters
faceInvector will be normal to plane and equal to cylindrical axis.
pickedPointInlocation of pick. straight conversion from sbvec. not accurate.

◆ VectorAdapter() [3/5]

PartGui::VectorAdapter::VectorAdapter ( const TopoDS_Edge &  edgeIn,
const gp_Vec &  pickedPointIn 
)

Build a vector from an edgeIn

Parameters
edgeInvector will be lastPoint - firstPoint.
pickedPointInlocation of pick. straight conversion from sbvec. not accurate.

References PartGui::convert().

◆ VectorAdapter() [4/5]

PartGui::VectorAdapter::VectorAdapter ( const TopoDS_Vertex &  vertex1In,
const TopoDS_Vertex &  vertex2In 
)

Build a vector From 2 vertices. vector will be equal to

Parameters
vertex2In-
vertex1In.

References PartGui::convert().

◆ VectorAdapter() [5/5]

PartGui::VectorAdapter::VectorAdapter ( const gp_Vec &  vector1,
const gp_Vec &  vector2 
)

Build a vector From 2 vectors. vector will be equal to

Parameters
vector2-
vector1.

Member Function Documentation

◆ getPickPoint()

gp_Vec PartGui::VectorAdapter::getPickPoint ( ) const

◆ isValid()

bool PartGui::VectorAdapter::isValid ( void  ) const

make sure no errors in vector construction.

Returns
true = vector is good. false = vector is NOT good.

Referenced by PartGui::TaskMeasureAngular::buildDimension().

◆ operator gp_Lin()

PartGui::VectorAdapter::operator gp_Lin ( ) const

build occ line used for extrema calculation

◆ operator gp_Vec()

PartGui::VectorAdapter::operator gp_Vec ( ) const

get the calculated vector.

Returns
the vector. use isValid to ensure correct results.

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