Import OpenSCAD code: Difference between revisions

From FreeCAD Documentation
(Created page with "<translate> <!--T:1--> {{TutorialInfo |Topic= Import OpenSCAD code |Level= Beginner |Time= 30 minutes |Author=r-frank |FCVersion=0.16.6703 |Files= }} == Introduction == <!--T...")
 
(relink module to workbench)
 
(34 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>

<!--T:1-->
<!--T:1-->
{{TutorialInfo
{{TutorialInfo
Line 6: Line 8:
|Time= 30 minutes
|Time= 30 minutes
|Author=r-frank
|Author=r-frank
|FCVersion=0.16.6703
|FCVersion=0.16.6704
|Files=
|Files=
}}
}}


== Introduction == <!--T:2-->
== Introduction == <!--T:10-->


== Installing OpenSCAD == <!--T:3-->
<!--T:2-->
OpenSCAD, like FreeCAD, is an open source 3D CAD program. But while FreeCAD uses a visual approach, OpenSCAD uses a programming interface to perform 3D operations. The OpenSCAD workbench can be used to import OpenSCAD object code and to have access to some of the mesh operations possible with OpenSCAD.


== Configuring OpenSCAD workbench in FreeCAD == <!--T:4-->
== Installing OpenSCAD == <!--T:11-->


== The sample model == <!--T:5-->
<!--T:3-->
* Linux users can install from the relevant distribution repositories, such as Debian, openSUSE, Mint, Unbuntu, etc. or from the [http://www.openscad.org/ OpenSCAD homepage].
* Mac Users can download the binaries from the [http://www.openscad.org/ OpenSCAD homepage].
* Windows users can download the program from the [http://www.openscad.org/ OpenSCAD homepage]. Since only the OpenSCAD executable is needed by FreeCAD, Windows users can install the portable version if they like.


== Importing the model in FreeCAD == <!--T:6-->
== Configuring OpenSCAD workbench in FreeCAD == <!--T:12-->


<!--T:4-->
* Open FreeCAD.
* Switch to [[OpenSCAD_Workbench|OpenSCAD workbench]].
* Choose Edit → Preferences → OpenSCAD from the Top menu.
** Point FreeCAD to the OpenSCAD executable (section: General OpenSCAD settings).
** All the other values on the settings-page could be left at default.


== The sample model == <!--T:13-->

<!--T:5-->
Here we will use the example005.scad file from the (old) OpenSCAD examples, but feel free to use any scad file of your liking.


</translate>
</translate>
[[Image:TutorialOpenSCAD SampleFile.jpg|800px]]
{{clear}}
<translate>
<languages/>

== Importing the model in FreeCAD == <!--T:14-->

<!--T:6-->
* In FreeCAD just choose {{KEY| File}} → {{KEY| Open}} and choose the .scad file you want to import.
* It is not important which workbench is activated, the OpenSCAD workbench itself is only needed when applying special features to your model.
* FreeCAD will import the OpenSCAD file and build up a tree with primitives and boolean operations
* Tutorial finished.

</translate>
[[Image:TutorialOpenSCAD_ImportFile.jpg|800px]]
<translate>

==Related== <!--T:9-->

<!--T:8-->
* [[FreeCAD_Howto_Import_Export|FreeCAD Howto Import Export]]
* [[Import_Export_Preferences|Import Export Preferences]]

</translate>
[[Category:OpenSCAD{{#translation:}}]]

Latest revision as of 18:38, 22 August 2021

Tutorial
Topic
Import OpenSCAD code
Level
Beginner
Time to complete
30 minutes
Authors
r-frank
FreeCAD version
0.16.6704
Example files
See also
None

Introduction

OpenSCAD, like FreeCAD, is an open source 3D CAD program. But while FreeCAD uses a visual approach, OpenSCAD uses a programming interface to perform 3D operations. The OpenSCAD workbench can be used to import OpenSCAD object code and to have access to some of the mesh operations possible with OpenSCAD.

Installing OpenSCAD

  • Linux users can install from the relevant distribution repositories, such as Debian, openSUSE, Mint, Unbuntu, etc. or from the OpenSCAD homepage.
  • Mac Users can download the binaries from the OpenSCAD homepage.
  • Windows users can download the program from the OpenSCAD homepage. Since only the OpenSCAD executable is needed by FreeCAD, Windows users can install the portable version if they like.

Configuring OpenSCAD workbench in FreeCAD

  • Open FreeCAD.
  • Switch to OpenSCAD workbench.
  • Choose Edit → Preferences → OpenSCAD from the Top menu.
    • Point FreeCAD to the OpenSCAD executable (section: General OpenSCAD settings).
    • All the other values on the settings-page could be left at default.

The sample model

Here we will use the example005.scad file from the (old) OpenSCAD examples, but feel free to use any scad file of your liking.

Importing the model in FreeCAD

  • In FreeCAD just choose File Open and choose the .scad file you want to import.
  • It is not important which workbench is activated, the OpenSCAD workbench itself is only needed when applying special features to your model.
  • FreeCAD will import the OpenSCAD file and build up a tree with primitives and boolean operations
  • Tutorial finished.

Related