Part Slice/de: Difference between revisions

From FreeCAD Documentation
(Created page with "Das Tool verfügt über drei Modi: "Standard", "Split" und "CompSolid".")
(Created page with ""Standard" und "Split" unterscheiden sich durch die Wirkung des Werkzeugs auf Drähte ( Wires ), Hüllen (Shells) und Compsolids: Bei "Split", werden diese getrennt; Wenn "Sta...")
Line 17: Line 17:
Das Tool verfügt über drei Modi: "Standard", "Split" und "CompSolid".
Das Tool verfügt über drei Modi: "Standard", "Split" und "CompSolid".


"Standard" and "Split" differ by the action of the tool on wires, shells and compsolids: if "Split", those are separated; if "Standard", they are kept together (get extra segments).
"Standard" und "Split" unterscheiden sich durch die Wirkung des Werkzeugs auf Drähte ( Wires ), Hüllen (Shells) und Compsolids: Bei "Split", werden diese getrennt; Wenn "Standard", werden sie zusammengehalten (zusätzliche Segmente entstehen).


Compounding structure in "Standard" and "Split" modes follows the compounding structure of shape being sliced.
Compounding structure in "Standard" and "Split" modes follows the compounding structure of shape being sliced.

Revision as of 11:16, 1 March 2019

Part Slice

Menu location
Part → Split → Slice
Workbenches
Part
Default shortcut
None
Introduced in version
-
See also
Part Boolean Fragments, Part XOR, Join features, Part Booleans

Beschreibung

Werkzeug zum Teilen von Formen durch Überschneidung mit anderen Formen. Für eine Box und eine Ebene wird beispielsweise eine Verbindung aus zwei Körpern erstellt.

(Auf dem Bild oben wurden die Stücke anschließend manuell auseinandergeschoben, um das Schneiden zu zu verdeutlichen.)

Es gibt zwei Befehle, um eine Form zu schneiden: Slice to compound und Slice apart. Beide erstellen eine parametrische Slice-Funktion, mit der die aufgeschnittenen Teile in eine Verbindung gebracht werden, aber "Slice apart" verteilt die resultierende Verbindung in separate Objekte. "Slice to compound" ist vollständig parametrisch und verursacht keine Probleme, wenn sich die Anzahl der Teile ändert. "Slice apart" aktualisiert die Anzahl der Objekte nicht, wenn sich die Anzahl der Teile ändert.

Die Ausgabeform nimmt den gleichen Raum wie das Original ein. Es ist jedoch dort geteilt, wo es sich mit der anderen Form schneidet. Die getrennten Teile werden in eine Verbindung (oder Compsolid) eingefügt, sodass das Objekt scheinbar in einem Stück verbleibt. Sie müssen die Verbindung verteilen (explodieren) , um die einzelnen Teile zu erhalten. Wenn Sie auf die einzelnen Teile parametrisch zugreifen möchten, können Sie Part CompoundFilter für diesen Zweck verwenden. Für einen schnellen, nicht parametrischen Zugriff verwenden Sie Draft Downgrade.

Das Tool verfügt über drei Modi: "Standard", "Split" und "CompSolid".

"Standard" und "Split" unterscheiden sich durch die Wirkung des Werkzeugs auf Drähte ( Wires ), Hüllen (Shells) und Compsolids: Bei "Split", werden diese getrennt; Wenn "Standard", werden sie zusammengehalten (zusätzliche Segmente entstehen).

Compounding structure in "Standard" and "Split" modes follows the compounding structure of shape being sliced.

In "CompSolid" mode, the output is a compsolid (or a compound of compsolids, if the resulting solids form more than one island of connectedness). Compsolid is a set of solids connected by faces; they are related to solids like wires are related to edges, and shells are related to faces; the name is probably a shortened phrase "composite solid".

The overall action of the tool is very similar to Boolean Fragments, except only the pieces from the first shape are in the result.

How to use

  1. Select the object to be sliced, first, and then some objects to slice with.
    The order of selection is important. Compounds with self-intersections are not allowed (self-intersections sometimes can be accounted for by passing the compound through BooleanFragments)
  2. Invoke the Part Slice command.

A Slice parametric object is created. Original objects are hidden, and the result of intersection is shown in 3D view.

Properties

Slice

  • DatenBase: Object to be sliced.
  • DatenTools: List of objects to slice with. (as of FreeCAD v0.17.8053, this property is not displayed in property editor, and can only be accessed via Python).
  • DatenMode: "Standard", "Split", or "CompSolid". "Split" is default. Standard and Split differ by the action of the tool on aggregation type shapes: if Split, those are separated; otherwise they are kept together (get extra segments).
  • DatenTolerance: "fuzziness" value. This is an extra tolerance to apply when searching for intersections, in addition to tolerances stored in the input shapes.

Example: making puzzle

  1. Switch to Sketcher Workbench, create an new sketch. Draw a rectangle that will outline the overall shape of the puzzle. Close the sketch.
  2. Switch to Part workbench. Select the sketch, and pick Part->Create face from sketch (in menu).
  3. Switch to Sketcher workbench, and create another sketch on the same plane. Using polyline tool, draw the lines that will split the puzzle into pieces.
  4. Switch to Part workbench. Select the splitter sketch, and apply Part Boolean Fragments. This will insert vertices where lines of splitter sketch intersect. Having them is essential for the next step to work.
  5. Select the rectangular face, and the BooleanFragments of splitter sketch, and apply Part Slice.
  6. Use Part ExplodeCompound on the sliced face, to break apart the compound made by Part Slice into individual pieces.

Steps 5 and 6 can be done in single click using Part SliceApart

Scripting

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

BOPTools.SplitFeatures.makeSlice(name)
  • Creates an empty Slice feature. The 'Base' and 'Tools' properties must be assigned explicitly, afterwards.
  • Returns the newly created object.

Slice can also be applied to plain shapes, without the need to have a document object, via:

BOPTools.SplitAPI.slice(base_shape, tool_shapes, mode, tolerance = 0.0)

This can be useful for making custom Python scripted features.


Example:

import BOPTools.SplitFeatures
j = BOPTools.SplitFeatures.makeSlice(name= 'Slice')
j.Base = FreeCADGui.Selection.getSelection()[0]
j.Tools = FreeCADGui.Selection.getSelection()[1:]

The tool itself is implemented in Python, see /Mod/Part/BOPTools/SplitFeatures.py under where FreeCAD is installed.

Version

The tool was introduced in FreeCAD v0.17.8053. FreeCAD needs to be compiled with OCC 6.9.0 or later; otherwise, the tool is unavailable.