@mlightcad/data-model
Version:
The data-model package provides the core classes for interacting with AutoCAD's database and entities. This package mimics AutoCAD ObjectARX's AcDb (Database) classes and implements the drawing database structure that AutoCAD developers are familiar with.
102 lines • 3.15 kB
TypeScript
import { AcGeBox3d, AcGePoint3d, AcGePoint3dLike } from '@mlightcad/geometry-engine';
import { AcGiRenderer } from '@mlightcad/graphic-interface';
import { AcDbCurve } from './AcDbCurve';
/**
* Represents the spline-fit type for this 3D polyline.
*/
export declare enum AcDbPoly3dType {
/**
* A standard polyline with no spline fitting.
*/
SimplePoly = 0,
/**
* A spline-fit polyline that has a Quadratic B-spline path.
*/
QuadSplinePoly = 1,
/**
* A spline-fit polyline that has a Cubic B-spline path.
*/
CubicSplinePoly = 2
}
/**
* Represents a 3d polyline entity in AutoCAD.
*/
export declare class AcDb3dPolyline extends AcDbCurve {
/** The entity type name */
static typeName: string;
/** The spline-fit type for this 3D polyline */
private _polyType;
/** The underlying geometric polyline object */
private _geo;
/**
* Creates a new empty 2d polyline entity.
*/
constructor(type: AcDbPoly3dType, vertices: AcGePoint3dLike[], closed?: boolean);
/**
* Gets the spline-fit type for this 3D polyline.
*
* @returns The spline-fit type for this 3D polyline.
*/
get polyType(): AcDbPoly3dType;
/**
* Sets the spline-fit type for this 3D polyline.
*
* @param value - The spline-fit type for this 3D polyline.
*/
set polyType(value: AcDbPoly3dType);
/**
* Gets whether this polyline is closed.
*
* A closed polyline has a segment drawn from the last vertex to the first vertex,
* forming a complete loop.
*
* @returns True if the polyline is closed, false otherwise
*
* @example
* ```typescript
* const isClosed = polyline.closed;
* console.log(`Polyline is closed: ${isClosed}`);
* ```
*/
get closed(): boolean;
/**
* Sets whether this polyline is closed.
*
* @param value - True to close the polyline, false to open it
*
* @example
* ```typescript
* polyline.closed = true; // Close the polyline
* ```
*/
set closed(value: boolean);
/**
* Gets the geometric extents (bounding box) of this polyline.
*
* @returns The bounding box that encompasses the entire polyline
*
* @example
* ```typescript
* const extents = polyline.geometricExtents;
* console.log(`Polyline bounds: ${extents.minPoint} to ${extents.maxPoint}`);
* ```
*/
get geometricExtents(): AcGeBox3d;
/**
* Gets the grip points for this polyline.
*
* Grip points are control points that can be used to modify the polyline.
* For a polyline, the grip points are all the vertices.
*
* @returns Array of grip points (all vertices)
*/
subGetGripPoints(): AcGePoint3d[];
/**
* Draws this polyline using the specified renderer.
*
* @param renderer - The renderer to use for drawing
* @returns The rendered polyline entity, or undefined if drawing failed
*/
draw(renderer: AcGiRenderer): import("@mlightcad/graphic-interface").AcGiEntity;
}
//# sourceMappingURL=AcDb3dPolyline.d.ts.map