@bitbybit-dev/base
Version:
Bit By Bit Developers Base CAD Library to Program Geometry
88 lines (87 loc) • 3.77 kB
TypeScript
import * as Inputs from "../../../inputs";
export declare class Dxf {
private dxfGenerator;
/**
* Creates a line segment definition for DXF export (pass-through for validation).
* Example: start=[0,0], end=[10,5] → DXF line segment from origin to [10,5]
* @param inputs Line segment definition
* @returns Line segment DTO
* @group dxf
* @shortname line segment
* @drawable false
*/
lineSegment(inputs: Inputs.IO.DxfLineSegmentDto): Inputs.IO.DxfLineSegmentDto;
/**
* Creates an arc segment definition for DXF export (curved path between two points).
* Example: center=[5,5], radius=5, startAngle=0°, endAngle=90° → quarter circle arc
* @param inputs Arc segment definition
* @returns Arc segment DTO
* @group dxf
* @shortname arc segment
* @drawable false
*/
arcSegment(inputs: Inputs.IO.DxfArcSegmentDto): Inputs.IO.DxfArcSegmentDto;
/**
* Creates a circle segment definition for DXF export (closed circular path).
* Example: center=[10,10], radius=5 → full circle with diameter 10 centered at [10,10]
* @param inputs Circle segment definition
* @returns Circle segment DTO
* @group dxf
* @shortname circle segment
* @drawable false
*/
circleSegment(inputs: Inputs.IO.DxfCircleSegmentDto): Inputs.IO.DxfCircleSegmentDto;
/**
* Creates a polyline segment definition for DXF export (connected line segments through points).
* Example: points=[[0,0], [5,0], [5,5], [0,5]] → rectangular polyline path
* @param inputs Polyline segment definition
* @returns Polyline segment DTO
* @group dxf
* @shortname polyline segment
* @drawable false
*/
polylineSegment(inputs: Inputs.IO.DxfPolylineSegmentDto): Inputs.IO.DxfPolylineSegmentDto;
/**
* Creates a spline segment definition for DXF export (smooth curve through control points).
* Example: controlPoints=[[0,0], [5,10], [10,0]] → smooth curved path through points
* @param inputs Spline segment definition
* @returns Spline segment DTO
* @group dxf
* @shortname spline segment
* @drawable false
*/
splineSegment(inputs: Inputs.IO.DxfSplineSegmentDto): Inputs.IO.DxfSplineSegmentDto;
/**
* Creates a path from multiple segments (combines lines, arcs, circles, polylines, splines).
* Similar to OCCT wires - segments are connected to form a continuous or multi-part path.
* Example: segments=[lineSegment, arcSegment, polylineSegment] → combined path entity
* @param inputs Path definition with segments
* @returns Path DTO
* @group dxf
* @shortname path
* @drawable false
*/
path(inputs: Inputs.IO.DxfPathDto): Inputs.IO.DxfPathDto;
/**
* Creates a paths part with layer and color assignment for DXF organization.
* Groups multiple paths into a single layer with consistent styling.
* Example: paths=[path1, path2], layer="Outlines", color=red → grouped geometry
* @param inputs Paths part definition
* @returns Paths part DTO
* @group dxf
* @shortname paths part
* @drawable false
*/
pathsPart(inputs: Inputs.IO.DxfPathsPartDto): Inputs.IO.DxfPathsPartDto;
/**
* Generates a complete DXF file from paths parts (exports 2D CAD drawing format).
* Supports lines, arcs, circles, polylines, and splines organized in layered paths.
* Example: model with 3 parts on different layers → valid DXF file string for CAD software
* @param inputs DXF model definition
* @returns DXF file content as string
* @group dxf
* @shortname dxf create
* @drawable false
*/
dxfCreate(inputs: Inputs.IO.DxfModelDto): string;
}