PartDesign Body/it: Difference between revisions

From FreeCAD Documentation
(Created page with "La funzione di base, base feature, è per definizione la prima funzione PartDesign creata nel corpo. Come funzione di base è possibile utilizzare una forma solida, importata...")
(Replaced content with "===Cima - Tip - Elemento finale===")
Line 124: Line 124:
La funzione di base, base feature, è per definizione la prima funzione PartDesign creata nel corpo. Come funzione di base è possibile utilizzare una forma solida, importata o modellata in altri ambienti, a cui è possibile aggiungere schizzi e altre funzionalità.
La funzione di base, base feature, è per definizione la prima funzione PartDesign creata nel corpo. Come funzione di base è possibile utilizzare una forma solida, importata o modellata in altri ambienti, a cui è possibile aggiungere schizzi e altre funzionalità.
[[File:PartDesign_Body_tree-03.png|none]]
[[File:PartDesign_Body_tree-03.png|none]]
<div class="mw-translate-fuzzy">
===Cima - Tip - Elemento finale===
===Cima - Tip - Elemento finale===
La cima (tip) è la funzione del corpo che viene esposta all'esterno (quello che si vede). Viene automaticamente impostata sull'ultima funzione nella parte inferiore dell'albero. Ma a volte può essere utile cambiarla con una funzione precedente nell'albero del corpo, con l'effetto di riportare indietro la sua storia; questo rende possibile aggiungere delle funzionalità che avrebbero dovuto essere aggiunte in precedenza. Nell'albero del corpo, la funzione impostata su punta è mostrata con un punto verde con una freccia bianca rivolta verso il basso.
</div>


The tip is the feature that is exposed outside the Body. It is automatically set to the last feature at the bottom of the tree. But sometimes it can be useful to change it to an earlier feature in the Body tree, which in effect rolls back its history; then it is possible to add features that should have been added earlier. In the Body tree, the feature set to tip displays a green dot with a white down arrow in it.
The tip is the feature that is exposed outside the Body. It is automatically set to the last feature at the bottom of the tree. But sometimes it can be useful to change it to an earlier feature in the Body tree, which in effect rolls back its history; then it is possible to add features that should have been added earlier. In the Body tree, the feature set to tip displays a green dot with a white down arrow in it.

Revision as of 22:30, 11 December 2019

Corpo

Posizione nel menu
Part Design → Crea un corpo
Ambiente
PartDesign
Avvio veloce
Nessuno
Introdotto nella versione
0.17
Vedere anche
Parte standard, Editazione delle funzioni

Descrizione

Un Corpo di PartDesign è l'elemento base per creare forme solide con PartDesign. Può contenere schizzi, oggetti di riferimento e funzioni di PartDesign per produrre un singolo solido contiguo.

Il Corpo fornisce un oggetto Origin che include gli assi X,Y,Z, e i piani locali. Questi elementi possono essere usati come riferimenti per collegare gli schizzi e gli oggetti primitivi.

Poiché si suppone che il Corpo sia un singolo solido contiguo, esso può essere spostato interamente come un'unità, senza spostare le singole funzioni. All'interno di una Parte standard è possibile posizionare più corpi per creare assiemi.

A sinistra: la vista ad albero che mostra le funzioni che producono in sequenza la forma finale dell'oggetto. A destra: l'oggetto finale visibile nella vista 3D.

Utilizzo

Se non è stato selezionato alcun solido precedente:

  1. Premere il pulsante Corpo. Viene creato un corpo vuoto che diventa automaticamente attivo.
  2. Ora si può premere Nuovo schizzo per creare uno schizzo nel corpo. In seguito lo schizzo può essere utilizzato per creare una Estrusione.
  3. In alternativa, si può aggiungere una funzione solido primitivo, ad esempio un Cubo additivo.

Se viene selezionato un oggetto solido:

  1. Premere il pulsante Corpo. Viene creato un nuovo corpo contenente una singola BaseFeature. Questo elemento BaseFeature è un semplice riferimento a un altro oggetto precedentemente creato o importato nel documento. La BaseFeature può anche essere creata trascinando il solido in un corpo vuoto. Questo viene fatto quando c'è un solido preesistente (ad esempio, creato con Part o importato da un file Step) e si vuole modificarlo ulteriormente con gli strumenti PartDesign.

Note

  • Non è possibile selezionare un corpo esistente quando si preme il pulsante Corpo. Tuttavia, un corpo esistente può essere utilizzato come BaseFeature aggiungendo quell'oggetto alla proprietà DatiBase Feature.
  • Se, quando si preme il pulsante Nuovo schizzo della barra degli strumenti di PartDesign non esiste ancora un corpo, ne viene creato automaticamente uno nuovo.
  • Fare doppio clic su Corpo nella vista ad albero o aprire il menu di scelta rapida (clic con il tasto destro) e selezionare Attiva corpo per attivare o disattivare il corpo. Se un altro corpo è attivo, esso viene disattivato.

