PartDesign Formelemente

From FreeCAD Documentation
Revision as of 10:08, 24 December 2019 by Maker (talk | contribs) (Created page with "== Anwendung ==")

Einleitung

Ein PartDesign Formelement verweist auf einen "Schritt" im Modellierungsprozess, der innerhalb eines PartDesign Body stattfindet. Zum Beispiel jedes Mal, wenn du einen Festkörperquader mit PartDesign Quader hinzufügen, fügst Du ein Formelement hinzu; wenn Du eine Fase zu einer Kante mit PartDesign Fase hinzufügst, fügst Du ein weiteres Formelement hinzu; wenn Du ein Loch mit Skizze und PartDesign Tasche schneidest, fügst Du ein weiteres Formelement hinzu.

Feature editing in a PartDesign Body with three sequential features.

Es gibt viele Arten von Formelementen, die einem ursprünglichen Körper Volumen hinzufügen oder entfernen können. Das Wort "Formelement" bezieht sich auf die Bearbeitung selbst und auch auf den resultierenden Festkörper nach dieser Bearbeitung.

Um mehr über die Erstellung von Festkörperobjekten mit dem PartDesign Arbeitsbereich zu erfahren, siehe Formelementbearbeitung.

Anwendung

Almost all tools in the PartDesign Workbench are meant to add features to a PartDesign Body. These tools can be accessed from the menu and toolbar buttons while an object or sub-element (vertex, edge, face) is selected.

The features can be placed in different categories:

Inheritance

Simplified diagram of the relationships between the core objects in the program. The PartDesign::Feature objects are used to build parametric 3D solids, and thus are derived from the basic Part::Feature object.

Scripting

See also: FreeCAD Scripting Basics, and scripted objects.

See Part Feature for the general information on adding objects from the Python console.

See PartDesign Body for the general information on adding a Body. Once a Body exists, features can be attached to it using the Body's addObject() method.

import FreeCAD as App

doc = App.newDocument()
obj = App.ActiveDocument.addObject('PartDesign::Body', 'Body')
obj.Label = "Custom label"

feature = App.ActiveDocument.addObject('PartDesign::AdditiveBox', 'Box')
feature.Width = 200
feature.Length = 300
feature.Height = 500
obj.addObject(feature)
App.ActiveDocument.recompute()

feature2 = App.ActiveDocument.addObject('PartDesign::SubtractiveBox', 'Box')
feature2.Width = 50
feature2.Length = 200
feature2.Height = 400
obj.addObject(feature2)
App.ActiveDocument.recompute()