RVC::CAD::ELEMENT Class Reference

CAD Element Definition This class is used to define and use a CAD object element. More...

#include <rvc/cad.h>

List of all members.

Public Types

enum  TYPE {
  TYPE_Insert = 0, TYPE_Point = 1, TYPE_Circle = 2, TYPE_Arc = 3,
  TYPE_ArcChord = 4, TYPE_Text = 5, TYPE_Line = 7, TYPE_RotationBox = 8,
  TYPE_Polygon = 9, TYPE_Mesh = 10, TYPE_Ellipse = 11, TYPE_EllipticalArc = 12,
  TYPE_ArcWedge = 14, TYPE_EllipticalArcWedge = 15, TYPE_EllipticalArcChord = 16, TYPE_MultiLine = 17,
  TYPE_MultiPoint = 18, TYPE_MultiPolygon = 19, TYPE_LAST
}

Public Member Functions

void Clear ()
double ComputeDistanceFrom (const DPOINT2D &point) const
bool ComputeExtents (DRECT3D &Extents) const
bool ComputeInsertBorder (const CAD &CadObj, POLYLINE &Border) const
bool ComputeInsertExtents (const CAD &CadObj, DRECT3D &Extents) const
void ConvertForward (const TRANS3D &t3d)
ERRVALUE ConvertForward (const TRANS2D_MAPGEN &tmg)
void ConvertForward (const TRANS2D_AFFINE &taf)
ERRVALUE ConvertForwardDense (const TRANS2D_MAPGEN &tmg)
void ConvertInverse (const TRANS3D &t3d)
ERRVALUE ConvertInverse (const TRANS2D_MAPGEN &tmg)
void ConvertInverse (const TRANS2D_AFFINE &taf)
ERRVALUE ConvertInverseDense (const TRANS2D_MAPGEN &tmg)
ERRVALUE DrawElement (DRAW &Draw, const TRANS2D_AFFINE &BlockToCAD, double MinChordDist=0.0)
 ELEMENT (const ELEMENT &rhs)
 ELEMENT ()
ELEMTYPE GetAppoxElementType () const
bool GetBox (BOX &Box) const
INT32 GetDatabaseIndex () const
bool GetElementStyle (POLYSTYLE &polystyle) const
bool GetElementStyle (LINESTYLE &linestyle) const
bool GetElementStyle (POINTSTYLE &pointstyle) const
bool GetElementStyle (TEXTSTYLE &textstyle) const
TYPE GetElementType () const
bool GetInsert (INSERT &Insert) const
bool GetLabelFrameParms (LABELFRAMEPARMS &FrameParms) const
bool GetLines (POLYLINELIST &PolyLineList) const
bool GetMesh (MESH &Mesh) const
bool GetPlaneConic (PLANECONIC &Conic) const
bool GetPoints (POLYLINE &PointArray) const
bool GetRegion (REGION2D &Region, bool Validate=false) const
bool GetSubRegion (SUBREGION2D &SubRegion, bool Validate=false) const
bool GetTextElement (POLYLINELIST &PolyLineList, MISTRING &text, TEXTSTYLE &style, LABELFRAMEPARMS *FrameParms=0) const
SCREENUNIT GetWidthUnits () const
double GetZValue () const
bool IsBaselineFit () const
bool IsBaselineSplineFit () const
bool IsClipUnderSet () const
bool IsInsertion () const
bool IsLine () const
bool IsPlaneConic () const
bool IsPoint () const
bool IsPointInside (const DPOINT2D &pt) const
bool IsPolygon () const
bool IsText () const
ELEMENToperator= (const ELEMENT &rhs)
void SetBaselineFit (bool value)
void SetBaselineSplineFit (bool value)
void SetBox (const BOX &Box)
void SetClipUnder (bool value)
void SetDatabaseIndex (INT32 index)
void SetElementStyle (const POLYSTYLE &polystyle)
void SetElementStyle (const LINESTYLE &linestyle)
void SetElementStyle (const POINTSTYLE &pointstyle)
void SetElementStyle (const TEXTSTYLE &textstyle)
void SetInsert (const INSERT &Insert)
void SetLines (const POLYLINELIST &PolyLineList)
void SetMesh (const MESH &Mesh)
void SetPlaneConic (const PLANECONIC &Conic)
void SetPoint (const DPOINT3D &point)
void SetPoints (const POLYLINE &PointArray)
void SetPolyLine (const POLYLINE &PolyLine)
void SetRegion (const REGION2D &Region)
void SetSubRegion (const SUBREGION2D &SubRegion)
void SetTextElement (const POLYLINELIST &PolyLineList, const MISTRING &text, const TEXTSTYLE &style, const LABELFRAMEPARMS *FrameParms=0)
void SetWidthUnits (SCREENUNIT WidthUnits)
void SetZValue (double zvalue)
bool TestElement (const REGION2D &Region, TESTCRITERIA TestMode) const
 ~ELEMENT ()

