Projekt Części: Cecha

From FreeCAD Documentation
Revision as of 16:47, 2 May 2021 by Kaktus (talk | contribs) (Created page with "Istnieje wiele rodzajów cech, które mogą dodawać lub usuwać objętość z bryły początkowej. Słowo "cecha" odnosi się do samej operacji, jak również do bryły powst...")

Wprowadzenie

Cecha odnosi się do "kroku" w procesie modelowania, który dzieje się wewnątrz zawartości projektu części. Na przykład, za każdym razem kiedy dodajesz sześcian opcją Addytywny sześcian, dodajesz cechę, kiedy dodajesz fazkę do krawędzi opcją Fazka, dodajesz kolejną cechę. Kiedy wycinasz otwór używając szkicu i opcji kieszeń, dodajesz inną cechę.

Edycja elementu w Zawartości Projektu części z trzema kolejnymi elementami.

Istnieje wiele rodzajów cech, które mogą dodawać lub usuwać objętość z bryły początkowej. Słowo "cecha" odnosi się do samej operacji, jak również do bryły powstałej po tej operacji.

To learn more about creating solid objects with the PartDesign Workbench see feature editing.

Użycie

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()