Tech News
← Back to articles

GitHub – tomasf/Cadova: Swift DSL for parametric 3D modeling

read original related products more articles

Cadova

Cadova is a Swift library for creating 3D models through code, with a focus on 3D printing. It offers a programmable alternative to traditional CAD tools, combining precise geometry with the expressiveness and elegance of Swift.

Cadova models are written entirely in Swift, making them easy to version, reuse, and extend. The result is a flexible and maintainable approach to modeling, especially for those already comfortable with code.

Cadova runs on macOS, Windows, and Linux. To get started, read the Getting Started guide.

More documentation is available in the Wiki. Read What is Cadova? for an introduction.

Example

await Model ( " Hex key holder " ) { let height = 20.0 let spacing = 8.0 Stack ( . x , spacing : spacing ) { for size in stride ( from : 1.5 , through : 5.0 , by : 0.5 ) { RegularPolygon ( sideCount : 6 , widthAcrossFlats : size ) } } . measuringBounds { holes , bounds in Stadium ( bounds . size + spacing * 2 ) . extruded ( height : height ) . subtracting { holes . aligned ( at : . centerX ) . extruded ( height : height ) . translated ( z : 2 ) } } }

For more code examples, see Examples.

Related Projects

Cadova Viewer - A native macOS 3MF viewer application

... continue reading