Proprietà

Un Corpo di PartDesign (classe PartDesign::Body) è derivato da una Part Feature (classe Part::Feature), pertanto condivide tutte le proprietà di quest'ultimo.

Oltre alle proprietà descritte in Part Feature, il corpo di PartDesign ha le seguenti proprietà nell'editor delle proprietà.

Dati

Base

  • DatiTip: è la funzione definita come "funzione finale". La funzione finale è in genere l'ultima funzione creata nel corpo, sebbene una qualsiasi delle funzioni precedenti possa essere impostata anche come finale. Indica quale è la forma finale del corpo, che viene visualizzata quando VistaDisplay Mode Body è impostato su Tip.
  • DatiBase Feature: è una forma esterna usata come prima funzione nel Corpo. Di solito viene impostata quando si trascina un oggetto solido in un corpo vuoto. Se la prima funzione viene creata da uno Schizzo e un Pad o da un solido primitivo, ad esempio un Cubo additivo, allora la BaseFeature è vuota.
  • DatiGroup: un elenco con gli oggetti funzione all'interno del corpo.
  • DatiPlacement: la posizione dell'oggetto nella Vista 3D. Il posizionamento è definito da un punto Base (vettore) e una Rotation (asse e angolo). Vedere Posizionamento.

Vista

Base

  • VistaDisplay Mode Body: imposta la visualizzazione tra due modalità:
    • Through (default) espone tutto all'interno del corpo (caratteristiche, riferimenti, schizzi, ecc.). È la modalità utilizzata per aggiungere e modificare le funzioni all'interno del corpo.
    • Tip espone solo la forma del corpo stesso secondo la punta impostata; tutto il resto, inclusi gli schizzi, è nascosto alla vista e non può essere visualizzato. Uso pratico: "Tip" consente di selezionare i bordi e le facce del corpo per creare operazioni con altri ambienti di lavoro.
  • VistaDisplay Mode Body: sets the display mode specifically for the Body with one of two types.
    • Through (default) exposes all objects inside the Body, that is, sketches, features, datum objects, etc. This mode allows visualizing partial operations done inside the Body, and thus it is the recommended mode when adding and editing features. Select the specific feature, and the set VistaVisibility to true or press Space on the keyboard.
    • Tip exposes only the final shape of the Body, which is defined by the DatiTip property. Everything else, including sketches, partial features, datums, etc., is not displayed, even if they are visible in the tree view. This mode is recommended when the Body does not need to be modified further, so a fixed shape is shown. This mode is also recommended when you wish to select the sub-elements (vertices, edges, and faces) of the final shape to use with other workbenches' tools.

Descrizione completa

Singolo solido contiguo

A PartDesign Body is intended to model a single contiguous solid. The meaning of "contiguous" is an element made in one piece, with no moving parts, or disconnected solids. Examples of contiguous solids are those that are manufactured from a single piece of raw material by a process of casting, cutting, or milling. For example, a nut, a washer, and a bolt each consists of a single solid piece of metal with no moving parts, so each can be modelled by a PartDesign Body. Objects that are created by welding two pieces can also be modelled by a single Body as long as the weld joint is solid and not intended to break apart.

Once these contiguous solids are put together in some type of arrangement, then they become an "assembly". In an assembly, the objects are not fused together, they are "stacked" or placed next to each other but remain separate solids.

Left: three individual contiguous solids, each of them modelled by a PartDesign Body. Right: the individual Bodies put together in an assembly.

Feature editing

A PartDesign Body is intended to work by creating an initial solid, either from a Sketch or from a primitive shape, and then modifying it through "features" that add or remove material from the previous shape. For a full explanation go to feature editing.

A PartDesign Body will perform an automatic fusion of the solid elements inside of it. This means that the partial solids should be touching, and disconnected solids are not allowed.

Left: two individual solids that intersect each other. Right: a single PartDesign Body with two additive features; they are automatically fused together, so instead of intersecting, they form a single contiguous solid.

Left: two disconnected solids; this isn't a valid PartDesign Body. Right: two touching solids; this results in a valid PartDesign Body. The newer feature should always contact or intersect the previous feature so that it is fused to it, and becomes a single contiguous solid.

Stato attivo

Un documento aperto può contenere più corpi. Per aggiungere una nuova funzione a un corpo specifico, è necessario renderlo attivo. Un corpo attivo vinene visualizzato nella vista ad albero con il colore di sfondo specificato dal valore Active container nell'editor delle preferenze (per impostazione predefinita, blu). Un corpo attivo viene anche mostrato in grassetto.

To activate or de-activate a Body:

  • Double click on it on the tree view, or
  • Open the context menu (right click) and select Toggle active body.

L'attivazione di un corpo commuta automaticamente anche l'interfaccia nell'ambiente PartDesign, se questo non era già l'ambiente attivo. Può essere attivo solo un singolo corpo per volta.

Origine

