Skip to content

Preview Symbols

Class full path: PreviewSymbols.PreviewSymbols

implementation of the preview symbols

Classes

PreviewSymbolType

Bases: IntEnum

definition of the preview symbol types

Functions

__get_color(color) staticmethod

get the color as ARGB value

Parameters:

Name Type Description Default
color Union[ARGB, int]

color as ARGB or color ID

required

Returns:

Type Description
ARGB

_color as ARGB value

__init__()

initialize

add_arrow(reference_point, width, color, rotation_angle)

add an arrow symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
width float

width

required
color Union[ARGB, int]

color as ARGB value or color ID

required
rotation_angle Angle

rotation angle

required

add_circle(reference_point, radius_pixel, color)

add a circle symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
radius_pixel int

radius in pixel

required
color Union[ARGB, int]

color as ARGB value or color ID

required

add_coord_cross(plane, arm_length)

add a coordinate cross symbol

Parameters:

Name Type Description Default
plane Union[Plane3D, AxisPlacement3D]

plane of the coordinate cross

required
arm_length float

length of the arms

required

add_cross(reference_point, width, color)

add a cross symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
width float

width

required
color Union[ARGB, int]

color as ARGB value or color ID

required

add_filled_rectangle(reference_point, width, color, rotation_angle)

add a filled rectangle symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
width float

width

required
color Union[ARGB, int]

color as ARGB value or color ID

required
rotation_angle Angle

rotation angle

required

add_mark(reference_point, width, color)

add mark symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
width float

width

required
color Union[ARGB, int]

color as ARGB value or color ID

required

add_polyline(reference_point, polyline, color, line_pattern=4095)

add a polyline symbol

Parameters:

Name Type Description Default
reference_point Point3D

reference point

required
polyline Polyline2D

polyline

required
color Union[ARGB, int]

color as ARGB value or color ID

required
line_pattern

line pattern as 0/1 patten

4095

add_text(text, reference_point, ref_pnt_pos, height, color, rotation_angle)

add a text symbol

Parameters:

Name Type Description Default
text str

text

required
reference_point Point3D

reference point

required
ref_pnt_pos TextReferencePointPosition

point position of the reference point

required
height float

height

required
color Union[ARGB, int]

color as ARGB value or color ID

required
rotation_angle Angle

rotation angle

required

draw(insert_matrix, view_projection)

draw the symbols

Parameters:

Name Type Description Default
insert_matrix Matrix3D

insert matrix

required
view_projection ViewWorldProjection

view world projection

required