skppy.data_structure.annotations

Text, leader, and dimension entities shared by both SKP parsers.

Annotations use the same entity IDs, layer IDs, and font registry as model geometry. A PointReference preserves both its model-space position and the optional entity/instance path that makes the annotation associative.

Example

import skppy

note = skppy.Text(
    text="Entrance",
    anchor=skppy.PointReference(position=skppy.Vector3D(24, 12, 0)),
)
model.entities.texts.append(note)
class skppy.data_structure.annotations.ArcGeometry[source]

Bases: object

Standalone arc geometry embedded by an unassociated radial dimension.

__init__(center: Vector3D = <factory>, normal: Vector3D = <factory>, x_axis: Vector3D = <factory>, start_angle: float = 0.0, end_angle: float = 0.0, y_axis: Vector3D | None = None) None
class skppy.data_structure.annotations.Dimension[source]

Bases: object

Fields common to linear and radial dimension entities.

__init__(id: int = 0, text: str = '', font: Font | None = None, font_id: int | None = None, is_3d_text: bool = False, arrow_type: int = 0, drawing: DrawingElementProperties = <factory>) None
class skppy.data_structure.annotations.DrawingElementProperties[source]

Bases: object

Appearance and visibility shared by drawable annotation entities.

__init__(material_id: int | None = None, layer_id: int | None = None, hidden: bool = False, casts_shadows: bool = True, receives_shadows: bool = True, soft: bool = False, smooth: bool = False, locked: bool = False) None
class skppy.data_structure.annotations.LinearDimension[source]

Bases: Dimension

A dimension between two model point references.

__init__(id: int = 0, text: str = '', font: Font | None = None, font_id: int | None = None, is_3d_text: bool = False, arrow_type: int = 0, drawing: DrawingElementProperties = <factory>, start: PointReference = <factory>, end: PointReference = <factory>, direction: Vector3D = <factory>, render_direction: Vector3D = <factory>, mode: int = 0, offset: float = 0.0, line_position: float = 0.0, alignment: int = 0) None
class skppy.data_structure.annotations.PointReference[source]

Bases: object

A model position optionally associated with an entity or instance path.

__init__(kind: int = 0, position: Vector3D = <factory>, entity_id: int | None = None, secondary_entity_id: int | None = None, instance_path_ids: list[int] = <factory>, secondary_instance_path_ids: list[int] = <factory>) None
class skppy.data_structure.annotations.RadialDimension[source]

Bases: Dimension

A radius or diameter dimension associated with an edge or embedded arc.

__init__(id: int = 0, text: str = '', font: Font | None = None, font_id: int | None = None, is_3d_text: bool = False, arrow_type: int = 0, drawing: DrawingElementProperties = <factory>, target_entity_id: int | None = None, parameter: float = 0.0, radius_ratio: float = 1.0, is_diameter: bool = False, arc: ArcGeometry | None = None) None
class skppy.data_structure.annotations.Text[source]

Bases: object

A text annotation and its leader placement.

__init__(id: int = 0, text: str = '', anchor: PointReference = <factory>, font: Font | None = None, font_id: int | None = None, screen_position: Vector2D = <factory>, leader_vector: Vector3D = <factory>, view_direction: Vector3D = <factory>, leader_type: int = 0, line_weight: int = 0, anchor_in_front: bool = False, hide_out_of_plane: bool = False, arrow_type: int = 0, display_leader: bool = True, convert_to_screen_on_explode: bool = False, hidden_leader_direction: int = 0, drawing: DrawingElementProperties = <factory>) None