@bitbybit-dev/occt
Version:
Bit By Bit Developers CAD algorithms using OpenCascade Technology kernel. Run in Node and in Browser.
40 lines (39 loc) • 1.82 kB
TypeScript
import { TopoDS_Shape } from "../../../bitbybit-dev-occt/bitbybit-dev-occt";
import * as Inputs from "../../api/inputs/inputs";
import { IO } from "@bitbybit-dev/base/lib/api/inputs/io-inputs";
import { EdgesService } from "./edges.service";
import { ShapeGettersService } from "./shape-getters";
import { BaseBitByBit } from "../../base";
import { WiresService } from "./wires.service";
export declare class DxfService {
private readonly base;
private readonly shapeGettersService;
private readonly edgesService;
private readonly wiresService;
constructor(base: BaseBitByBit, shapeGettersService: ShapeGettersService, edgesService: EdgesService, wiresService: WiresService);
/**
* Step 1: Convert OCCT shape to DXF paths (without layer/color info)
* This analyzes the shape geometry and creates appropriate DXF segments
*/
shapeToDxfPaths(inputs: Inputs.OCCT.ShapeToDxfPathsDto<TopoDS_Shape>): IO.DxfPathDto[];
/**
* Step 2: Add layer and color information to DXF paths
* Takes paths from shapeToDxfPaths and adds styling
*/
dxfPathsWithLayer(inputs: Inputs.OCCT.DxfPathsWithLayerDto): IO.DxfPathsPartDto;
/**
* Step 3: Assemble multiple path parts into a complete DXF file
* Takes multiple outputs from dxfPathsWithLayer and creates final DXF
*/
dxfCreate(inputs: Inputs.OCCT.DxfPathsPartsListDto): string;
/**
* Try to create a unified polyline from consecutive edges (linear, arc, and complex)
* This creates a single LWPOLYLINE with bulges where applicable
*/
private tryCreateUnifiedPolyline;
/**
* Try to create a polyline with bulges from consecutive line/arc segments
* Returns the polyline and next index, or null if not applicable
*/
private tryCreatePolylineWithBulges;
}