### Accessing DXF Entities Source: http://dxfgrabber.readthedocs.org Read a DXF file and filter entities by layer. Requires the dxfgrabber library to be installed. ```python dwg = dxfgrabber.readfile('test.dxf') all_layer_0_entities = [entity for entity in dwg.entities if entity.layer == '0'] ``` -------------------------------- ### Open a DXF file Source: http://dxfgrabber.readthedocs.org Use readfile to load a DXF file from the local file system. ```python dwg = readfile("myfile.dxf") ``` -------------------------------- ### Basic Usage of dxfgrabber Source: http://dxfgrabber.readthedocs.org Demonstrates how to read a DXF file and access basic drawing information like version, header, layers, blocks, and entities. ```python dxf = dxfgrabber.readfile("drawing.dxf") print("DXF version: {}".format(dxf.dxfversion)) header_var_count = len(dxf.header) # dict of dxf header vars layer_count = len(dxf.layers) # collection of layer definitions block_definition_count = len(dxf.blocks) # dict like collection of block definitions entity_count = len(dxf.entities) # list like collection of entities ``` -------------------------------- ### Creating TrueColor Objects Source: http://dxfgrabber.readthedocs.org Demonstrates different ways to create TrueColor objects for representing entity colors. Use from_aci for AutoCAD Color Index conversion. ```python t = TrueColor(0xAABBCC) t = TrueColor.from_rgb(0xAA, 0xBB, 0xCC) t = TrueColor.from_aci(1) # ACI for red (AutoCAD Color Index) ``` -------------------------------- ### Accessing Mesh Face Vertices Source: http://dxfgrabber.readthedocs.org Demonstrates how to retrieve the vertices of the first face in a mesh using index-based lookup. ```python first_face = mesh.faces[0] first_vertex = mesh.vertices[first_face[0]] ``` -------------------------------- ### Default Options for Reading DXF Files Source: http://dxfgrabber.readthedocs.org Specifies the default configuration options used when reading DXF files, controlling aspects like block definition parsing and coordinate handling. ```python DEFAULT_OPTIONS = { "grab_blocks": True, "assure_3d_coords": False, "resolve_text_styles": True, } ``` -------------------------------- ### Accessing Mesh Edge Vertices Source: http://dxfgrabber.readthedocs.org Demonstrates how to retrieve the vertices of the first edge in a mesh using index-based lookup. ```python first_edge = mesh.edges[0] first_vertex = mesh.vertices[first_edge[0]] ``` -------------------------------- ### dxfgrabber.readfile Source: http://dxfgrabber.readthedocs.org Reads a DXF file from the filesystem and returns a Drawing object. ```APIDOC ## dxfgrabber.readfile(filename, options=None) ### Description Reads a DXF file from the file system and returns a Drawing object. ### Parameters #### Path Parameters - **filename** (string) - Required - The path to the DXF file. #### Request Body - **options** (dict) - Optional - Configuration options for reading the file. Default: {"grab_blocks": True, "assure_3d_coords": False, "resolve_text_styles": True} ### Response #### Success Response (200) - **Drawing** (object) - The parsed DXF data. ``` -------------------------------- ### Creating TrueColor from RGB Source: http://dxfgrabber.readthedocs.org Factory method to create a TrueColor object from individual red, green, and blue integer values. ```python t = TrueColor.from_rgb(0xAA, 0xBB, 0xCC) ``` -------------------------------- ### Query Blocks Source: http://dxfgrabber.readthedocs.org Retrieve block references and inspect the contents of specific block definitions. ```python references = [entity for entity in dwg.entities if entity.dxftype == 'INSERT' and entity.name == 'TestBlock'] ``` ```python test_block = dwg.blocks['TestBlock'] ``` ```python circles_in_block = [entity for entity in test_block if entity.dxftype == 'CIRCLE'] ``` -------------------------------- ### Unpacking TrueColor Values Source: http://dxfgrabber.readthedocs.org Shows methods for extracting RGB values from a TrueColor object. Unpacking directly or accessing individual color components are supported. ```python r, g, b = t.rgb() # fastest way r, g, b = t # unpacking by t.__getitem__() red = t.r green = t.g blue = t.b red = t[0] green = t[1] blue = t[2] ``` -------------------------------- ### TrueColor API Source: http://dxfgrabber.readthedocs.org Methods for managing and converting 24-bit true color values. ```APIDOC ## TrueColor ### Description Represents a true color value as an integer. ### Methods - **rgb()**: Returns a tuple (red, green, blue) in range 0-255. - **from_rgb(r, g, b)**: Returns a TrueColor object. - **from_aci(index)**: Returns the DXF default true color value for AutoCAD Color Index index. Raises IndexError. ``` -------------------------------- ### Query Header Variables Source: http://dxfgrabber.readthedocs.org Access drawing settings stored in the HEADER section using the header attribute. ```python dxfversion = dwg.header['$ACADVER'] ``` -------------------------------- ### Query Layout Entities Source: http://dxfgrabber.readthedocs.org Filter entities based on their presence in modelspace or paperspace. ```python modelspace_entities = [entity for entity in dwg.entities if not entity.paperspace] ``` ```python modelspace_entities = list(dwg.modelspace()) paperspace_entities = list(dwg.paperspace()) ``` -------------------------------- ### Light Entity Source: http://dxfgrabber.readthedocs.org Details about the Light entity, defining properties of a light source. ```APIDOC ## Light Entity ### Description Defines a light source in the drawing. ### Class `Light(_Shape_)` ### Attributes - **version** (any) - **name** (any) - **light_type** (int) - Type of light: 1 for distant, 2 for point, 3 for spot. - **status** (boolean) - On/off state of the light. - **light_color** (int) - Light color as ACI color index (1-255); 256 for BYLAYER; None if unset. - **true_color** (int) - Light color as 24-bit RGB color (0x00RRGGBB); None if unset. - **plot_glyph** (boolean) - Whether to plot the light glyph. - **intensity** (any) - **position** (tuple) - 3D position of the light source (x, y, z). - **target** (tuple) - 3D target location of the light, determining its direction (x, y, z). - **attenuation_type** (int) - Type of attenuation: 0 for None, 1 for Inverse Linear, 2 for Inverse Square. - **use_attenuation_limits** (boolean) - Whether to use attenuation limits. - **attenuation_start_limit** (any) - **attenuation_end_limit** (any) - **hotspot_angle** (any) - **fall_off_angle** (any) - **cast_shadows** (boolean) - Whether the light casts shadows. - **shadow_type** (int) - Type of shadow rendering: 0 for Ray traced shadows, 1 for Shadow maps. - **shadow_map_size** (any) - **shadow_softness** (any) ``` -------------------------------- ### Point Entity Source: http://dxfgrabber.readthedocs.org Represents a single point in a DXF file. ```APIDOC ## Point Entity ### Description Represents a point in 2D or 3D space. ### Attributes - **point** (tuple) - The coordinates of the point (x, y[, z]). ``` -------------------------------- ### Insert Entity Source: http://dxfgrabber.readthedocs.org Represents a block reference in a DXF file. It includes properties for the block name, insertion point, rotation, scaling, and array properties for multiple references. ```APIDOC ## Insert Entity ### Description Represents a block reference in a DXF file. It includes properties for the block name, insertion point, rotation, scaling, and array properties for multiple references. ### Attributes - **name** (string): Name of the block definition. - **insert** (tuple): Location of the block reference (x, y, z). - **rotation** (float): Rotation angle in degrees. - **scale** (tuple): (x, y, z) block scaling, defaults to (1.0, 1.0, 1.0). - **row_count** (int): Row count for multiple block references. - **col_count** (int): Column count for multiple block references. - **row_spacing** (float): Row distance for multiple block references. - **col_spacing** (float): Column distance for multiple block references. - **attribs** (list): List of `Attrib` entities attached to the `Insert` entity. ### Methods - **find_attrib(tag)**: Get `Attrib` entity by tag, returns `None` if not found. ``` -------------------------------- ### EntitySection API Source: http://dxfgrabber.readthedocs.org Methods for accessing and iterating over drawing entities. ```APIDOC ## EntitySection ### Description Contains all drawing entities. ### Methods - **__len__()**: Returns count of entities. - **__iter__()**: Iterates over all entities. - **__getitem__(index)**: Returns entity at location index, slicing is possible. Raises IndexError. ``` -------------------------------- ### Circle Entity Source: http://dxfgrabber.readthedocs.org Represents a circle in a DXF file. ```APIDOC ## Circle Entity ### Description Represents a circle defined by its center and radius. ### Attributes - **center** (tuple) - The center point of the circle (x, y[, z]). - **radius** (float) - The radius of the circle. ``` -------------------------------- ### LinetypeTable API Source: http://dxfgrabber.readthedocs.org Methods for accessing and iterating over linetype definitions within a DXF file. ```APIDOC ## LinetypeTable ### Description Contains all linetype definitions as objects of type Linetype. ### Methods - **get(name)**: Return linetype name as object of type Linetype. Raises KeyError. - **__getitem__(name)**: Support for index operator: dwg.linetypes[name]. - **names(name)**: Returns a sorted list of all linetype names. - **__iter__()**: Iterate over all linetypes, yields Linetype objects. - **__len__()**: Returns count of linetypes, support for standard len() function. ``` -------------------------------- ### dxfgrabber.read Source: http://dxfgrabber.readthedocs.org Reads DXF data from a stream. ```APIDOC ## dxfgrabber.read(stream, options=None) ### Description Reads DXF data from a stream object that implements a readline() method. ### Parameters #### Request Body - **stream** (object) - Required - A stream object with a readline() method. - **options** (dict) - Optional - Configuration options for reading the file. ``` -------------------------------- ### Text Entity Source: http://dxfgrabber.readthedocs.org Represents a text entity in a DXF file, with various formatting and alignment options. ```APIDOC ## Text Entity ### Description Represents a text entity with attributes for content, insertion point, style, and alignment. ### Attributes - **insert** (tuple) - The insertion point of the text (x, y, z). - **text** (string) - The content of the text. - **height** (float) - The height of the text. If 0, refer to the associated style. - **width** (float) - The width factor of the text. - **oblique** (float) - The oblique angle of the text. - **rotation** (float) - The rotation angle of the text in degrees. - **style** (string) - The name of the text style. - **halign** (int) - Horizontal alignment code (0: Left, 1: Center, 2: Right, 3: Aligned, 4: Middle, 5: Fit). - **valign** (int) - Vertical alignment code (0: Baseline, 1: Bottom, 2: Middle, 3: Top). - **is_backwards** (bool) - True if the text is mirrored horizontally. - **is_upside_down** (bool) - True if the text is mirrored vertically. - **align_point** (tuple or None) - The second alignment point. - **font** (string) - The font name (if `resolve_text_styles` is True). - **big_font** (string) - The big font name (if `resolve_text_styles` is True). ### Methods - **plain_text()**: Returns the text content without formatting codes. ``` -------------------------------- ### dxfgrabber.aci_to_true_color Source: http://dxfgrabber.readthedocs.org Converts an AutoCAD Color Index to a TrueColor object. ```APIDOC ## dxfgrabber.aci_to_true_color(index) ### Description Returns the DXF default true color value for an AutoCAD Color Index. ### Parameters #### Path Parameters - **index** (int) - Required - The AutoCAD Color Index (0-255). ``` -------------------------------- ### Line Entity Source: http://dxfgrabber.readthedocs.org Represents a line segment in a DXF file. ```APIDOC ## Line Entity ### Description Represents a line segment defined by a start and end point. ### Attributes - **start** (tuple) - The starting point of the line (x, y[, z]). - **end** (tuple) - The ending point of the line (x, y[, z]). ``` -------------------------------- ### Query Entities Source: http://dxfgrabber.readthedocs.org Iterate over the entities section to filter drawing objects by type or layer. ```python all_lines = [entity for entity in dwg.entities if entity.dxftype == 'LINE'] all_entities_at_layer_0 = [entity for entity in dwg.entities if entity.layer == '0'] ``` -------------------------------- ### Sun Entity Source: http://dxfgrabber.readthedocs.org Details about the Sun entity, representing a light source in the drawing. ```APIDOC ## Sun Entity ### Description Represents a sun or light source. SUN is not a graphical object and resides in the `Drawing.objects` section. ### Class `Sun(_Entity_)` ### Attributes - **version** (any) - **status** (boolean) - On/off state of the sun. - **sun_color** (int) - Light color as ACI color index (1-255); 256 for BYLAYER; None if unset. - **intensity** (any) - **shadows** (boolean) - Whether shadows are enabled. - **date** (datetime.datetime) - The date and time of the sun. - **daylight_savings_time** (boolean) - Whether daylight savings time is active. - **shadow_type** (int) - Type of shadow rendering: 0 for Ray traced shadows, 1 for Shadow maps. - **shadow_map_size** (any) - **shadow_softness** (any) ``` -------------------------------- ### Block Entity Source: http://dxfgrabber.readthedocs.org Represents a block definition in a DXF file, containing entities and metadata. ```APIDOC ## Block Entity ### Description Represents a block definition in a DXF file. It can contain other entities and has properties related to its name, base point, and external reference status. ### Attributes - **basepoint** (tuple) - The base point of the block definition. - **name** (string) - The name of the block. - **flags** (int) - Flags indicating block properties (refer to DXF specifications). - **xrefpath** (string) - Path to the external reference file, if applicable. - **is_xref** (bool) - True if the block is an external reference. - **is_xref_overlay** (bool) - True if the block is an external overlay reference. - **is_anonymous** (bool) - True if the block is anonymous (e.g., created by hatch or dimension). ### Methods - **__iter__()**: Supports iteration over entities within the block. - **__getitem__(index)**: Accesses an entity by its index; slicing is supported. - **__len__()**: Returns the number of entities in the block. ``` -------------------------------- ### Polymesh Entity Source: http://dxfgrabber.readthedocs.org Represents a POLYMESH DXF entity, which is a grid of m x n vertices. ```APIDOC ## Polymesh Entity ### Description A Polymesh is a grid of m x n vertices, where every vertex has its own 3D location. ### Properties - **mcount** (int) - Count of vertices in m direction. - **ncount** (int) - Count of vertices in n direction. - **is_mclosed** (bool) - True if closed in m direction. - **is_nclosed** (bool) - True if closed in n direction. - **m_smooth_density** (int) - Smooth surface M density. - **n_smooth_density** (int) - Smooth surface N density. - **smooth_type** (int) - Smooth surface type (0: None, 5: Quadratic B-spline, 6: Cubic B-spline, 8: Bezier). ### Methods - **get_vertex(pos)** - Returns the Vertex at pos (m, n). - **get_location(pos)** - Returns the location (x, y, z) tuple at pos (m, n). ``` -------------------------------- ### LWPolyline Entity Source: http://dxfgrabber.readthedocs.org Represents a lightweight 2D Polyline entity. ```APIDOC ## LWPolyline Entity ### Description LWPolyline is a lightweight 2D Polyline. ### Properties - **points** (List) - List of 2D polyline points as (x, y) tuples. - **width** (List) - List of (start_width, end_width) values. - **bulge** (List) - List of bulge values as float. - **const_width** (float) - Constant width of the polyline. - **is_closed** (bool) - True if the polyline is closed. - **elevation** (float) - Elevation of the polyline. ``` -------------------------------- ### Creating TrueColor from ACI Source: http://dxfgrabber.readthedocs.org Converts an AutoCAD Color Index (ACI) to its corresponding TrueColor representation. Raises IndexError for invalid ACI values. ```python t = TrueColor.from_aci(1) # ACI for red (AutoCAD Color Index) ``` -------------------------------- ### Trace Entity Source: http://dxfgrabber.readthedocs.org Represents a trace entity, which is the same as a Solid entity. ```APIDOC ## Trace Entity ### Description Represents a trace entity, which is identical in structure to a `Solid` entity. ### Attributes - **points** (list of tuples) - A list of points (x, y[, z]) defining the shape. ``` -------------------------------- ### BlocksSection API Source: http://dxfgrabber.readthedocs.org Methods for accessing and managing block definitions within the drawing. ```APIDOC ## BlocksSection ### Description Contains all block definitions as objects of type Block. ### Methods - **__len__()**: Returns count of blocks. - **__iter__()**: Iterates over blocks, yields Block objects. - **__contains__(name)**: Returns True if a block name exists. - **__getitem__(name)**: Returns block name, support for index operator: block = dwg.blocks[name]. Raises KeyError. - **get(name, default=None)**: Returns block name if exists or default. ``` -------------------------------- ### Solid Entity Source: http://dxfgrabber.readthedocs.org Represents a solid-filled shape defined by a list of points. ```APIDOC ## Solid Entity ### Description Represents a solid-filled shape. For triangles, the third and fourth points are identical. ### Attributes - **points** (list of tuples) - A list of points (x, y[, z]) defining the shape. ``` -------------------------------- ### Arc Entity Source: http://dxfgrabber.readthedocs.org Represents an arc segment in a DXF file. ```APIDOC ## Arc Entity ### Description Represents an arc segment defined by its center, radius, start angle, and end angle. ### Attributes - **center** (tuple) - The center point of the arc (x, y[, z]). - **radius** (float) - The radius of the arc. - **start_angle** (float) - The starting angle of the arc in degrees. - **end_angle** (float) - The ending angle of the arc in degrees. ``` -------------------------------- ### Query Layer Attributes Source: http://dxfgrabber.readthedocs.org Resolve entity attributes that inherit values from their assigned layer. ```python layer = dwg.layers[dxf_entity.layer] color = layer.color if dxf_entity.color == dxfgrabber.BYLAYER else dxf_entity.color linetype = layer.linetype if dxf_entity.linetype is None else dxf_entity.linetype ``` -------------------------------- ### Face Entity Source: http://dxfgrabber.readthedocs.org Represents a 3D face entity (DXF 3DFACE). ```APIDOC ## Face Entity ### Description Represents a solid-filled 3D shape, similar to `Solid` but specifically for DXF 3DFACE entities. For triangles, the third and fourth points are identical. ### Attributes - **points** (list of tuples) - A list of points (x, y, z) defining the face. ### Methods - **is_edge_invisible(index)**: Returns True if the edge at the specified index (0-3) is invisible. ``` -------------------------------- ### MText Entity Source: http://dxfgrabber.readthedocs.org Details about the MText entity, its attributes, and methods for text manipulation. ```APIDOC ## MText Entity ### Description Represents a multi-line text entity. The `height` attribute is defined in the associated `Style` object, if the value of `height` is 0. If the import option `"resolve_text_styles"` is True, `height`, `font`, and `bigfont` already have the ‘final’ value. ### Class `MText(_Shape_)` ### Attributes - **insert** (tuple) - Location of text (x, y, z). - **raw_text** (string) - Whole text content. - **height** (float) - Text height. - **rect_width** (float) - Reference rectangle width in drawing units. - **horizontal_width** (float) - Horizontal width of the characters. - **vertical_height** (float) - Vertical height of the entity in drawing units. - **line_spacing** (float) - Text line spacing, valid from 0.25 to 4.00. - **attachment_point** (int) - Text attachment point. Values 1-9 correspond to different alignment points (e.g., Top left, Middle center, Bottom right). - **style** (string) - Text style name. - **xdirection** (tuple) - X-Axis direction vector (x, y, z) as a unit vector. - **font** (string) - Font name, if import option `"resolve_text_styles"` is True, otherwise an empty string. - **big_font** (string) - Bigfont name, if import option `"resolve_text_styles"` is True, otherwise an empty string. ### Methods - **lines()** - Returns a list of lines. It is the `MText.rawtext` split by the `\P` character. - **plain_text(split=False)** - Tries to remove format codes. Returns a single string if `split` is False, otherwise multiple lines as a list of strings without `\n`. ``` -------------------------------- ### Attrib Entity Source: http://dxfgrabber.readthedocs.org Represents an attribute entity, typically associated with a block reference. ```APIDOC ## Attrib Entity ### Description Represents an attribute entity, which is a type of text entity usually attached to a block reference (`Insert`). It inherits from the `Text` entity. ### Attributes - **tag** (string) - The attribute tag. ``` -------------------------------- ### Spline Entity Source: http://dxfgrabber.readthedocs.org Represents a Spline entity, including support for control points, knots, and weights. ```APIDOC ## Spline Entity ### Description Represents a Spline curve entity. ### Properties - **flags** (int) - Binary coded flags (e.g., SPLINE_CLOSED, SPLINE_RATIONAL). - **degree** (int) - Degree of the spline curve. - **start_tangent** (tuple) - Start tangent (x, y, z). - **end_tangent** (tuple) - End tangent (x, y, z). - **control_points** (List) - List of control points (x, y, z). - **fit_points** (List) - List of fit points (x, y, z). - **knots** (List) - List of knot values as float. - **weights** (List) - List of weight values as float. - **normal_vector** (tuple) - Normal vector if planar. ``` -------------------------------- ### Polyface Entity Source: http://dxfgrabber.readthedocs.org Represents a Polyface mesh, a type of POLYLINE entity in DXF. ```APIDOC ## Polyface Entity ### Description Represents a Polyface mesh, a type of POLYLINE entity in DXF. ### Attributes - **vertices** (list): List of all `Polyface` vertices, each a `Vertex` object. - **smooth_type** (int): Smooth surface type code (0: None, 5: Quadratic B-spline, 6: Cubic B-spline, 8: Bezier). ### Methods - **__getitem__(index)**: Returns face at `index` as a `SubFace` object. Raises `IndexError`. - **__len__()**: Returns the count of faces. - **__iter__()**: Iterates over all faces as `SubFace` objects. ``` -------------------------------- ### Attdef Entity Source: http://dxfgrabber.readthedocs.org Represents an attribute definition entity, similar to Attrib but located within a block definition. ```APIDOC ## Attdef Entity ### Description Represents an attribute definition entity. It is similar to an `Attrib` entity but is located within a block definition (`Block`). ``` -------------------------------- ### SubFace Entity Source: http://dxfgrabber.readthedocs.org Represents a single face of a Polyface. ```APIDOC ## SubFace Entity ### Description Represents a single face of a `Polyface`. ### Attributes - **face_record**: The basic DXF structure of faces, providing access to attributes like color or linetype (e.g., `subface.face_record.color`). ### Methods - **__len__()**: Returns the count of vertices (3 or 4) for the face. - **__getitem__(pos)**: Returns the vertex at index `pos` as a `Vertex` object. - **__iter__()**: Returns a list of the face vertices as (x, y, z)-tuples. - **indices()**: Returns a list of vertex indices, which can be used to retrieve vertices from `Polyface.vertices`. - **is_edge_visible(pos)**: Returns `True` if the face edge at `pos` is visible, `False` otherwise. ``` -------------------------------- ### Mesh Entity Source: http://dxfgrabber.readthedocs.org Details about the Mesh entity, representing a 3D mesh similar to Polyface. ```APIDOC ## Mesh Entity ### Description Represents a 3D mesh entity, similar to the `Polyface` entity. ### Class `Mesh(_Shape_)` ### Attributes - **version** (any) - **blend_crease** (boolean) - On/off state for blend crease. - **subdivision_levels** (any) - **vertices** (list) - List of 3D vertices (x, y, z). - **faces** (list) - List of mesh faces as tuples of vertex indices (v1, v2, v3, …). Indices are 0-based. - **edges** (list) - List of mesh edges as 2-tuples of vertex indices (v1, v2). Indices are 0-based. - **edge_crease_list** (list) - List of float values, one for each edge. ### Methods - **get_face(index)** - Returns a tuple of 3D points `((x1, y1, z1), (x2, y2, z2), ...)` for the face at the specified index. - **get_edge(index)** - Returns a 2-tuple of 3D points `((x1, y1, z1), (x2, y2, z2))` for the edge at the specified index. ``` -------------------------------- ### Vertex Entity Source: http://dxfgrabber.readthedocs.org Represents a vertex within a Polyline or Polyface. ```APIDOC ## Vertex Entity ### Description Represents a vertex within a Polyline or Polyface. ### Attributes - **location** (tuple): Vertex location as (x, y, z). - **start_width** (float): The start width of the vertex. - **end_width** (float): The end width of the vertex. - **bulge** (float): The bulge value, representing a segment's arc. A bulge of 0 indicates a straight segment, and 1 indicates a semicircle. - **tangent** (float): Curve fitting tangent in degrees, or `None`. ``` -------------------------------- ### Polyline Entity Source: http://dxfgrabber.readthedocs.org Represents a 2D or 3D polyline, which can also define Polyfaces and Polymeshes. ```APIDOC ## Polyline Entity ### Description Represents a 2D or 3D polyline, which can also define Polyfaces and Polymeshes. DXFgrabber defines separate classes for Polyface and Polymesh. ### Attributes - **is_closed** (bool): `True` if the polyline is closed. - **mode** (string): Polyline mode: `polyline2d`, `polyline3d`, or `spline2d`. - **spline_type** (string): If a 2D spline: `quadratic_bspline`, `cubic_bspline`, or `bezier_curve`, otherwise `None`. - **default_start_width** (float): Default line segment start width. - **default_end_width** (float): Default line segment end width. - **points** (list): List of vertex locations as (x, y[, z]) tuples. For 2D splines, these are fit points. - **control_points** (list): List of control points as (x, y[, z]) tuples for 2D splines. - **tangents** (list): List of vertex tangent angles in degrees, or `None`. - **width** (list): List of vertex width values as (start_width, end_width) tuples for 2D splines. - **bulge** (list): List of vertex bulge values (float). ### Methods - **__getitem__(index)**: Returns vertex at `index` as a `Vertex` entity. Raises `IndexError`. - **__len__()**: Returns the count of vertices. - **__iter__()**: Iterates over all vertices as `Vertex` entities. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.