The Origin consists of the three standard axes (X, Y, Z) and three standard planes (XY, XZ and YZ). Sketches and other objects can be attached to these elements when creating them.

  1. Create the Body.
  2. If the Body is selected in the tree view, when New sketch is pressed, the task panel will open to allow selecting one of the planes.
  3. If the Body is not selected, select the Origin instead and make it visible in the 3D view by pressing Space in the keyboard. Also expand the Origin object to see the axes and planes.
  4. Select one of the planes, either in the tree view or in the 3D view, then press New sketch. The sketch will be created on the chosen plane.

The same process can be used when creating auxiliary datum geometry like lines, planes, and coordinate systems.

All elements inside the Body are referenced to the Body's Origin which means that the Body can be moved and rotated in reference to the global coordinate system without affecting the placement of elements inside.

PartDesign Origin in the tree view, and as it appears displayed on the 3D view.

The Origin is an object of class App::Origin, while the axes and planes are objects of type App::Line and App::Plane respectively.

Funzione di base

La funzione di base, base feature, è per definizione la prima funzione PartDesign creata nel corpo. Come funzione di base è possibile utilizzare una forma solida, importata o modellata in altri ambienti, a cui è possibile aggiungere schizzi e altre funzionalità.

File:PartDesign Body tree-03.png

Cima - Tip - Elemento finale

The tip is the feature that is exposed outside the Body. It is automatically set to the last feature at the bottom of the tree. But sometimes it can be useful to change it to an earlier feature in the Body tree, which in effect rolls back its history; then it is possible to add features that should have been added earlier. In the Body tree, the feature set to tip displays a green dot with a white down arrow in it.

Per maggiori dettagli, vedere la pagina Imposta come elemento finale .

Gestione della visibilità

La visibilità del corpo prevale sulla visibilità di qualsiasi oggetto in esso contenuto. Se il corpo è nascosto, sono nascosti anche gli oggetti che esso contiene, anche se la loro visibilità è impostata su true. Può essere visibile una sola funzione per volta. Selezionare una funzione nascosta e premere barra spaziatrice per renderla visibile e nascondere automaticamente la funzione precedentemente visibile.

The Body's visibility supersedes the visibility of any object it contains. If the Body is hidden, the objects it contains will be hidden as well, even if their visibility is set to true. Only one feature can be visible at a time. Selecting a hidden feature and pressing the space bar will make it visible, and automatically hide the previously visible feature.

Interazione con gli altri ambienti di lavoro

Per impostazione predefinita, gli oggetti sottostanti ad un Corpo sono selezionabili, e ovviamente ciò è necessario per poter modificare e aggiungere delle funzioni in PartDesign. Ma si sconsiglia di selezionare le funzioni di un corpo per creare operazioni con altri ambienti (come Part o Draft) in quanto i risultati potrebbero essere inaspettati; in questi casi, nella finestra Report, appare l'errore Links go out of the allowed scope.

By default, objects underneath a Body are selectable, and this is of course required to edit and add features in PartDesign. But selecting a Body's features to create operations from other workbenches (like Part or Draft) is not advised, as the results may be unexpected; in all cases, an error labelled Links go out of the allowed scope will appear in the Report view.

Pertanto, per le interazioni con gli altri workbench, dovrebbe essere selezionato solo il Corpo stesso dall'albero del modello. Nei casi in cui è necessario selezionare una topologia specifica sul Corpo (vertice, bordo, faccia), allora la proprietà vista Display Mode Body del Corpo può essere modificata da Through (impostazione predefinita) a Tip. Questa proprietà è accessibile dal pannello Vista. In modalità Tip l'accesso agli oggetti sottostanti al Corpo (funzioni, riferimenti, schizzi) è disabilitato; nella vista 3D viene nascosto tutto tranne la funzione tip, indipendentemente da quale oggetto è impostato come visibile.

Una volta completate le operazioni in altri workbench, non dimenticare di ripristinare la proprietà Display Mode Body in Through per essere di nuovo in grado di modificare il corpo.

Inheritance

Simplified diagram of the relationships between the core objects in the program. The PartDesign::Body object is intended to build parametric 3D solids, and thus is derived from the basic Part::Feature object.

Script

Vedere anche: Script di base per FreeCAD, e script di oggetti.

Vedere Part Feature per le informazioni generali.

Un corpo PartDesign viene creato con il metodo addObject() del documento. Quando esiste un corpo, ad esso possono essere aggiunte e associate le funzioni primitive additive e sottrattive.

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')
obj.addObject(feature)
App.ActiveDocument.recompute()

The active Body can be set using the setActiveObject method of the ActiveView. The first argument is the fixed string 'pdbody', and the second argument is the Body object itself.

import FreeCAD as App
import FreeCADGui as Gui
App.newDocument()
obj = App.ActiveDocument.addObject('PartDesign::Body', 'Body')

Gui.ActiveDocument.ActiveView.setActiveObject('pdbody', obj)