eVision Python API
Loading...
Searching...
No Matches
eVision.EVectorModel Class Reference

Represents a eVision.Legacy.EShape hierarchy with a single root. More...

Public Member Functions

None __init__ (self)
 Constructs an eVision.EVectorModel context.
None __init__ (self, eVision.EVectorModel other)
 Constructs an eVision.EVectorModel context.
None GetVectorModelExtremas (self, eVision.EFloatRange xRange, eVision.EFloatRange yRange, bool inSensorCoordinates)
 Retrieves the coordinate extrema of the vector model.
None GetVectorModelExtremas (self, eVision.EFloatRange xRange, eVision.EFloatRange yRange)
 Retrieves the coordinate extrema of the vector model.
None EnableDrawArea (self, int drawWindowWidth, int drawWindowHeight)
 Enables the drawing of the eVision.EVectorModel with a specific zoom and pan.
None DisableDrawArea (self)
 Disables the custom drawing of the eVision.EVectorModel with a specific zoom and pan.
None Load (self, str filePath)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
None Load (self, eVision.ESerializer|None serializer)
 Loads a Shape.The given eVision.ESerializer must have been created for reading.
None Save (self, eVision.ESerializer|None serializer)
 Saves a Shape.The given eVision.ESerializer must have been created for writing.
None Save (self, str filePath)
 Saves a Shape.The given eVision.ESerializer must have been created for writing.
None Draw (self, eVision.EDrawAdapter|None graphicContext)
 Draws a graphical representation of the hierarchy.
None LoadDXF (self, str fileName, float scale)
 Loads an eVision.EVectorModel from an ascii DXF file.
None LoadDXF (self, str fileName)
 Loads an eVision.EVectorModel from an ascii DXF file.
None LoadDXF (self, str fileName, float scale, eVision.EPoint origin)
 Loads an eVision.EVectorModel from an ascii DXF file.
eVision.Legacy.EFrameShape Root (self)
 Gets the root of the hierarchy.
float Scale (self)
 Gets the scale of the model.
 Scale (self, float value)
 Gets the scale of the model.
eVision.EPoint Center (self)
 Gets the center of the model.
 Center (self, eVision.EPoint value)
 Gets the center of the model.

Detailed Description

Represents a eVision.Legacy.EShape hierarchy with a single root.

This hierarchy can be retrieved from files in different file formats.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EVectorModel.__init__ ( self)

Constructs an eVision.EVectorModel context.

◆ __init__() [2/2]

None eVision.EVectorModel.__init__ ( self,
eVision.EVectorModel other )

Constructs an eVision.EVectorModel context.

Parameters
otherother eVision.EVectorModel to copy into this one.

Member Function Documentation

◆ Center() [1/2]

eVision.EPoint eVision.EVectorModel.Center ( self)

Gets the center of the model.

◆ Center() [2/2]

eVision.EVectorModel.Center ( self,
eVision.EPoint value )

Gets the center of the model.

◆ DisableDrawArea()

None eVision.EVectorModel.DisableDrawArea ( self)

Disables the custom drawing of the eVision.EVectorModel with a specific zoom and pan.

◆ Draw()

None eVision.EVectorModel.Draw ( self,
eVision.EDrawAdapter | None graphicContext )

Draws a graphical representation of the hierarchy.

Parameters
graphicContextHandle of the device context on which to draw.

◆ EnableDrawArea()

None eVision.EVectorModel.EnableDrawArea ( self,
int drawWindowWidth,
int drawWindowHeight )

Enables the drawing of the eVision.EVectorModel with a specific zoom and pan.

Default: false

Parameters
drawWindowWidthThe width of the window that the eVision.EVectorModel is drawn into
drawWindowHeightThe height of the window that the eVision.EVectorModel is drawn into

◆ GetVectorModelExtremas() [1/2]

None eVision.EVectorModel.GetVectorModelExtremas ( self,
eVision.EFloatRange xRange,
eVision.EFloatRange yRange )

Retrieves the coordinate extrema of the vector model.

Remarks:

An exception is thrown if the hierarchy is empty

Parameters
xRangeThe range along the X axis.
yRangeThe range along the Y axis.

◆ GetVectorModelExtremas() [2/2]

None eVision.EVectorModel.GetVectorModelExtremas ( self,
eVision.EFloatRange xRange,
eVision.EFloatRange yRange,
bool inSensorCoordinates )

Retrieves the coordinate extrema of the vector model.

Remarks:

An exception is thrown if the hierarchy is empty

Parameters
xRangeThe range along the X axis.
yRangeThe range along the Y axis.
inSensorCoordinatesSpecifies whether the extrema are retrieved in sensor coordinates. Default: false

◆ Load() [1/2]

None eVision.EVectorModel.Load ( self,
eVision.ESerializer | None serializer )

Loads a Shape.The given eVision.ESerializer must have been created for reading.

Parameters
serializerPointer to the eVision.ESerializer created for reading.

◆ Load() [2/2]

None eVision.EVectorModel.Load ( self,
str filePath )

Loads a Shape.The given eVision.ESerializer must have been created for reading.

Parameters
filePathThe file path.

◆ LoadDXF() [1/3]

None eVision.EVectorModel.LoadDXF ( self,
str fileName )

Loads an eVision.EVectorModel from an ascii DXF file.

We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.

◆ LoadDXF() [2/3]

None eVision.EVectorModel.LoadDXF ( self,
str fileName,
float scale )

Loads an eVision.EVectorModel from an ascii DXF file.

We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.
scaleThe scale of the vector model, defaults to 1.

◆ LoadDXF() [3/3]

None eVision.EVectorModel.LoadDXF ( self,
str fileName,
float scale,
eVision.EPoint origin )

Loads an eVision.EVectorModel from an ascii DXF file.

We do not support the whole possibilities offered by the dxf format. We are currently limited to straight polylines, lines, arcs and points. Blocks are ignored at the moment. Angles are assumed to be given in degrees.

Parameters
fileNameThe name of the dxf file.
scaleThe scale of the vector model, defaults to 1.
originThe origin of the EVectorModel in the dxf's coordinates. If not specified, we try to parse the origin from the UCSORG field in the dxf headers. Otherwise, origin is (0, 0).

◆ Root()

eVision.Legacy.EFrameShape eVision.EVectorModel.Root ( self)

Gets the root of the hierarchy.

◆ Save() [1/2]

None eVision.EVectorModel.Save ( self,
eVision.ESerializer | None serializer )

Saves a Shape.The given eVision.ESerializer must have been created for writing.

Parameters
serializerPointer to the eVision.ESerializer created for writing.

◆ Save() [2/2]

None eVision.EVectorModel.Save ( self,
str filePath )

Saves a Shape.The given eVision.ESerializer must have been created for writing.

Parameters
filePathThe file path.

◆ Scale() [1/2]

float eVision.EVectorModel.Scale ( self)

Gets the scale of the model.

◆ Scale() [2/2]

eVision.EVectorModel.Scale ( self,
float value )

Gets the scale of the model.