Static Public Member Functions

TEXTID GetElementTypeTextID (TYPE CadType)

Private Member Functions

void ClearGeometric ()
void ComputeStringExtents (DRECT3D &Extents) const
void GeneratePointsFromBox (POLYLINE &PolyLine) const
void GetPolyLineList (POLYLINELIST &PolyLineList) const
void SetPolyLineList (const POLYLINELIST &PolyLineList)
void TranslatePatterns (const SIMPLE_ARRAY< INT32 > PattTrans[RVC::STYLE::PATTERN_NumTypes])

Private Attributes

CADELEMDATA m_ElemData
CADELEMHDR m_ElemHdr
CADELEMOPT m_ElemOpt
SIMPLE_ARRAY< INT32m_IsleList
POLYLINE m_Points
MISTRING m_String
SIMPLE_ARRAY< CADSUBPOLYm_SubPolyList


Detailed Description

CAD Element Definition This class is used to define and use a CAD object element.

Definition at line 533 of file cad.h.


Member Enumeration Documentation

enum RVC::CAD::ELEMENT::TYPE
 

Enumeration of the different CAD element types in use.

Enumeration values:
TYPE_Insert 
TYPE_Point 
TYPE_Circle 
TYPE_Arc 
TYPE_ArcChord 
TYPE_Text 
TYPE_Line 
TYPE_RotationBox 
TYPE_Polygon 
TYPE_Mesh 
TYPE_Ellipse 
TYPE_EllipticalArc 
TYPE_ArcWedge 
TYPE_EllipticalArcWedge 
TYPE_EllipticalArcChord 
TYPE_MultiLine 
TYPE_MultiPoint 
TYPE_MultiPolygon 
TYPE_LAST 

Definition at line 537 of file cad.h.


Constructor & Destructor Documentation

RVC::CAD::ELEMENT::ELEMENT  ) 
 

Default Constructor.

RVC::CAD::ELEMENT::ELEMENT const ELEMENT rhs  ) 
 

Copy Constructor.

RVC::CAD::ELEMENT::~ELEMENT  ) 
 

Destructor.


Member Function Documentation

void RVC::CAD::ELEMENT::Clear  ) 
 

Clear the element.

void RVC::CAD::ELEMENT::ClearGeometric  )  [private]
 

double RVC::CAD::ELEMENT::ComputeDistanceFrom const DPOINT2D point  )  const
 

Compute the closest distance from an element to the point given NOTE: Does not compute distance from a TYPE_Insert element.

bool RVC::CAD::ELEMENT::ComputeExtents DRECT3D Extents  )  const
 

Compute the extents of this element NOTE: Does not compute extents from a TYPE_Insert element, use ComputeInsertExtents().

Returns:
'True' if the extents can be calculated, 'false' if not

bool RVC::CAD::ELEMENT::ComputeInsertBorder const CAD CadObj,
POLYLINE Border
const
 

Compute the border polygon (rotated box) of the inserted CAD block defined by this element.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not

bool RVC::CAD::ELEMENT::ComputeInsertExtents const CAD CadObj,
DRECT3D Extents
const
 

Compute the extents of the inserted CAD block defined by this element.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not

void RVC::CAD::ELEMENT::ComputeStringExtents DRECT3D Extents  )  const [private]
 

void RVC::CAD::ELEMENT::ConvertForward const TRANS3D t3d  ) 
 

Convert point coordinates using 3D perspective transformation.

ERRVALUE RVC::CAD::ELEMENT::ConvertForward const TRANS2D_MAPGEN tmg  ) 
 

Convert point coordinates using generic transformation.

