Skip to content

Vibe coding a plugin? Teach your agent Modlumi first. Works with Claude Code, Codex, Cursor and more.

Edge

A straight line segment between two vertices.

readonly bounds: BoundingBox | null

The element’s bounds in its context’s coordinates, or null when it has no geometry. A group’s or instance’s bounds enclose its transformed contents and may be a little larger than they are.

DrawingElement.bounds


readonly curve: Curve | ArcCurve | null

The curve or arc this edge belongs to, or null.


readonly end: Vertex

The vertex the edge ends at.


readonly entityId: number

Identifier that stays the same for the entity’s lifetime, including across undo and redo.

DrawingElement.entityId


readonly faces: readonly Face[]

The faces the edge bounds: none for a loose edge, two between neighboring faces.


hidden: boolean

The element’s own hidden flag; assign inside Model.operation. Hidden ancestors are not taken into account; use Model.isDrawingElementVisible for that.

DrawingElement.hidden


readonly isDeleted: boolean

Whether the entity was deleted, for example by an edit or by undo.

DrawingElement.isDeleted


readonly isValid: boolean

Whether the entity still exists in the model.

DrawingElement.isValid


readonly length: number

Length in the edge’s own context, in meters.


material: Material | null

The edge’s material, or null for the default; assign a material of this model inside Model.operation. Like SketchUp’s default style, Modlumi draws every edge in the edge color, but the material is kept for plugins and saved files.


smooth: boolean

Whether the edge is marked for smooth shading across its faces; assign inside Model.operation.


soft: boolean

Whether the edge’s line is suppressed so its faces read as one surface; assign inside Model.operation. The solids from Entities.addCylinder and its relatives soften their facet edges.


readonly start: Vertex

The vertex the edge starts at.


readonly type: "Edge"

The concrete class name, for narrowing unions such as AnyElement.

DrawingElement.type


visible: boolean

The inverse of hidden; assign inside Model.operation.

DrawingElement.visible

get layer(): Layer | null

The layer the element is on, or null for the default layer; assign inside Model.operation. A hidden layer hides the element whatever hidden says. Needs the "layers" feature.

Layer | null

set layer(value): void

Layer | null

void

DrawingElement.layer

toJSON(): object

JSON.stringify writes the entity as its type and entityId, plus its name when it has one, such as { "type": "Group", "entityId": 12, "name": "Wheel" }.

object

entityId: number

optional name?: string

type: "Material" | "Vertex" | "Edge" | "Face" | "Loop" | "EdgeUse" | "Curve" | "ArcCurve" | "ComponentDefinition" | "ComponentInstance" | "Group" | "Layer" | "Guide" | "Text" | "LinearDimension" | "SectionPlane"

DrawingElement.toJSON


transformedLength(transformation): number

The edge’s length after a transformation, such as Model.activeTransformation for world lengths of edges in the context being edited.

Transformation

number