Manual:Parametric objects/ru: Difference between revisions

From FreeCAD Documentation
(Created page with "В конце стоит отметить, что пользовательские параметрические объекты Scripted objects/ru|легко програ...")
(Created page with "Все объекты, параметрические или нет, будут иметь множество базовых параметров, таких как Имя, у...")
Line 20: Line 20:
Not all objects are parametric in FreeCAD. Often, the geometry that you import from other files won't contain any parameter, and will be simple, non-parametric objects. However, these can often be used as a base, or starting point for newly created parametric objects, depending, of course, on what the parametric object requires and the quality of the imported geometry.
Not all objects are parametric in FreeCAD. Often, the geometry that you import from other files won't contain any parameter, and will be simple, non-parametric objects. However, these can often be used as a base, or starting point for newly created parametric objects, depending, of course, on what the parametric object requires and the quality of the imported geometry.


Все объекты, параметрические или нет, будут иметь множество базовых параметров, таких как Имя, уникальное в документе и не редактируемое, Метку, представляющую собой редактируемое пользовательское имя, и [[placement/ru|размещение]], устанавливающее позицию в трёхмерном пространстве.
All objects, however, parametric or not, will have a couple of basic parameters, such as a Name, which is unique in the document and cannot be edited, a Label, which is a user-defined name that can be edited, and a [[placement]], which holds its position in the 3D space.


В конце стоит отметить, что пользовательские параметрические объекты [[Scripted objects/ru|легко программировать на python]].
В конце стоит отметить, что пользовательские параметрические объекты [[Scripted objects/ru|легко программировать на python]].

Revision as of 08:31, 16 December 2016

FreeCAD спроектирован для параметрического моделирования. Это значит, что создаваемая Вами геометрия не свободно лепится, а производится правилами и параметрами. Например, цилиндр должен создаваться по радиусу и высоте. С этими двумя параметрами программа имеет достаточно информации для построения цилиндра.

Параметрические объекты в FreeCAD это фактически небольшие куски программ, запускаемые при изменении параметров. Объекты могут иметь множество различных типов параметров: числа (целые вроде 1, 2, 3 или действительные с плавающей точкой вроде 3.1416), реальные размеры (1mm, 2.4m, 4.5ft), координаты (x,y,z), текстовые строки ("Привет!") и другие.

Последний тип позволяет быстро построить сложную цепочку операций, где каждый новый объект базируется на предыдущем, и добавление к ним новых возможностей.

In the example below, a solid, cubic object (Pad) is based on a rectangular 2D shape (Sketch) and has an extrusion distance. With these two properties, it produces a solid shape by extruding the base shape by the given distance. You can then use this object as a base for further operations, such as drawing a new 2D shape on one of its faces (Sketch001) and then making a subtraction (Pocket), until arriving at your final object.

All the intermediary operations (2D shapes, pad, pocket, etc) are still there, and you can still change any of their parameters anytime. The whole chain will be rebuilt (recomputed) whenever needed.

Two important things are necessary to know:

  1. Recomputation is not always automatic. Heavy operations, that might modify a big portion of your document, and therefore take some time, are not performed automatically. Instead, the object (and all the objects that depend on it) will be marked for recomputation (a small blue icon appears on them in the tree view). You must then press the recompute button to have all the marked objects recomputed.
  2. The dependency tree must always flow in the same direction. Loops are forbidden. You can have object A which depends on object B which depend on object C. But you cannot have object A which depends on object B which depends on object A. That would be a circular dependency. However, you can have many objects that depend on the same object, for example objects B and C both depend on A. Menu Tools -> Dependency graph shows you a dependency diagram like on the image above. It can be useful to detect problems.

Not all objects are parametric in FreeCAD. Often, the geometry that you import from other files won't contain any parameter, and will be simple, non-parametric objects. However, these can often be used as a base, or starting point for newly created parametric objects, depending, of course, on what the parametric object requires and the quality of the imported geometry.

Все объекты, параметрические или нет, будут иметь множество базовых параметров, таких как Имя, уникальное в документе и не редактируемое, Метку, представляющую собой редактируемое пользовательское имя, и размещение, устанавливающее позицию в трёхмерном пространстве.

В конце стоит отметить, что пользовательские параметрические объекты легко программировать на python.

Читать далее