OpenSCAD Workbench/ru

Модуль OpenSCAD находится на очень ранней стадии проектирования.

Модуль OpenSCAD предоставляет взаимодействие с открытым программным обеспечением OpenSCAD.



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.

Команды интерфейса

 * [[Image:OpenSCAD_ColorCodeShape.png|32px]] Color Code Shape: Изменить цвет всех или выбранных поверхностей относительно их годности.
 * [[Image:OpenSCAD_ReplaceObject.png|32px]] Заменить объект: Заменить объект в древе компонентов.
 * [[Image:OpenSCAD_RemoveSubtree.png|32px]] Удалить объекты вместе с их потомками: Удаляет выбранные объекты и их потомки, на которые не ссылаются друге объекты.
 * [[Image:OpenSCAD_RefineShapeFeature.png|32px]] Улучшить свойство фигуры: Создаёт объект, очищенный от лишних линий.
 * [[Image:OpenSCAD_IncreaseTolerance.png|32px]] Increase Tolerance Feature: Увеличивает допуски для ребер/граней/вершины выбранного объекта (ов).
 * [[Image:OpenSCAD_Edgestofaces.png|32px]] Преобразовать грани в поверхности: Преобразование краёв в грани. Полезно при подготовке к выдавливанию геометрии, импортированной из DXF.
 * [[Image:OpenSCAD_ExpandPlacements.png|32px]] Развернуть: Раскрывает все расположения вниз по древу.
 * [[Image:OpenSCAD_ExplodeGroup.png|32px]] Расчленить Группу: Разрывает объединённые примитивы на составляющие.
 * [[Image:OpenSCAD_AddOpenSCADElement.png|32px]] Add OpenSCAD Element: Добавляет элемент OpenSCAD внедрением кода OpenSCAD в панель задач (требует установленного OpenSCAD).
 * [[Image:OpenSCAD_MeshBoolean.png|32px]] Mesh Boolean: Создаёт новый полигональный объект бинарными операциями из форм.
 * [[Image:OpenSCAD_Hull.png|32px]] Hull: Применяет операцию Convex Hull (создание выпуклой оболочки) к выбранным формам.
 * [[Image:OpenSCAD_Minkowski.png|32px]] Minkowski: Применяет суммы Минковского к выбранным формам.

предпочтения

 * [[Image:Std_DlgParameter.png|32px]] предпочтения...: Предпочтения, доступные в 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 internally on meshes. Some operations which are useful on meshes are not meaningful on a BREP model and can not be fully supported. Among these are convex hull, minkowski sum, glide and subdiv. Currently we run the OpenSCAD binary in order to perform hull and minkwoski operations and import the result. This means that the involved geometry will be triangulated. In OpenSCAD non-uniform scaling is often used, which does not impose any problems when using meshes. In our geometry kernel geometric primitives (lines, circular sections, etc) are converted to BSpline prior to performing such deformations. Those BSplines are known to cause trouble in later boolean operations. An automatic solution is not available at the moment. Please feel free to post to the forum if you encounter such problems. Often such problems can be solved be remodeling small parts. A deformation of a cylinder can substituted by an extrusion of an ellipses.

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

Учебники

 * Импорт кода OpenSCAD

Links

 * Open tickets tagged "Openscad" on the FreeCAD bugtracker
 * Things tagged with "OpenSCAD" on Thingiverse