CAD Element Definition This class is used to define and use a CAD object element. More...
#include <rvc/cadelement.h>
Classes | |
| class | BOX |
| CAD element TYPE_RotationBox class implementation. More... | |
| class | DRAW |
| CADELEMENT Interface class to render and/or transform CAD Elements into common types. More... | |
| class | INSERT |
| CAD element TYPE_Insert class implementation. More... | |
| class | MESH |
| CAD element TYPE_Mesh class implementation. More... | |
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 | |
| CADELEMENT (const CADELEMENT &rhs) | |
| CADELEMENT () | |
| ~CADELEMENT () | |
| void | Clear () |
| double | ComputeDistanceFrom (const DPOINT2D &point) const |
| bool | ComputeExtents (DRECT3D &Extents, const RVC::STYLE *StyleObj=0) 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, DIMENSION dim=DIMENSION_2D) |
| ELEMTYPE | GetApproximateElementType () 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 | GetGMLElement (MISTRING &GMLElement, const MILIST< std::pair< MISTRING, MISTRING > > &AttribList) |
| 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 |
| bool | IsValid () const |
| CADELEMENT & | operator= (const CADELEMENT &rhs) |
| void | SetBaselineFit (bool value) |
| void | SetBaselineSplineFit (bool value) |
| void | SetBox (const BOX &Box) |
| void | SetClipUnder (bool value) |
| void | SetDatabaseIndex (INT32 index) |
| bool | SetElementFromGML (const MISTRING &GMLElement, MILIST< std::pair< MISTRING, MISTRING > > &AttribList) |
| 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, DIMENSION dim=DIMENSION_2D) |
| void | SetMesh (const MESH &Mesh) |
| void | SetPlaneConic (const PLANECONIC &Conic) |
| void | SetPoint (const DPOINT3D &point, DIMENSION dim=DIMENSION_2D) |
| void | SetPoints (const POLYLINE &PointArray, DIMENSION dim=DIMENSION_2D) |
| void | SetPolyLine (const POLYLINE &PolyLine, DIMENSION dim=DIMENSION_2D) |
| void | SetRegion (const REGION2D &Region, DIMENSION dim=DIMENSION_2D) |
| void | SetSubRegion (const SUBREGION2D &SubRegion, DIMENSION dim=DIMENSION_2D) |
| void | SetTextElement (const POLYLINELIST &PolyLineList, const MISTRING &text, const TEXTSTYLE &style, const LABELFRAMEPARMS *FrameParms=0, DIMENSION dim=DIMENSION_2D) |
| void | SetWidthUnits (SCREENUNIT WidthUnits) |
| void | SetZValue (double zvalue) |
| bool | TestElement (const REGION2D &Region, TESTCRITERIA TestMode) const |
Static Public Member Functions | |
| static TEXTID | GetElementTypeTextID (TYPE CadType) |
CAD Element Definition This class is used to define and use a CAD object element.
Enumeration of the different CAD element types in use.
| RVC::CADELEMENT::CADELEMENT | ( | ) |
Default Constructor.
| RVC::CADELEMENT::CADELEMENT | ( | const CADELEMENT & | rhs | ) |
Copy Constructor.
| RVC::CADELEMENT::~CADELEMENT | ( | ) |
Destructor.
| void RVC::CADELEMENT::Clear | ( | ) |
Clear the element.
| double RVC::CADELEMENT::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::CADELEMENT::ComputeExtents | ( | DRECT3D & | Extents, | |
| const RVC::STYLE * | StyleObj = 0 | |||
| ) | const |
Compute the extents of this element NOTE: Does not compute extents from a TYPE_Insert element, use ComputeInsertExtents().
Compute the border polygon (rotated box) of the inserted CAD block defined by this element.
Compute the extents of the inserted CAD block defined by this element.
| void RVC::CADELEMENT::ConvertForward | ( | const TRANS3D & | t3d | ) |
Convert point coordinates using 3D perspective transformation.
| ERRVALUE RVC::CADELEMENT::ConvertForward | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation.
| void RVC::CADELEMENT::ConvertForward | ( | const TRANS2D_AFFINE & | taf | ) |
Convert point coordinates using affine transformation.
| ERRVALUE RVC::CADELEMENT::ConvertForwardDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation with densification.
| void RVC::CADELEMENT::ConvertInverse | ( | const TRANS3D & | t3d | ) |
Convert point coordinates using 3D perspective transformation.
| ERRVALUE RVC::CADELEMENT::ConvertInverse | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation.
| void RVC::CADELEMENT::ConvertInverse | ( | const TRANS2D_AFFINE & | taf | ) |
Convert point coordinates using affine transformation.
| ERRVALUE RVC::CADELEMENT::ConvertInverseDense | ( | const TRANS2D_MAPGEN & | tmg | ) |
Convert point coordinates using generic transformation with densification.
| ERRVALUE RVC::CADELEMENT::DrawElement | ( | DRAW & | Draw, | |
| const TRANS2D_AFFINE & | BlockToCAD, | |||
| double | MinChordDist = 0.0, |
|||
| DIMENSION | dim = DIMENSION_2D | |||
| ) |
'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::CADELEMENT::DRAW class for the primitives that the CADELEMENT class is transformed to. NOTE: Does not 'draw' from an TYPE_Insert element
| BlockToCAD | Affine transformation from inserted block to CAD object coordinates | |
| MinChordDist | Default is to use 5 of the Radius length |
| ELEMTYPE RVC::CADELEMENT::GetApproximateElementType | ( | ) | const |
Get the approximate element type.
| bool RVC::CADELEMENT::GetBox | ( | BOX & | Box | ) | const |
Get the TYPE_RotationBox from this.
| INT32 RVC::CADELEMENT::GetDatabaseIndex | ( | ) | const |
Get the database index for this element.
| bool RVC::CADELEMENT::GetElementStyle | ( | POLYSTYLE & | polystyle | ) | const |
Get the POLYSTYLE for this type.
| bool RVC::CADELEMENT::GetElementStyle | ( | LINESTYLE & | linestyle | ) | const |
Get the LINESTYLE for this type.
| bool RVC::CADELEMENT::GetElementStyle | ( | POINTSTYLE & | pointstyle | ) | const |
Get the POINTSTYLE for this type.
| bool RVC::CADELEMENT::GetElementStyle | ( | TEXTSTYLE & | textstyle | ) | const |
Get the TEXTSTYLE for this type.
| TYPE RVC::CADELEMENT::GetElementType | ( | ) | const |
Get the CADELEMENT::TYPE designation for this.
Get the TEXTID for the CADELEMENT::TYPE specified.
| bool RVC::CADELEMENT::GetGMLElement | ( | MISTRING & | GMLElement, | |
| const MILIST< std::pair< MISTRING, MISTRING > > & | AttribList | |||
| ) |
Get the GML element string based on 'this'.
| AttribList | List of attributes to add to the element definition (first -> name, second -> value) |
| bool RVC::CADELEMENT::GetInsert | ( | INSERT & | Insert | ) | const |
Get the TYPE_Insert from this.
| bool RVC::CADELEMENT::GetLabelFrameParms | ( | LABELFRAMEPARMS & | FrameParms | ) | const |
Get the Text Label frame parms information from this.
| bool RVC::CADELEMENT::GetLines | ( | POLYLINELIST & | PolyLineList | ) | const |
Get the line primitives from this.
| bool RVC::CADELEMENT::GetMesh | ( | MESH & | Mesh | ) | const |
Get the TYPE_Mesh from this.
| bool RVC::CADELEMENT::GetPlaneConic | ( | PLANECONIC & | Conic | ) | const |
Get the PLANECONIC representation from this.
| bool RVC::CADELEMENT::GetPoints | ( | POLYLINE & | PointArray | ) | const |
Get the point primitives from this.
| bool RVC::CADELEMENT::GetRegion | ( | REGION2D & | Region, | |
| bool | Validate = false | |||
| ) | const |
| bool RVC::CADELEMENT::GetSubRegion | ( | SUBREGION2D & | SubRegion, | |
| bool | Validate = false | |||
| ) | const |
Get the SUBREGION2D representation from this.
| bool RVC::CADELEMENT::GetTextElement | ( | POLYLINELIST & | PolyLineList, | |
| MISTRING & | text, | |||
| TEXTSTYLE & | style, | |||
| LABELFRAMEPARMS * | FrameParms = 0 | |||
| ) | const |
Get the Text element information from this.
| PolyLineList | First line is the baseline, the rest are leader lines |
| SCREENUNIT RVC::CADELEMENT::GetWidthUnits | ( | ) | const |
Get the units of width.
| double RVC::CADELEMENT::GetZValue | ( | ) | const |
Get the Z value assiociated with this element.
| bool RVC::CADELEMENT::IsBaselineFit | ( | ) | const |
Does the label follow the baseline?
| bool RVC::CADELEMENT::IsBaselineSplineFit | ( | ) | const |
Does the label follow the splined baseline?
| bool RVC::CADELEMENT::IsClipUnderSet | ( | ) | const |
Clip vector features under the label when rendering.
| bool RVC::CADELEMENT::IsInsertion | ( | ) | const |
Is the element an insertion element?
| bool RVC::CADELEMENT::IsLine | ( | ) | const |
Can the element be represented by open lines?
| bool RVC::CADELEMENT::IsPlaneConic | ( | ) | const |
Can the element be represented by a PLANECONIC.
| bool RVC::CADELEMENT::IsPoint | ( | ) | const |
Can the element be represented by one or more points?
| bool RVC::CADELEMENT::IsPointInside | ( | const DPOINT2D & | pt | ) | const |
Is the point inside the element?
| bool RVC::CADELEMENT::IsPolygon | ( | ) | const |
Can the element be represented by closed lines?
| bool RVC::CADELEMENT::IsText | ( | ) | const |
Is the element a text element?
| bool RVC::CADELEMENT::IsValid | ( | ) | const |
| CADELEMENT& RVC::CADELEMENT::operator= | ( | const CADELEMENT & | rhs | ) |
Assignment Operator.
| void RVC::CADELEMENT::SetBaselineFit | ( | bool | value | ) |
Set the label to follow the baseline.
| void RVC::CADELEMENT::SetBaselineSplineFit | ( | bool | value | ) |
Set the label to follow the splined baseline.
| void RVC::CADELEMENT::SetBox | ( | const BOX & | Box | ) |
Set the TYPE_RotationBox from 'Box'.
| void RVC::CADELEMENT::SetClipUnder | ( | bool | value | ) |
Set the label clip under flag.
| void RVC::CADELEMENT::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.
| bool RVC::CADELEMENT::SetElementFromGML | ( | const MISTRING & | GMLElement, | |
| MILIST< std::pair< MISTRING, MISTRING > > & | AttribList | |||
| ) |
Set 'this' based on the GML element which MUST derive from gml:AbstractGeometryType.
| AttribList | List of attributes not used in 'this' (first -> name, second -> value) |
| void RVC::CADELEMENT::SetElementStyle | ( | const POLYSTYLE & | polystyle | ) |
Set the POLYSTYLE for this type.
| void RVC::CADELEMENT::SetElementStyle | ( | const LINESTYLE & | linestyle | ) |
Set the LINESTYLE for this type.
| void RVC::CADELEMENT::SetElementStyle | ( | const POINTSTYLE & | pointstyle | ) |
Set the POINTSTYLE for this type.
| void RVC::CADELEMENT::SetElementStyle | ( | const TEXTSTYLE & | textstyle | ) |
Set the TEXTSTYLE for this type.
| void RVC::CADELEMENT::SetInsert | ( | const INSERT & | Insert | ) |
Set the TYPE_Insert from 'Insert'.
| void RVC::CADELEMENT::SetLines | ( | const POLYLINELIST & | PolyLineList, | |
| DIMENSION | dim = DIMENSION_2D | |||
| ) |
Set the element type and the data based on 'PolyLineList'.
| void RVC::CADELEMENT::SetMesh | ( | const MESH & | Mesh | ) |
Set the TYPE_Mesh from 'Mesh'.
| void RVC::CADELEMENT::SetPlaneConic | ( | const PLANECONIC & | Conic | ) |
Set the element type and data based on 'Conic'.
Set the element type and data based on 'point'.
Set the element type and data based on 'PointArray'.
Set the element type and data based on 'PolyLine'.
Set the element type and data based on 'Region'.
| void RVC::CADELEMENT::SetSubRegion | ( | const SUBREGION2D & | SubRegion, | |
| DIMENSION | dim = DIMENSION_2D | |||
| ) |
Set the element type and data based on 'SubRegion'.
| void RVC::CADELEMENT::SetTextElement | ( | const POLYLINELIST & | PolyLineList, | |
| const MISTRING & | text, | |||
| const TEXTSTYLE & | style, | |||
| const LABELFRAMEPARMS * | FrameParms = 0, |
|||
| DIMENSION | dim = DIMENSION_2D | |||
| ) |
Set the TYPE_Text from the information passed in.
| PolyLineList | First line is the baseline, the rest are leader lines |
| void RVC::CADELEMENT::SetWidthUnits | ( | SCREENUNIT | WidthUnits | ) |
Set the units of width.
| void RVC::CADELEMENT::SetZValue | ( | double | zvalue | ) |
Set the Z value assiociated with this element.
| bool RVC::CADELEMENT::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.
1.6.1