void RVC::CAD::ELEMENT::ConvertForward const TRANS2D_AFFINE taf  ) 
 

Convert point coordinates using affine transformation.

ERRVALUE RVC::CAD::ELEMENT::ConvertForwardDense const TRANS2D_MAPGEN tmg  ) 
 

Convert point coordinates using generic transformation with densification.

void RVC::CAD::ELEMENT::ConvertInverse const TRANS3D t3d  ) 
 

Convert point coordinates using 3D perspective transformation.

ERRVALUE RVC::CAD::ELEMENT::ConvertInverse const TRANS2D_MAPGEN tmg  ) 
 

Convert point coordinates using generic transformation.

void RVC::CAD::ELEMENT::ConvertInverse const TRANS2D_AFFINE taf  ) 
 

Convert point coordinates using affine transformation.

ERRVALUE RVC::CAD::ELEMENT::ConvertInverseDense const TRANS2D_MAPGEN tmg  ) 
 

Convert point coordinates using generic transformation with densification.

ERRVALUE RVC::CAD::ELEMENT::DrawElement DRAW Draw,
const TRANS2D_AFFINE BlockToCAD,
double  MinChordDist = 0.0
 

'Draw' the element using the "DRAW" interface class passed in This method takes the individual elements and does a transformation to a well known construct to simplify handling of multiple data types.

See RVC::CAD::ELEMENT::DRAW class for the primitives that the ELEMENT class is transformed to. NOTE: Does not 'draw' from an TYPE_Insert element

Parameters:
BlockToCAD  Affine transformation from inserted block to CAD object coordinates
MinChordDist  Default is to use 5 of the Radius length

void RVC::CAD::ELEMENT::GeneratePointsFromBox POLYLINE PolyLine  )  const [private]
 

ELEMTYPE RVC::CAD::ELEMENT::GetAppoxElementType  )  const
 

Get the approximate element type.

Returns:
ELEMTYPE_Point, ELEMTYPE_Line, ELEMTYPE_Polygon, ELEMTYPE_Label, or ELEMTYPE_Empty if cannot be represented

bool RVC::CAD::ELEMENT::GetBox BOX Box  )  const
 

Get the TYPE_RotationBox from this.

Returns:
'True' if the element is a TYPE_RotationBox, 'false' if not

INT32 RVC::CAD::ELEMENT::GetDatabaseIndex  )  const
 

Get the database index for this element.

Returns:
'-1' if no database element index exists for this element, >=0 for valid database element index

bool RVC::CAD::ELEMENT::GetElementStyle POLYSTYLE polystyle  )  const
 

Get the POLYSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not

bool RVC::CAD::ELEMENT::GetElementStyle LINESTYLE linestyle  )  const
 

Get the LINESTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not

bool RVC::CAD::ELEMENT::GetElementStyle POINTSTYLE pointstyle  )  const
 

Get the POINTSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not

bool RVC::CAD::ELEMENT::GetElementStyle TEXTSTYLE textstyle  )  const
 

Get the TEXTSTYLE for this type.

Returns:
'true' if the method is able to set the element style based on its element type, 'false' if not

TYPE RVC::CAD::ELEMENT::GetElementType  )  const
 

Get the ELEMENT::TYPE designation for this.

Returns:
ELEMENT::TYPE

TEXTID RVC::CAD::ELEMENT::GetElementTypeTextID TYPE  CadType  )  [static]
 

Get the TEXTID for the CAD::ELEMENT::TYPE specified.

bool RVC::CAD::ELEMENT::GetInsert INSERT Insert  )  const
 

Get the TYPE_Insert from this.

Returns:
'True' if the element is a TYPE_Insert, 'false' if not

bool RVC::CAD::ELEMENT::GetLabelFrameParms LABELFRAMEPARMS FrameParms  )  const
 

Get the Text Label frame parms information from this.

Returns:
'True' if the element is a TYPE_Text type, 'false' if not

bool RVC::CAD::ELEMENT::GetLines POLYLINELIST PolyLineList  )  const
 

Get the line primitives from this.

Returns:
'True' if the element is made up of a list of POLYLINE's, 'false' if not

bool RVC::CAD::ELEMENT::GetMesh MESH Mesh  )  const
 

Get the TYPE_Mesh from this.

