💾 Archived View for perso.pw › blog › articles › openscad.gmi captured on 2023-06-16 at 16:55:41. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2023-05-24)

-=-=-=-=-=-=-

Port of the week: OpenSCAD

Comment on Mastodon

OpenSCAD is a software for creating 3D objects like a programming

language, with the possibility to preview your creation.

I am personaly interested in 3D things, I have been playing with 3ds

Max and Blender for creating 3d objects but I never felt really

comfortable with them. I discovered pov-ray a few years ago which is

used to create rendered pictures instead of creating objects. Pov-ray

use its own "programming language" to describe the scene and make the

render. Now, I have a 3D printer and I would like to create things to

print, but I don't like the GUI stuff of Blender and Pov-ray don't

create objects, so... OpenSCAD ! This is the pov-ray of objects !

Here is a simple example that create an empty box (difference of 2

cubes) and a screw propeller:

width = 3;

height = 3;

depth = 6;

thickness = 0.2;

difference() {

cube( [width,depth,height], true);

translate( [0,0,thickness] )

cube( [width-thickness, depth-thickness, height], true);

}

translate( [ width , 0 , 0 ])

linear_extrude(twist = 400, height = height*2)

square(2,true);

The following picture is made from the code above:

![openscad][]

There are scad-mode and scad-preview for emacs for editing OpenSCAD

files. scad-mode will check the coloration/syntax and scad-preview

will create the OpenScad render inside a Emacs pane. Personaly, I use

OpenSCAD opened in some corner of the screen with option set to

render on file change, and I edit with emacs. Of course you can use

any editor, or the embedded editor which is a Scintilla one which is

pretty usable.

[OpenSCAD website](http://www.openscad.org/index.html)

[OpenSCAD gallery](http://www.openscad.org/gallery.html)

[openscad]: static/openscad-rendu.png "Openscad render picture"