|
|
| Menu location |
|---|
| Part Design → New Body |
| Workbenches |
| PartDesign |
| Default shortcut |
| None |
| Introduced in version |
| 0.17 |
| See also |
| Std Part, Feature editing |
A PartDesign Body е основният елемент за създаване на форми на твърди тела с Работна маса PartDesign. Той може да съдържа sketches, datum objects и PartDesign Features, които помагат при изграждането на твърдо тяло. Едно тяло е предназначено да притежава единствено свързано тяло, но във FreeCAD версия 1.0 е въведено експериментално свойство (ДанниAllow Compound), което позволява несъседни тела.
Тялото предоставя Origin обект, който включва локални X-, Y- и Z-оси, стандартни равнини и базова точка. Тези елементи могат да се използват като препратки за прикачване на sketches и primitive objects.
Не бъркайте PartDesign Body с
Std Part. Първият е конкретен обект, използван в
Работна маса PartDesign, предназначен за моделиране на твърд обект чрез PartDesign Features. Std Part е обект за групиране, предназначен да създаде assemblies; не се използва за моделиране, само за подреждане на различни обекти в пространството. Множество тела и други Std Parts могат да бъдат поставени вътре в една Std Part, за да се създаде сложен монтаж.
Ляво: изгледът на дървото, показващ характеристиките, които последователно произвеждат крайната форма на обекта.
Дасно: крайният обект, видим в3D View.
Ако не е избрано предишно твърдо тяло:
Ако е избран твърд обект:
Клас PartDesign Body (PartDesign::Body) е получен от клас Part Feature (Part::Feature), следователно притежава и всички свойства на последния.
В допълнение към свойствата, описани в Part Feature, тялото на PartDesign има следните свойства в Property View.
Основа
Bool): позволява множество твърди части в тялото.Link): PartDesign Feature дефинирана като "Tip", която обикновено е последната функция, създадена в тялото. Tip показва крайната форма на тялото, която е показана в 3D View когато ВидDisplay Mode Body е използвано за Tip. Вижте Tip за повече информация.Link): an external shape used as the first PartDesign Feature in the Body. It is usually set when dragging a solid object into an empty Body. If no solid is imported in this way, this property will be empty. See Base Feature for more information.Link): the App Origin object that is the positional reference for all elements listed in ДанниGroup.LinkList): a list with the PartDesign Features in the Body.Bool): whether the group is touched or not.Base
Enumeration): sets the display mode specifically for the Body with one of two types.
Through (default) exposes all objects inside the Body, that is, sketches, PartDesign Features, datum objects, etc. This mode allows visualizing partial operations done inside the Body, and thus it is the recommended mode when adding and editing features. Select the specific feature, and the set ВидVisibility to true or press the Space bar on the keyboard.Tip exposes only the final shape of the Body, which is defined by the ДанниTip property. Everything else, including sketches, partial features, datums, etc., is not displayed, even if they are visible in the Tree View. This mode is recommended when the Body does not need to be modified further, so a fixed shape is shown. This mode is also recommended when you wish to select the sub-elements (vertices, edges, and faces) of the final shape to use with other workbenches' tools.
Отворен документ може да съдържа множество тела. За да добавите нова функция към конкретно Тяло, то трябва да бъде направено активно. Активно тяло ще бъде показано в Tree View с цвета на фона, посочен от стойността Active container в Preferences Editor. Активно тяло също ще бъде показано с удебелен текст.
За да активирате или деактивирате тялото:
Активирането на тяло автоматично превключва към Работна маса PartDesign. Само едно Тяло може да бъде активно в даден момент.
Документ с две тела, от които второто е активно.
The Origin consists of the three standard axes (X, Y, Z), three standard planes (XY, XZ and YZ) and an origin point. Sketches and other objects can be attached to these elements when creating them.
The same process can be used when creating datums.
Note 1: Each element of the Origin can be hidden and unhidden individually with the Space bar. This is useful to choose the correct reference when creating other objects.
Note 2: All elements inside the Body are referenced to the Body's Origin which means that the Body can be moved and rotated in reference to the global coordinate system without affecting the placement of the elements inside.
The Base Feature is the first PartDesign Feature in the Body when the Body is based on another solid shape. This solid can be created by any workbench, or imported from an external file, for example, a STEP file.
Two PartDesign Bodies, each with a single Base Feature taken from a previously created solid.
To create the Base Feature:
You can't select an existing Body, or any of its features, when pressing New Body. If you already have a Body, you can create the Base Feature in this way:
The Base Feature is entirely optional; it is only present when including an object from outside the Body. If no external solid is included, you can still build your shape using sketches, pads, primitive objects, and other PartDesign Features. In this case the ДанниBase Feature property remains empty.
Note 1: dragging and dropping only works for Bodies which don't have a Base Feature already.
Note 2: if the Body already has several features, when you drag and drop the external solid, the Base Feature will be created at the beginning of the list of features, that is, it will be added to the beginning of the ДанниGroup property.
Note 3: If another PartDesign body is selected as a BaseFeature it must have a shape. If it is empty (no features, no BaseFeature, …) this will result in error.
Note 4: The Base Feature's placement is now correctly computed relative to the Body's own coordinate system, so the resulting shape displays and computes correctly even when the Body is inside a Part container that is not located at the global origin. As a consequence, positioning the source object at a specific location before creating the Base Feature can be used to control the shape's placement relative to the Body's origin. introduced in 26.3
The Tip is the PartDesign Feature that is exposed outside the Body; that is, if another tool from any workbench (for example, Part SimpleCopy or
Part Cut) needs to use the shape of the Body, it will use the shape of the Tip. Said in another way, the Tip is the final representation of the Body as if the parametric history didn't exist.
The Tip is automatically set to the last feature created in the Body. Nevertheless, it can also be set to any of the intermediate features by opening the Tree View context menu (right-click) and choosing Set Tip, or by changing the Body's ДанниTip value in the Property View.
Changing the Tip in effect rolls back its history, making it possible to add features that should have been added earlier. It also exposes a different shape to external tools.
In the Tree View, the Tip of the Body is recognized by the PartDesign Feature that has an overlay icon consisting of a white arrow inside a green circle.
Two PartDesign Bodies, each of them with PartDesign Features. The Tip is the last feature in them, and is marked with an overlay symbol.
By default, PartDesign Features inside a Body are selectable, as this is required to edit and add more features with the PartDesign Workbench tools. Nevertheless, selecting the individual features to use them with tools from other workbenches, like Part and Draft, is not advised, as the results may be unexpected; if this is done, in the Report View an error message may appear, Links go out of the allowed scope.
Therefore, for interactions with other workbenches, only the Body itself should be selected in the Tree View. In cases where it is necessary to select specific sub-elements of the Body (vertices, edges, and faces), the Body's ВидDisplay Mode Body property should be switched to Tip. When this mode is enabled, access to objects under the Body (features, datums, sketches) is disabled, and everything but the Body's Tip will be hidden in the 3D View.
Once the sub-elements have been used with other workbenches, ВидDisplay Mode Body can be set back to Through.
Left: when "Display Mode Body" is set to Through it is possible to select and perform operations with the individual PartDesign Features; in general, this is not recommended. Right: when "Display Mode Body" is set to Tip all selections and operations done on the Body will be done on the Tip, making sure only the final shape of the Body is exposed.
The Body's visibility supersedes the visibility of any object it contains. If the Body is hidden, the objects it contains will be hidden as well, even if their individual ВидVisibility property is set to true.
Multiple Sketches may be visible at one time, but only one PartDesign Feature (solid result) can be visible at a time. Selecting a hidden feature and pressing the Space bar in the keyboard will make it visible, and automatically hide the previously visible feature.
PartDesign Body: multiple Sketches may be visible simultaneously, but only one solid PartDesign Feature may be visible at one time, whether it is the Tip or not.
introduced in 26.3 If a Body is made visible while none of its features are visible, the current Tip is shown automatically so that the Body becomes visible in the 3D View.
PartDesign Features, just like planar objects, can be attached to different planes, usually the standard planes defined by the Body's Origin, or to custom datums.
Sketches are normally attached to a plane when they are created. In a similar way, primitive features can also be attached. Attaching these objects to a plane allows them to be moved within the Body by changing their ДанниAttachment Offset property. For more information on the attachment modes see Part EditAttachment.
A PartDesign Feature that is not attached will be shown with a purple chainlink overlay icon in the Tree View.
PartDesign Body: PartDesign Features that are not attached to a plane or coordinate system will be shown with an overlay icon in the Tree View.
A PartDesign Body is formally an instance of the class PartDesign::Body, whose parent is Part Feature (Part::Feature class) through the intermediate Part::BodyBase class, and is augmented with an Origin extension.
Simplified diagram of the relationships between the core objects in the program. The PartDesign::Body object is intended to build parametric 3D solids, and thus is derived from the basic Part::Feature object, and has an Origin to control the placement of the features used inside of it.
See also: FreeCAD Scripting Basics, and scripted objects.
See Part Feature for the general information on adding objects to the document
A PartDesign Body is created with the addObject() method of the document. Once a Body exists, PartDesign Features can be added to it with the addObject() or addObjects() methods of this Body.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("PartDesign::Body", "Body")
obj.Label = "Custom label"
feat1 = App.ActiveDocument.addObject("PartDesign::AdditiveBox", "Box")
feat2 = App.ActiveDocument.addObject("PartDesign::AdditiveCylinder", "Cylinder")
obj.addObjects([feat1, feat2])
App.ActiveDocument.recompute()
In a document that has many Bodies, the active Body can be set using the setActiveObject method of the ActiveView. The first argument is the fixed string "pdbody", and the second argument is the Body object that should be made active.
import FreeCAD as App
import FreeCADGui as Gui
doc = App.newDocument()
obj1 = App.ActiveDocument.addObject("PartDesign::Body", "Body")
obj2 = App.ActiveDocument.addObject("PartDesign::Body", "Body")
Gui.ActiveDocument.ActiveView.setActiveObject("pdbody", obj1)
App.ActiveDocument.recompute()