Returns:
'True' if the element is a TYPE_Mesh, 'false' if not

bool RVC::CAD::ELEMENT::GetPlaneConic PLANECONIC Conic  )  const
 

Get the PLANECONIC representation from this.

Returns:
'True' if the element is a PLANECONIC type, 'false' if not

bool RVC::CAD::ELEMENT::GetPoints POLYLINE PointArray  )  const
 

Get the point primitives from this.

Returns:
'True' if the element is made up of one or more points, 'false' if not

void RVC::CAD::ELEMENT::GetPolyLineList POLYLINELIST PolyLineList  )  const [private]
 

bool RVC::CAD::ELEMENT::GetRegion REGION2D Region,
bool  Validate = false
const
 

Get the REGION2D representation from this.

Returns:
'True' if the element is a REGION2D type, 'false' if not

bool RVC::CAD::ELEMENT::GetSubRegion SUBREGION2D SubRegion,
bool  Validate = false
const
 

Get the SUBREGION2D representation from this.

Returns:
'True' if the element is a SUBREGION2D type, 'false' if not

bool RVC::CAD::ELEMENT::GetTextElement POLYLINELIST PolyLineList,
MISTRING text,
TEXTSTYLE style,
LABELFRAMEPARMS FrameParms = 0
const
 

Get the Text element information from this.

Returns:
'True' if the element is a TYPE_Text type, 'false' if not
Parameters:
PolyLineList  First line is the baseline, the rest are leader lines

SCREENUNIT RVC::CAD::ELEMENT::GetWidthUnits  )  const
 

Get the units of width.

double RVC::CAD::ELEMENT::GetZValue  )  const
 

Get the Z value assiociated with this element.

bool RVC::CAD::ELEMENT::IsBaselineFit  )  const
 

Does the label follow the baseline?

Returns:
'True' if label follows baseline

bool RVC::CAD::ELEMENT::IsBaselineSplineFit  )  const
 

Does the label follow the splined baseline?

Returns:
'True' if label follows the splined baseline

bool RVC::CAD::ELEMENT::IsClipUnderSet  )  const
 

Clip vector features under the label when rendering.

Returns:
'True' if features under the label needs to be clipped

bool RVC::CAD::ELEMENT::IsInsertion  )  const
 

Is the element an insertion element?

Returns:
'True' if the element is a TYPE_Insert, 'false' if not

bool RVC::CAD::ELEMENT::IsLine  )  const
 

Can the element be represented by open lines?

Returns:
'True' if the element can be represented by open lines, 'false' if not

bool RVC::CAD::ELEMENT::IsPlaneConic  )  const
 

Can the element be represented by a PLANECONIC.

Returns:
'True' if the element can be represented by a PLANECONIC, 'false' if not

bool RVC::CAD::ELEMENT::IsPoint  )  const
 

Can the element be represented by one or more points?

Returns:
'True' if the element can be represented by one or more points, 'false' if not

bool RVC::CAD::ELEMENT::IsPointInside const DPOINT2D pt  )  const
 

Is the point inside the element?

Returns:
'True' if the element is a polygon (IsPolygon() == true) and the point is inside it, 'false' if not

bool RVC::CAD::ELEMENT::IsPolygon  )  const
 

Can the element be represented by closed lines?

Returns:
'True' if the element can be represented by closed lines, 'false' if not

bool RVC::CAD::ELEMENT::IsText  )  const
 

Is the element a text element?

Returns:
'True' if the element is a TYPE_Text, 'false' if not

ELEMENT& RVC::CAD::ELEMENT::operator= const ELEMENT rhs  ) 
 

Assignment Operator.

void RVC::CAD::ELEMENT::SetBaselineFit bool  value  ) 
 

Set the label to follow the baseline.

void RVC::CAD::ELEMENT::SetBaselineSplineFit bool  value  ) 
 

Set the label to follow the splined baseline.

void RVC::CAD::ELEMENT::SetBox const BOX Box  ) 
 

Set the TYPE_RotationBox from 'Box'.

void RVC::CAD::ELEMENT::SetClipUnder bool  value  ) 
 

Set the label clip under flag.

void RVC::CAD::ELEMENT::SetDatabaseIndex INT32  index  ) 
 

Set the database index for this element: '-1' if no database element index exists for this element, >=0 for valid database element index.

