Part BooleanFragments/ro: Difference between revisions

From FreeCAD Documentation
(Created page with "Part: BooleanFragments")
 
(Updating to match new version of source page)
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav|[[Part_CompSplittingTools|CompSplittingTools]]|[[Part_SliceApart|Slice a part]]|[[Part_Module|Part]]|IconL=Part_CompSplittingTools.png|IconC=Workbench_Part.svg|IconR=Part_SliceApart.svg}}
{{GuiCommand|Name=Part BooleanFragments|MenuLocation=Part → Split → Boolean Fragments|Workbenches=[[Part Module|Part]]|SeeAlso=[[Part_Slice|Part Slice]], [[Part_XOR|Part XOR]], [[Part_CompJoinFeatures|Join features]], [[Part Booleans|Part Booleans]]}}


{{GuiCommand|Name=Part BooleanFragments|MenuLocation=Part → Split → Boolean Fragments|Workbenches=[[Part Module|Part]]|SeeAlso=[[Part_Slice|Part Slice]], [[Part_XOR|Part XOR]], [[Part_CompJoinFeatures|Join features]], [[Part Booleans|Part Booleans]]|Version=0.17.8053}}
==Description==

==Descriere==
Tool to compute all fragments that can result from applying Boolean operations between input shapes. For example, for two intersecting spheres, three non-overlapping but touching solids are generated.
Tool to compute all fragments that can result from applying Boolean operations between input shapes. For example, for two intersecting spheres, three non-overlapping but touching solids are generated.


[[image:Part_BooleanFragments_Demo.png|600px]]
[[image:Part_BooleanFragments_Demo.png|600px]]


(pe imaginea de mai sus, piesele au fost mutate separat manual după aceea, pentru a dezvălui felierea)
(on the picture above, the pieces were moved apart manually afterwards, to reveal the slicing)


Forma de ieșire este întotdeauna un compus. Conținutul compusului depinde de tipurile de intrare și de modul de operare. Asta înseamnă că nu primești imediat accesul la piesele individuale ale rezultatului - piesele rămân grupate împreună. Piesele individuale pot fi extrase prin explodarea compusului ([[Draft Downgrade]]).
The output shape is always a compound. The content of the compound depends on input shape types and operation mode. That means, you don't immediately get access to individual pieces of the result - the pieces remain grouped together. The individual pieces can be extracted by exploding the compound ([[Draft Downgrade]]).


The tool has three modes: "Standard", "Split", and "CompSolid".
Instrumentul are trei moduri: "Standard", "Split" și "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" și "Split" diferă de acțiunea instrumentului pe fire/polilinii, shells și compsolids: dacă este "Split", acestea sunt separate; dacă este "Standard", acestea sunt păstrate împreună (obțineți segmente suplimentare).


Structura de comprimare în modurile "Standard" și "Split" urmează structura de compunere a intrărilor. Adică, dacă se alimentează cu doi compuși, fiecare conținând o sferă ca în exemplul de mai sus, rezultatul va conține de asemenea doi compuși, fiecare conținând bucățile sferei conținute inițial. Aceasta înseamnă că piesa comună va fi repetată de două ori în rezultat. Numai în cazul în care shperes de intrare ambele nu sunt în compuși, rezultatul va conține piesa comună o singură dată.
Compounding structure in "Standard" and "Split" modes follows the compounding structure of inputs. That is, if you feed in two compounds, each containing a sphere like on example above, the result will also contain two compounds, each containing the pieces of the originally contained sphere. That means, the common piece will be repeated twice in the result. Only if the input shperes are both not in compounds, the result will contain the common piece once.


In "CompSolid" mode, the solids are joined into a compsolid (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 output is a non-nested compound of compsolids
În modul "CompSolid", solidele sunt unite într-un compsolid (compsolid este un set de solide conectate prin fețe, ele sunt legate de solide, cum ar fi firele sunt legate de margini, și shell-urile sunt legate de fețe, numele fiind probabil o scurtă expresie "solid compozit"). Rezultatul este un compus non-imbricat de compsolids


== Cum se utilizează ==
==How to use==
# Selectați obiectele care urmează să fie intersectate. <br /> Ordinea de selecție nu este importantă, deoarece acțiunea instrumentului este simetrică. Este suficient să selectați o sub-formă a fiecărui obiect (de exemplu, fețele). De asemenea, puteți selecta un compus care conține toate formele de conectat, de ex. [[Array Draft]].
# Select objects to be intersected. <br /> The order of selection is not important, since the action of the tool is symmetric. It is enough to select one sub-shape of each object (e.g., faces). You can also select a compound containing all the shapes to be connected, e.g. [[Draft Array]].
# Invoke the Part BooleanFragments command.
# Invoca comanda BooleanFragments parte.


Se creează un obiect parametru Boolean Fragments. Obiectele originale sunt ascunse, iar rezultatul intersecției este afișat în vizualizarea 3D.
A Boolean Fragments parametric object is created. Original objects are hidden, and the result of intersection is shown in 3D view.


==Properties==
==Proprietăți==
{{TitleProperty|Boolean Fragments}}
{{TitleProperty|Boolean Fragments}}
* {{PropertyData|Objects}}: List of objects to be intersected. Generally, at least two objects are needed, but a single compound containing the shapes to intersect will do as well. (as of FreeCAD v0.17.8053, this property is not displayed in property editor, and can only be accessed via Python).
* {{PropertyData|Objects}}:Lista obiectelor care urmează fie intersectate. În general, sunt necesare cel puțin două obiecte, dar un singur compus care conține formele care se intersectează va face și el. (din FreeCAD v0.17.8053, această proprietate nu este afișată în editorul de proprietăți și poate fi accesată numai prin Python).
* {{PropertyData|Mode}}: "Standard", "Split", or "CompSolid". "Standard" 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).
* {{PropertyData | Mod}}: "Standard", "Split" sau "CompSolid". "Standard" este implicit. Standard și Split diferă prin acțiunea instrumentului pe formele de tip agregate: dacă sunt separate, acestea sunt separate; altfel ele sunt păstrate împreună (obțineți segmente suplimentare).
* {{PropertyData|Tolerance}}: "fuzziness" value. This is an extra tolerance to apply when searching for intersections, in addition to tolerances stored in the input shapes.
* {{PropertyData | Tolerance}}: valoarea "fuzziness". Aceasta este o toleranță suplimentară aplicabilă în cazul căutării intersecțiilor, pe lângă toleranțele stocate în formele de intrare.


