Api - exporter Module
Index
Classes
Interfaces
Variables
Functions
Variables
Private chainLinkToPathDataMap
Private dxfUnit
Type declaration
-
[unitType: string]: number
Private svgPathDataMap
svgUnit
Map of MakerJs unit system to SVG unit system
Functions
chainToSVGPathData
exportFromOptionsMap
-
Parameters
-
modelToExport: IModel
-
optionsMap: IOpenJsCadOptionsMap
Returns string
-
Private facetSizeToResolution
-
Parameters
-
arcOrCircle: IPathCircle
-
facetSize: number
Returns number
-
Private getBezierModelsWithPaths
-
Parameters
-
modelToExport: IModel
Returns IWalkModel[]
-
Private getPathDataByLayer
-
Parameters
-
modelToExport: IModel
-
offset: IPoint
-
options: IFindChainsOptions
Returns IPathDataMap
-
pathToSVGPathData
Private pathsToOpenJsCad
-
Parameters
-
modelContext: IModel
-
Optional facetSize: number
Returns string
-
Private startSvgPathData
-
Parameters
-
start: IPoint
-
d: ISvgPathData
Returns ISvgPathData
-
Private svgArcData
-
Parameters
-
d: ISvgPathData
-
radius: number
-
endPoint: IPoint
-
Optional largeArc: boolean
-
Optional decreasing: boolean
Returns void
-
Private svgBezierData
-
Parameters
-
d: ISvgPathData
-
seed: IPathBezierSeed
-
Optional reversed: boolean
Returns void
-
Private svgCircleData
-
Parameters
-
radius: number
Returns ISvgPathData
-
Private svgCoords
toDXF
-
Renders an item in AutoDesk DFX file format.
Parameters
-
modelToExport: IModel
-
Optional options: IDXFRenderOptions
Rendering options object.
Returns string
String of DXF content.
-
-
Renders an item in AutoDesk DFX file format.
Parameters
-
pathsToExport: IPath[]
-
Optional options: IDXFRenderOptions
Rendering options object.
Returns string
String of DXF content.
-
-
Renders an item in AutoDesk DFX file format.
Parameters
-
pathToExport: IPath
-
Optional options: IDXFRenderOptions
Rendering options object.
Returns string
String of DXF content.
-
toOpenJsCad
-
Creates a string of JavaScript code for execution with the OpenJsCad engine.
Parameters
-
modelToExport: IModel
Model object to export.
-
Optional options: IOpenJsCadOptions
Export options object.
Returns string
String of JavaScript containing a main() function for OpenJsCad.
-
-
Creates a string of JavaScript code for execution with the OpenJsCad engine.
Parameters
-
pathsToExport: IPath[]
-
Optional options: IOpenJsCadOptions
Export options object.
Returns string
String of JavaScript containing a main() function for OpenJsCad.
-
-
Creates a string of JavaScript code for execution with the OpenJsCad engine.
Parameters
-
pathToExport: IPath
-
Optional options: IOpenJsCadOptions
Export options object.
Returns string
String of JavaScript containing a main() function for OpenJsCad.
-
toPDF
-
Injects drawing into a PDFKit document.
Parameters
-
doc: PDFDocument
-
modelToExport: IModel
Model object to export.
-
Optional options: IPDFRenderOptions
Export options object.
Returns void
String of PDF file contents.
-
toSTL
-
Executes a JavaScript string with the OpenJsCad engine - converts 2D to 3D.
Parameters
-
modelToExport: IModel
Model object to export.
-
Default value options: IOpenJsCadOptions = {}
Export options object.
Returns string
String of STL format of 3D object.
-
toSVG
-
Renders an item in SVG markup.
Parameters
-
modelToExport: IModel
-
Optional options: ISVGRenderOptions
Rendering options object.
Returns string
String of XML / SVG content.
-
-
Renders an item in SVG markup.
Parameters
-
pathsToExport: IPath[]
-
Optional options: ISVGRenderOptions
Rendering options object.
Returns string
String of XML / SVG content.
-
-
Renders an item in SVG markup.
Parameters
-
pathToExport: IPath
-
Optional options: ISVGRenderOptions
Rendering options object.
Returns string
String of XML / SVG content.
-
Private tryGetModelUnits
-
Try to get the unit system from a model
Parameters
-
itemToExport: any
Returns string
-
Private wrap
-
Parameters
-
prefix: string
-
content: string
-
condition: any
Returns string
-
Generated using TypeDoc