void RVC::CAD::ELEMENT::SetElementStyle const POLYSTYLE polystyle  ) 
 

Set the POLYSTYLE for this type.

void RVC::CAD::ELEMENT::SetElementStyle const LINESTYLE linestyle  ) 
 

Set the LINESTYLE for this type.

void RVC::CAD::ELEMENT::SetElementStyle const POINTSTYLE pointstyle  ) 
 

Set the POINTSTYLE for this type.

void RVC::CAD::ELEMENT::SetElementStyle const TEXTSTYLE textstyle  ) 
 

Set the TEXTSTYLE for this type.

void RVC::CAD::ELEMENT::SetInsert const INSERT Insert  ) 
 

Set the TYPE_Insert from 'Insert'.

void RVC::CAD::ELEMENT::SetLines const POLYLINELIST PolyLineList  ) 
 

Set the element type and the data based on 'PolyLineList'.

void RVC::CAD::ELEMENT::SetMesh const MESH Mesh  ) 
 

Set the TYPE_Mesh from 'Mesh'.

void RVC::CAD::ELEMENT::SetPlaneConic const PLANECONIC Conic  ) 
 

Set the element type and data based on 'Conic'.

void RVC::CAD::ELEMENT::SetPoint const DPOINT3D point  ) 
 

Set the element type and data based on 'point'.

void RVC::CAD::ELEMENT::SetPoints const POLYLINE PointArray  ) 
 

Set the element type and data based on 'PointArray'.

void RVC::CAD::ELEMENT::SetPolyLine const POLYLINE PolyLine  ) 
 

Set the element type and data based on 'PolyLine'.

void RVC::CAD::ELEMENT::SetPolyLineList const POLYLINELIST PolyLineList  )  [private]
 

void RVC::CAD::ELEMENT::SetRegion const REGION2D Region  ) 
 

Set the element type and data based on 'Region'.

void RVC::CAD::ELEMENT::SetSubRegion const SUBREGION2D SubRegion  ) 
 

Set the element type and data based on 'SubRegion'.

void RVC::CAD::ELEMENT::SetTextElement const POLYLINELIST PolyLineList,
const MISTRING text,
const TEXTSTYLE style,
const LABELFRAMEPARMS FrameParms = 0
 

Set the TYPE_Text from the information passed in.

Parameters:
PolyLineList  First line is the baseline, the rest are leader lines

void RVC::CAD::ELEMENT::SetWidthUnits SCREENUNIT  WidthUnits  ) 
 

Set the units of width.

void RVC::CAD::ELEMENT::SetZValue double  zvalue  ) 
 

Set the Z value assiociated with this element.

bool RVC::CAD::ELEMENT::TestElement const REGION2D Region,
TESTCRITERIA  TestMode
const
 

Test this to see if it passes the TEXTCRITERIA given using the REGION2D passed in NOTE: Cannot test a TYPE_Insert element.

Returns:
'True' if the element met the criteria, 'false' if not

void RVC::CAD::ELEMENT::TranslatePatterns const SIMPLE_ARRAY< INT32 PattTrans[RVC::STYLE::PATTERN_NumTypes]  )  [private]
 


Member Data Documentation

CADELEMDATA RVC::CAD::ELEMENT::m_ElemData [private]
 

Definition at line 953 of file cad.h.

CADELEMHDR RVC::CAD::ELEMENT::m_ElemHdr [private]
 

Definition at line 951 of file cad.h.

CADELEMOPT RVC::CAD::ELEMENT::m_ElemOpt [private]
 

Definition at line 952 of file cad.h.

SIMPLE_ARRAY<INT32> RVC::CAD::ELEMENT::m_IsleList [private]
 

Definition at line 956 of file cad.h.

POLYLINE RVC::CAD::ELEMENT::m_Points [private]
 

Definition at line 954 of file cad.h.

MISTRING RVC::CAD::ELEMENT::m_String [private]
 

Definition at line 955 of file cad.h.

SIMPLE_ARRAY<CADSUBPOLY> RVC::CAD::ELEMENT::m_SubPolyList [private]
 

Definition at line 957 of file cad.h.


The documentation for this class was generated from the following file:
Generated on Tue Dec 14 13:21:11 2004 for TNTsdk by  doxygen 1.3.8-20040913