Part Ausschneiden

From FreeCAD Documentation
Revision as of 20:59, 19 August 2021 by Le Loup (talk | contribs) (Created page with "Die Algorithmen hinter den Verbindungswerkzeugen sind ziemlich einfach und es ist wichtig, sie zu verstehen, um die Werkzeuge korrekt einzusetzen.")

Part FügeAusschnitt

Menüeintrag
Part → Verbinden → Ausschnitt für Objekt
Arbeitsbereich
Part
Standardtastenkürzel
Keiner
Eingeführt in Version
0.16
Siehe auch
Part Objekt verbinden, Part Objekt einbinden, Part Bool'sche Operationen, Part Dicke

Beschreibung

Das Part Ausschnitt für Objekt-Werkzeug erstellt einen Ausschnitt in einem ummauerten/dünnwandigen Object (z.B. einem Rohr), um ein anderes ummauerten/dünwandiges Objekt einzupassen.



Anwendung

  1. Wähle zuerst das Basisobjekt, dann das Objekt, um den Ausschnitt zu definieren.
    Die Reihenfolge der Auswahl ist wichtig. Es reicht aus, nur eine Teilform jedes Objekts (z.B. Flächen) auszuwählen.
  2. Der Part-Ausschnitt für Objekt-Befehl kann auf mehrere Arten aufgerufen werden:
    • Drücken der Part Ausschnitt für Objekt-Schaltfläche in der Part-Werkzeugleiste
    • Benutzen des Part → Verbinden → Ausschnitt für Objekt-Eintrag im Part-Menü

A Part JoinFeature object is created, with Mode set to 'Cutout'. Original objects are hidden, and the result of cutting is shown in 3D view.

Eigenschaften

Base

  • DatenBase: Reference to base object (the one to make the cutout in). The object should be a single solid.
  • DatenTool: Reference to tool object (the object that is to fit into the cutout). The object can be a single solid, or a valid compound of solids.
  • DatenMode: The mode of operation, equals 'Cutout' (Changing that will transform the tool into another Part_JoinXXX). The value of 'bypass' can be used to temporarily disable the long computations (a compound of Base and Tool will be created, which is a fast operation).
  • DatenRefine: Sets whether to apply Refine operation or not, to the final shape. The default value is determined by a 'Automatically refine shape after boolean operation' checkbox in PartDesign preferences. When Mode property is 'bypass', Refine is ignored (never applied).

Beispiel

  1. Create a pipe by applying thickness to a cylinder:
  2. Create another, smaller diameter pipe, and place it so that it pierces the wall of the first pipe:
  3. Select the first pipe, then the second pipe (order of selection is important), and click the 'Cutout for object' option from the Join tools dropdown toolbar button.

Algorithmus

Die Algorithmen hinter den Verbindungswerkzeugen sind ziemlich einfach und es ist wichtig, sie zu verstehen, um die Werkzeuge korrekt einzusetzen.

1. Base object is boolean-cut with Tool object. The resulting shape is a set (compound) of non-intersecting solids (typically, two).

2. The resulting compound is filtered: only the largest solid is kept.

3. If Refine property is true, the resulting shape is refined.

Notes

  • If after step 1, the object remains in one piece, the result of Cutout will be equivalent to boolean cut of Base with Tool.
  • Now, the tool will produce unexpected result, if a compound is supplied as Base. This may be changed in the future.
  • Because the largest piece is determined by comparing volumes of pieces, the tool can only work with solids. This may be changed in the future.

Scripting

The Join tools can by used in macros and from the python console by using the following function:

JoinFeatures.makePartJoinFeature(name = 'Cutout', mode = 'Cutout')
  • Creates an empty Cutout feature (or other Join feature, depending on mode passed). The properties Base and Tool must be assigned explicitly, afterwards.
  • Returns the newly created object.

Example:

import JoinFeatures
j = JoinFeatures.makePartJoinFeature(name = 'Cutout', mode = 'Cutout' )
j.Base = FreeCADGui.Selection.getSelection()[0]
j.Tool = FreeCADGui.Selection.getSelection()[1]

The tool itself is implemented in Python, see /Mod/Part/JoinFeatures.py (Github link) under where FreeCAD is installed.