Part SliceApart/fr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 21: Line 21:
[[Part SliceApart/fr|Slice apart]] est identique à [[Part Slice/fr|Part Slice]] suivi de [[Part_ExplodeCompound/fr|Part Explode Compound]]. Alors que "Slice to compound (Trancher vers composé)" soit totalement paramétrique et ne pose aucun problème lorsque le nombre de pièces change, "Slice apart (Découper en tranches)" ne met pas à jour le nombre d'objets lorsque le nombre de pièces change.
[[Part SliceApart/fr|Slice apart]] est identique à [[Part Slice/fr|Part Slice]] suivi de [[Part_ExplodeCompound/fr|Part Explode Compound]]. Alors que "Slice to compound (Trancher vers composé)" soit totalement paramétrique et ne pose aucun problème lorsque le nombre de pièces change, "Slice apart (Découper en tranches)" ne met pas à jour le nombre d'objets lorsque le nombre de pièces change.
</div>
</div>

The output shape occupies the same space as the original. But it is split where it intersects with other shapes. The split pieces are individual pieces.



<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
Veuillez visiter la page [[Part Slice/fr|Tranchage Part]] pour plus d'informations.
Veuillez visiter la page [[Part Slice/fr|Tranchage Part]] pour plus d'informations.
</div>
</div>

===Tree structure of Slice Apart===
The Slice Apart command creates more than only the sliced object. In the following example a cube is sliced by a face.

The slice is created and for each piece of it there is a [[Part CompoundFilter]] created, thus the same slice occurs multiple times below each CompundFilter. All these CompoundFilters are united in a Compound.

[[Image:Part_SliceApartTree.png]]


==Example: making puzzle==
See [[Part Slice|Part Slice]] Example Steps 1 to 6


==Scripting==

The tool can by used in [[macros]] and from the python console by using the following function:
'''BOPTools.SplitFeatures.makeSlice(name)'''

Set mode to '''split''' for slice apart

* 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:
{{code|code=
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==
==Version==
Line 33: Line 73:


{{Part Tools navi}}
{{Part Tools navi}}






{{Userdocnavi}}
{{Userdocnavi}}

Revision as of 16:19, 12 March 2019

Part SliceApart

Emplacement du menu
Part → Split → Slice Apart
Ateliers
Part
Raccourci par défaut
Aucun
Introduit dans la version
0.18.15506
Voir aussi
Part Slice to compound, Part Éclater le composé

Description

Outil pour diviser des formes par intersection avec d'autres formes. Par exemple, pour une boîte et un plan, deux solides sont créés.

Sur la photo ci-dessus, les pièces ont ensuite été séparées manuellement pour révéler le découpage.

Slice apart est identique à Part Slice suivi de Part Explode Compound. Alors que "Slice to compound (Trancher vers composé)" soit totalement paramétrique et ne pose aucun problème lorsque le nombre de pièces change, "Slice apart (Découper en tranches)" ne met pas à jour le nombre d'objets lorsque le nombre de pièces change.

The output shape occupies the same space as the original. But it is split where it intersects with other shapes. The split pieces are individual pieces.


Veuillez visiter la page Tranchage Part pour plus d'informations.

Tree structure of Slice Apart

The Slice Apart command creates more than only the sliced object. In the following example a cube is sliced by a face.

The slice is created and for each piece of it there is a Part CompoundFilter created, thus the same slice occurs multiple times below each CompundFilter. All these CompoundFilters are united in a Compound.


Example: making puzzle

See Part Slice Example Steps 1 to 6


Scripting

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

BOPTools.SplitFeatures.makeSlice(name)

Set mode to split for slice apart

  • 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

Slice Apart a été introduit dans FreeCAD v0.18.15506. FreeCAD doit être compilé avec OCC 6.9.0 ou une version ultérieure; sinon, l'outil n'est pas disponible.