==Implementarea detaliilor==
==Implementation details==
Boolean Fragments tool in "Standard mode" is OpenCascade's General Fuse Operator (GFA). It accepts a combination of probably all shape types, and the logic of output is quite convoluted. See [https://www.opencascade.com/doc/occt-7.0.0/overview/html/occt_user_guides__boolean_operations.html OpenCascade user guide: Boolean operations].
Funcția Boolean Fragments ("Fragmente booleene") în modul "Standard" este operatorul general al siguranței OpenCascade (GFA). Acceptă o combinație de probabil toate tipurile de forme, iar logica ieșirii este destul de complicată. Vedeți [https://www.opencascade.com/doc/occt-7.0.0/overview/html/occt_user_guides__boolean_operations.html OpenCascade user guide: Boolean operations].


For "Split" and "CompSolid" modes, extra post-processing is done by FreeCAD.
Pentru modurile "Split" și "CompSolid", post-procesarea suplimentară este efectuată de FreeCAD.


==Scripting==
==Script==


The tool can by used in [[macros]] and from the python console by using the following function:
Instrumentul poate fi utilizat în [[macros]] și din consola python utilizând următoarea funcție:
'''BOPTools.SplitFeatures.makeBooleanFragments(name)'''
'''BOPTools.SplitFeatures.makeBooleanFragments(name)'''


* Creates an empty BooleanFragments feature. The 'Objects' property must be assigned explicitly, afterwards.
* Creează o funcție()onalitate BooleanFragments vidă. Proprietatea "Obiecte" trebuie fie atribuită în mod explicit, după aceea.
* Returnează obiectul nou creat.
* Returns the newly created object.


BooleanFragments can also be applied to plain shapes, without the need to have a document object, via:
BooleanFragments poate fi aplicată și în forme simple, fără a avea nevoie de un obiect de document, prin:
{{code|code=
{{code|code=
import BOPTools.SplitAPI
import BOPTools.SplitAPI
Line 55: Line 57:
# pieces receives a compound of shapes; map receives a list of lists of shapes, defining list_of_shapes <--> pieces correspondence
# pieces receives a compound of shapes; map receives a list of lists of shapes, defining list_of_shapes <--> pieces correspondence
}}
}}
Acest lucru poate fi util pentru crearea de caracteristici scripturi personalizate Python.
This can be useful for making custom Python scripted features.




Exempluː
Example:
{{code|code=
{{code|code=
import BOPTools.SplitFeatures
import BOPTools.SplitFeatures
Line 65: Line 67:
}}
}}


The tool itself is implemented in Python, see /Mod/Part/BOPTools/SplitFeatures.py under where FreeCAD is installed.
Instrumentul propriu-zis este implementat în Python, vezi /Mod/Part/BOPTools/SplitFeatures.py unde este instalat FreeCAD.

==Versiune==
Acest instrument a fost introdus în FreeCAD v0.17.8053. FreeCAD și necesită compilarea cu OCC 6.9.0 sau mai recent; altfel instrumentul este inutilizabil.


{{Docnav|[[Part_CompSplittingTools|CompSplittingTools]]|[[Part_SliceApart|Slice a part]]|[[Part_Module|Part]]|IconL=Part_CompSplittingTools.png|IconC=Workbench_Part.svg|IconR=Part_SliceApart.svg}}

{{Part Tools navi}}


{{Userdocnavi}}
==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.

Revision as of 19:09, 8 March 2019

Part BooleanFragments

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

Descriere

Tool to compute all fragments that can result from applying Boolean operations between input shapes. For example, for two intersecting spheres, three non-overlapping but touching solids are generated.

(pe imaginea de mai sus, piesele au fost mutate separat manual după aceea, pentru a dezvălui felierea)

Forma de ieșire este întotdeauna un compus. Conținutul compusului depinde de tipurile de intrare și de modul de operare. Asta înseamnă că nu primești imediat accesul la piesele individuale ale rezultatului - piesele rămân grupate împreună. Piesele individuale pot fi extrase prin explodarea compusului (Draft Downgrade).

Instrumentul are trei moduri: "Standard", "Split" și "CompSolid".

"Standard" și "Split" diferă de acțiunea instrumentului pe fire/polilinii, shells și compsolids: dacă este "Split", acestea sunt separate; dacă este "Standard", acestea sunt păstrate împreună (obțineți segmente suplimentare).

Structura de comprimare în modurile "Standard" și "Split" urmează structura de compunere a intrărilor. Adică, dacă se alimentează cu doi compuși, fiecare conținând o sferă ca în exemplul de mai sus, rezultatul va conține de asemenea doi compuși, fiecare conținând bucățile sferei conținute inițial. Aceasta înseamnă că piesa comună va fi repetată de două ori în rezultat. Numai în cazul în care shperes de intrare ambele nu sunt în compuși, rezultatul va conține piesa comună o singură dată.

În modul "CompSolid", solidele sunt unite într-un compsolid (compsolid este un set de solide conectate prin fețe, ele sunt legate de solide, cum ar fi firele sunt legate de margini, și shell-urile sunt legate de fețe, numele fiind probabil o scurtă expresie "solid compozit"). Rezultatul este un compus non-imbricat de compsolids

Cum se utilizează

  1. Selectați obiectele care urmează să fie intersectate.
    Ordinea de selecție nu este importantă, deoarece acțiunea instrumentului este simetrică. Este suficient să selectați o sub-formă a fiecărui obiect (de exemplu, fețele). De asemenea, puteți selecta un compus care conține toate formele de conectat, de ex. Array Draft.
  2. Invoca comanda BooleanFragments parte.

Se creează un obiect parametru Boolean Fragments. Obiectele originale sunt ascunse, iar rezultatul intersecției este afișat în vizualizarea 3D.

Proprietăți

Boolean Fragments

  • DateObjects:Lista obiectelor care urmează să fie intersectate. În general, sunt necesare cel puțin două obiecte, dar un singur compus care conține formele care se intersectează va face și el. (din FreeCAD v0.17.8053, această proprietate nu este afișată în editorul de proprietăți și poate fi accesată numai prin Python).
  • Date Mod: "Standard", "Split" sau "CompSolid". "Standard" este implicit. Standard și Split diferă prin acțiunea instrumentului pe formele de tip agregate: dacă sunt separate, acestea sunt separate; altfel ele sunt păstrate împreună (obțineți segmente suplimentare).
  • Date Tolerance: valoarea "fuzziness". Aceasta este o toleranță suplimentară aplicabilă în cazul căutării intersecțiilor, pe lângă toleranțele stocate în formele de intrare.

Implementarea detaliilor

Funcția Boolean Fragments ("Fragmente booleene") în modul "Standard" este operatorul general al siguranței OpenCascade (GFA). Acceptă o combinație de probabil toate tipurile de forme, iar logica ieșirii este destul de complicată. Vedeți OpenCascade user guide: Boolean operations.

Pentru modurile "Split" și "CompSolid", post-procesarea suplimentară este efectuată de FreeCAD.

Script

Instrumentul poate fi utilizat în macros și din consola python utilizând următoarea funcție:

BOPTools.SplitFeatures.makeBooleanFragments(name)
  • Creează o funcție()onalitate BooleanFragments vidă. Proprietatea "Obiecte" trebuie să fie atribuită în mod explicit, după aceea.
  • Returnează obiectul nou creat.

BooleanFragments poate fi aplicată și în forme simple, fără a avea nevoie de un obiect de document, prin:

import BOPTools.SplitAPI
BOPTools.SplitAPI.booleanFragments(list_of_shapes, mode, tolerance = 0.0)

# OR, for Standard mode:

list_of_shapes = [App.ActiveDocument.Sphere.Shape, App.ActiveDocument.Sphere001.Shape]
pieces, map = list_of_shapes[0].generalFuse(list_of_shapes[1:], tolerance)
# pieces receives a compound of shapes; map receives a list of lists of shapes, defining list_of_shapes <--> pieces correspondence

Acest lucru poate fi util pentru crearea de caracteristici scripturi personalizate Python.


Exempluː

import BOPTools.SplitFeatures
j = BOPTools.SplitFeatures.makeBooleanFragments(name= 'BooleanFragments')
j.Objects = FreeCADGui.Selection.getSelection()

Instrumentul propriu-zis este implementat în Python, vezi /Mod/Part/BOPTools/SplitFeatures.py unde este instalat FreeCAD.

Versiune

Acest instrument a fost introdus în FreeCAD v0.17.8053. FreeCAD și necesită compilarea cu OCC 6.9.0 sau mai recent; altfel instrumentul este inutilizabil.