OpenSCAD(En)

Edit:11 nov. 2019, Cre:18 oct. 2019

Install and use OpenSCAD Applications

A parametric modeler

How to install and use OpenSCAD applications and simulations that I published on GitHub?
First, it shall be understood that OpenSCAD was originally designed to creates 3D volumes, which are then exported to another software, often for a 3D print.

Some OpenSCAD functions allow creation of dynamic simulations. Since the ‘Customizer’ panel addition, an end-user can modify a model parameters without program editing.
This allow widening of OpenSCAD use but presently some functions allowing to really transform a program into an application transparently for the user are missing.
While this is functionally ok, the application installation processus is a bit heavy. There is not yet much possibilities to simplify it, however you will find herebelow a sequence of screenshots to help.

It shall be understood that in applications/simulations that I published, OpenSCAD is only the ‘engine’ and those applications are totally separated from this engine. To write and read a text, you need a text processor. To create and visualize a 3D model, you need a CAD software. The difference between an OpenSCAD application and usual software you are accustomed to is that the OpenSCAD application/model is not compacted in a single file but is practically a full directory. You shall then download an OpenSCAD application as a zip file to be expanded in your chosen directory path.

The GitHub website is originally devised to archive software and ease update and collective work. This is a rtemarkable tool but its ergonomy is not well adapted for end-users. Using this website for CAD model storage is a bit of a misuse that explains the complexity.

The first thing to do is to install OpenSCAD first, following a classic software installation process. There are ‘official’ versions, but development snapshots have always proved reliable and it is preferable to use them because they are constantly evolving.
You can download OpenSCAD here: https://www.openscad.org/downloads.html
And the snaphots versions are here: https://www.openscad.org/downloads.html#snapshots
By default, OpenSCAD starts in the language set on your computer but it can be modified in the preferences.

To download an application, you have to go to my GitHub domain here:
https://github.com/PRouzeau

Then you have to go to the complete list of applications (the first page shows only a limited list) in the tab “Repositories”

In the list of models and applications, you make your choice

Going to take a look at the file ‘readme_first.txt’ can bring you some information, and to download you click on the button on the far right [Clone or Download]

This opens a small window where you have a link [Download ZIP] to click

The click starts the download and you must save the ‘zip’ file according to the procedure set on your browser. Github offers you to register or log in, it is of no interest to you.

Once the zip file has been downloaded, you must install its contents in a directory located anywhere on your computer, with the name of your choice. Be careful, OpenSCAD has problems with blanks and special characters, so the full path should not contain any of these characters.
To start the application, we choose the language version you want. Click on the file and OpenSCAD will open by loading this file.

You do not need the program editor and you need the customization panel, options that you select by opening the [View] menu

To have the interface of the personalization panel clean, you must set the display of variable names with [Show details] by selecting the option [Description only]. As a Bonus, this action will launch the compilation with the default settings.

Otherwise, the traditional way to launch a compilation is to click on the appropriate button or the [F5] key

Here it is, the default template is displayed, the display time varies a lot according to the templates, but the chosen example is displayed in less than a second (for some templates, it is much longer)

You can then start setting up the model. To look nice, we will display the cyclist and the transmission here by selecting the [Display] tab and checking the appropriate options.

The[Dimensions] tab gives you access to some parameters and here we modify the diameter of the front wheels (559, it is the official ETRTO value of the 26” wheels)

In general, you will find additional information about the file “Readme_first.txt” (it is the same one you consulted at the beginning, but you now have a copy on your computer).

You will also often have a folder[Images] with screenshots to show you what can be done with the application.

There is always a default set of parameters but some applications have different sets of parameters that you can select, new preview is automatic after selection. The compilation here takes 4 seconds on my old desktop computer (i5–680).

After making changes, you can create your own parameter sets. A new set is created by clicking on the [+] button and giving it a name. You can create as many sets as you want.

After changing the settings, you must click on the[save preset] button, as nothing is saved by default.
All parameter sets of an OpenSCAD program are saved in the file “program_name.json”.
Be careful, this file can be overwritten when updating the application. Currently to recover the data you must isolate the old datasets with a text editor and add them in the new file, beware of commas separating the datasets (the last dataset shall not have any ending comma). I will try to detail the processus later.

Once you are happy with your design, on some applications, you shall have a look on the final plans (the blueprint), so you select the appropriate view in the [Display] tab. Here we will have a look to the geometry blueprint. This is a projection which needs some calculation and you have to wait a few seconds to get it (here the view required 32 seconds). This view is on a plane, so you shall select the [View from top] button and zoom in/out, you may be helped by the button [View all]. The screenshot is what you have after all these operations
Then to be capable to export this view, you shall ‘Render’ it with the dedicated button or [F6], which needs a few more seconds of calculation.
You are now capable to export this image in ‘DXF’ (AutoCAD exchange) format, which could be read by most CAD programs. Use the menu option [File][Export][Export as DXF]. In the CAD program you will add dimensions and do any complementary work.

(c) Pierre ROUZEAU
Privacy - Vie privée - Imprimable - Rechercher
Page mise à jour le 11/11/2019 12:15