OpenSCAD Workbench/fr: Difference between revisions

From FreeCAD Documentation
(mise a jour)
(Updating to match new version of source page)
Line 1: Line 1:
The OpenSCAD module is in an early stage of development.
=OpenSCAD_Module/fr=

__NOTOC__
The OpenSCAD module offers interoperability with the open source software [http://www.openscad.org/ OpenSCAD].
Le module OpenSCAD n'est pas encore inclus dans FreeCAD, et, est au début de son développement.

Le module OpenSCAD offre une interopérabilité au logiciel libres [http://www.openscad.org/ OpenSCAD].<br>

Il permet l’importation des fichiers '''[[OpenSCAD_CSG/fr|.CSG]]''' de OpenSCAD dans FreeCAD.
<br><br>
[[Image:OpenSCADexamaple1.png|An example of imported OpenSCAD geometry]]
[[Image:OpenSCADexamaple1.png|An example of imported OpenSCAD geometry]]
<br><br>
L'exportation produit un fichier '''[[OpenSCAD_CSG/fr|.CSG]]''' de base, (sous-arbre) du fichier '''[[OpenSCAD_CSG/fr|.CSG]]'''. Les formes géométriques ne sont pas construites sur des opérations '''[[OpenSCAD_CSG/fr|.CSG]]''' et seront exportées sous forme de [[Mesh_Module/fr|mailles]]. Par conséquent la conversion de '''[[OpenSCAD_CSG/fr|.CSG]]''' en '''[http://fr.wikipedia.org/wiki/BRep BREP]''', devrait théoriquement être possible. Contrairement à une conversion de '''[http://fr.wikipedia.org/wiki/BRep BREP]''' en '''[OpenSCAD_CSG/fr .CSG]''', qui n'est en général, pas possible.


It contains an [[OpenSCAD_CSG|importer]] which allows you to open the [[OpenSCAD_CSG|.csg]] output from OpenSCAD in FreeCAD.
Le module '''[http://www.openscad.org/ OpenSCAD]''' contient une boîte à outils, avec des fonctions, pour modifier l'arborescence des fonctions, et, des modèles en vue de réparation.


The [[OpenSCAD_CSG|exporter]] outputs a CSG based (sub-)tree to [[OpenSCAD_CSG|.csg]]. Geometry which is not based on CSG operations and is exported as a mesh.
== GUI Commands ==
The OpenSCAD module contains a toolbox with functions to modify the feature tree and repair models.
{{OpenSCAD Tools/fr}}


==Langage OpenSCAD et format de fichier==
== OpenSCAD language and file format ==
The OpenSCAD language allows the use of variables and loops. It allows you to specify submodules to reuse geometry and code. This high degree of flexibility makes parsing very complex. Currently the OpenSCAD module in FreeCAD can not handle the OpenSCAD language natively.
Instead, if OpenSCAD is installed, it can be used to convert the input to an output format named 'CSG'. It is a subset of the OpenSCAD Language and can be used as the input to OpenSCAD for further processing.
During conversion all parametric behavior is lost - all variable names are discarded, loops expanded and mathematical expressions evaluated.


== GUI Commands ==
La langue [http://www.openscad.org/ OpenSCAD] permet l'utilisation de variables, et, de boucles. Il permet de spécifier les sous-modules pour réutiliser le code et les formes géométriques. Cette grande flexibilité, rend l'analyse très complexe. Actuellement le module '''OpenSCAD de FreeCAD''' ne peut pas gérer le langage OpenSCAD par automatiquement. Au contraire, si '''OpenSCAD''' est installé, il est utilisé pour compiler l'entrée dans un format de sortie nommé '''CSG'''. C'est un sous-ensemble du langage de OpenSCAD et peut être utilisé comme entrée de '''OpenSCAD''' pour un traitement ultérieur. Cependant dans cette étape de la compilation, tous les comportements paramétriques sont perdu. Tous les noms de variables seront écartées, les boucles sont élargies, et, les expressions mathématiques sont évaluées.
{{OpenSCAD Tools}}


==Limites==
== Limitations ==
OpenSCAD creates constructive solid geometry as well as importing mesh files and extruding 2d geometry (from dxf files). FreeCAD allows you to create CSG with primitives as well. The FreeCAD geometry kernel (OCCT) works using a boundary representation.
Therefore conversion from CSG to BREP should, in theory, be possible whereas conversion from BREP to CSG is, in general, not.


OpenSCAD works internaly on meshes. Some operations which are useful on meshes are not meaningful on a BREP model and are currently not available. Among these are convex hull, minkowski sum, glide and subdiv.
'''OpenSCAD''' permet la construction de formes géométriques solides, comme l'importation de fichiers de '''maillage''' et d''''extrusion''' géométriques 2d (à partir de fichiers '''[http://fr.wikipedia.org/wiki/Drawing_eXchange_Format .dxf]'''). FreeCAD permet ainsi de faire des '''[[OpenSCAD_CSG/fr|.CSG]]''' avec primitives. Le noyau géométrique de FreeCAD ('''OCCT''') travaille sur une représentation. La conversion de '''[[OpenSCAD_CSG/fr|.CSG]]''' en '''[http://fr.wikipedia.org/wiki/B-Rep BREP]''' doit donc être théoriquement possible. Alors que la conversion de '''[http://fr.wikipedia.org/wiki/B-Rep BREP]''' à '''[[OpenSCAD_CSG/fr|.CSG]]''' est, actuellement impossible.
OpenSCAD is very tolerant when doing booleans on coincident geometry. The FreeCAD geometry kernel is less tolerant. An automatic solution is not available at the moment. Please feel free to post to the forum if you encounter such problems.


==Conseils==
== Hints ==
When importing DXF set the Draft precision to a sensible amount as this will affect the detection of connected edges.


If FreeCAD crashes when importing CSG, it is strongly recommended that you enable 'automatically check model after boolean operation' in Menu -> Edit -> Preferences -> Part Design -> Model setting
Lors de l'importation du fichier '''[http://fr.wikipedia.org/wiki/DXF .DXF]''', il faut définir la précision du projet, à une valeur raisonnable, car cela aura une incidence sur la détection des arêtes connectées. '''(Édition → Préférences → Draft Importation/Exportation → Options du format DXF → Segment de courbes maximal)'''


== Links ==
* [http://www.thingiverse.com/tag:openscad Things tagged with "Openscad" on Thingiverse]


{{clear}}
{{languages/fr | {{en|OpenSCAD_Module}} {{es|OpenSCAD_Module/es}} {{it|OpenSCAD_Module/it}} }}
<languages/>

Revision as of 21:44, 20 March 2014

The OpenSCAD module is in an early stage of development.

The OpenSCAD module offers interoperability with the open source software OpenSCAD.


An example of imported OpenSCAD geometry

It contains an importer which allows you to open the .csg output from OpenSCAD in FreeCAD.

The exporter outputs a CSG based (sub-)tree to .csg. Geometry which is not based on CSG operations and is exported as a mesh. The OpenSCAD module contains a toolbox with functions to modify the feature tree and repair models.

OpenSCAD language and file format

The OpenSCAD language allows the use of variables and loops. It allows you to specify submodules to reuse geometry and code. This high degree of flexibility makes parsing very complex. Currently the OpenSCAD module in FreeCAD can not handle the OpenSCAD language natively. Instead, if OpenSCAD is installed, it can be used to convert the input to an output format named 'CSG'. It is a subset of the OpenSCAD Language and can be used as the input to OpenSCAD for further processing. During conversion all parametric behavior is lost - all variable names are discarded, loops expanded and mathematical expressions evaluated.

GUI Commands

Template:OpenSCAD Tools

Limitations

OpenSCAD creates constructive solid geometry as well as importing mesh files and extruding 2d geometry (from dxf files). FreeCAD allows you to create CSG with primitives as well. The FreeCAD geometry kernel (OCCT) works using a boundary representation. Therefore conversion from CSG to BREP should, in theory, be possible whereas conversion from BREP to CSG is, in general, not.

OpenSCAD works internaly on meshes. Some operations which are useful on meshes are not meaningful on a BREP model and are currently not available. Among these are convex hull, minkowski sum, glide and subdiv. OpenSCAD is very tolerant when doing booleans on coincident geometry. The FreeCAD geometry kernel is less tolerant. An automatic solution is not available at the moment. Please feel free to post to the forum if you encounter such problems.

Hints

When importing DXF set the Draft precision to a sensible amount as this will affect the detection of connected edges.

If FreeCAD crashes when importing CSG, it is strongly recommended that you enable 'automatically check model after boolean operation' in Menu -> Edit -> Preferences -> Part Design -> Model setting

Links