Liking cljdoc? Tell your friends :D

visualcraft.dxf-geometry

Pure-math 2D CAD and DXF geometry utilities: polyline length, shoelace polygon area, bounding boxes, DPI-to-mm calibration, architectural scale conversion, Ramer-Douglas-Peucker simplification, and ASCII DXF export.

Pure-math 2D CAD and DXF geometry utilities: polyline length, shoelace
polygon area, bounding boxes, DPI-to-mm calibration, architectural scale
conversion, Ramer-Douglas-Peucker simplification, and ASCII DXF export.
raw docstring

bounding-boxclj

(bounding-box pts)

Returns {:min-x :min-y :max-x :max-y :width :height} or nil when empty.

Returns {:min-x :min-y :max-x :max-y :width :height} or nil when empty.
sourceraw docstring

distanceclj

(distance [x1 y1] [x2 y2])

Euclidean distance between 2D points [x1 y1] and [x2 y2].

Euclidean distance between 2D points [x1 y1] and [x2 y2].
sourceraw docstring

format-dxf-polylineclj

(format-dxf-polyline pts)
(format-dxf-polyline pts layer closed?)

Formats a 2D polyline as a minimal ASCII DXF LWPOLYLINE entity block.

Formats a 2D polyline as a minimal ASCII DXF LWPOLYLINE entity block.
sourceraw docstring

paper->model-scaleclj

(paper->model-scale paper-length scale-denominator)

Converts a paper-space length using a 1:scale-denominator architectural scale.

Converts a paper-space length using a 1:scale-denominator architectural scale.
sourceraw docstring

pixels->mmclj

(pixels->mm pixels dpi)

Converts a raster pixel length at the given DPI to millimeters.

Converts a raster pixel length at the given DPI to millimeters.
sourceraw docstring

polygon-areaclj

(polygon-area pts)

Unsigned area of a simple polygon using the shoelace formula.

Unsigned area of a simple polygon using the shoelace formula.
sourceraw docstring

polyline-lengthclj

(polyline-length pts)
(polyline-length pts closed?)

Total length of an open or closed 2D polyline.

Total length of an open or closed 2D polyline.
sourceraw docstring

simplify-rdpclj

(simplify-rdp pts epsilon)

Simplifies a 2D polyline using the Ramer-Douglas-Peucker algorithm.

Simplifies a 2D polyline using the Ramer-Douglas-Peucker algorithm.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close