Part Part2DObject/it: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
Line 33: | Line 33: | ||
=== Dati === |
=== Dati === |
||
<div class="mw-translate-fuzzy"> |
|||
{{TitleProperty|Attachment}} |
{{TitleProperty|Attachment}} |
||
* {{PropertyData|Map Mode}}: "Deactivated" di default. Questa proprietà definisce il piano che l'oggetto utilizza come riferimento per la geometria 2D. Facendo clic sui puntini di sospensione (tre puntini), a destra del campo di immissione si apre il pannello [[Part Attachment/it|Part Attachment]] della [[task panel/it|scheda azioni]] che consente di selezionare il piano di supporto selezionando diversi elementi nella [[3D view/it|vista 3D]]. Le diverse modalità sono: Deactivated, Translate origin, Object's XY, Object's XZ, Object's YZ, Plane face, Tangent to surface, Normal to edge, Frenet NB, Frenet TN, Frenet TB, Concentric, Revolution section, Plane by 3 points, Normal to 3 points, Folding, Inertia 2-3, Align O-N-X, Align O-N-Y, Align O-X-Y, Align O-X-N, Align O-Y-N, Align O-Y-X. |
* {{PropertyData|Map Mode}}: "Deactivated" di default. Questa proprietà definisce il piano che l'oggetto utilizza come riferimento per la geometria 2D. Facendo clic sui puntini di sospensione (tre puntini), a destra del campo di immissione si apre il pannello [[Part Attachment/it|Part Attachment]] della [[task panel/it|scheda azioni]] che consente di selezionare il piano di supporto selezionando diversi elementi nella [[3D view/it|vista 3D]]. Le diverse modalità sono: Deactivated, Translate origin, Object's XY, Object's XZ, Object's YZ, Plane face, Tangent to surface, Normal to edge, Frenet NB, Frenet TN, Frenet TB, Concentric, Revolution section, Plane by 3 points, Normal to 3 points, Folding, Inertia 2-3, Align O-N-X, Align O-N-Y, Align O-X-Y, Align O-X-N, Align O-Y-N, Align O-Y-X. |
||
</div> |
|||
Vedere [[Part Attachment/it|Part Attachment]] per ulteriori informazioni su tutte le modalità di associazione. |
Vedere [[Part Attachment/it|Part Attachment]] per ulteriori informazioni su tutte le modalità di associazione. |
||
==== Hidden properties Data ==== |
|||
{{TitleProperty|Attachment}} |
|||
* {{PropertyData|Attacher Type|String}}: class name of the attach engine object driving the attachment. It defaults to {{incode|Attacher::AttachEnginePlane}}. |
|||
* {{PropertyData|Support|LinkSubList}}: it is the plane or face supporting the 2D geometry. It defaults to an empty list {{incode|[]}}. |
|||
* {{PropertyData|Map Reversed|Bool}}: it defaults to {{FALSE}}; if it is {{TRUE}} the Z direction will be reversed. For example, a [[sketch|sketch]] will be flipped upside down. |
|||
* {{PropertyData|Map Path Parameter|Float}}: sets point of curve to map a [[sketch|sketch]] to. It goes from {{value|0}} to {{value|1}}, which corresponds to the {{value|start}} and {{value|end}}. It defaults to {{value|0}}. |
|||
* {{PropertyData|Attachment Offset|Placement}}: the position of the object in the [[3D view|3D view]], with respect to the attachment object's placement. The placement is defined by a {{incode|Base}} point (vector), and a {{incode|Rotation}} (axis and angle). See [[Placement|Placement]]. |
|||
===Vista=== |
===Vista=== |
||
<div class="mw-translate-fuzzy"> |
|||
{{TitleProperty|Grid}} |
{{TitleProperty|Grid}} |
||
* {{PropertyView|Grid Size}}: un valore che determina la dimensione della spaziatura delle linee della griglia locale nella [[3D view/it|vista 3D]]. |
* {{PropertyView|Grid Size}}: un valore che determina la dimensione della spaziatura delle linee della griglia locale nella [[3D view/it|vista 3D]]. |
||
Line 46: | Line 59: | ||
* {{PropertyView|Show Grid}}: se è {{TRUE}} nella [[3D view/it|vista 3D]] viene visualizzata una griglia locale all'oggetto. Questa griglia è indipendente dalla griglia di [[Draft_ToggleGrid/it|Draft]]. |
* {{PropertyView|Show Grid}}: se è {{TRUE}} nella [[3D view/it|vista 3D]] viene visualizzata una griglia locale all'oggetto. Questa griglia è indipendente dalla griglia di [[Draft_ToggleGrid/it|Draft]]. |
||
* {{PropertyView|Tight Grid}}: se è {{TRUE}} la griglia locale è localizzata attorno all'origine della forma, altrimenti si estende oltre. |
* {{PropertyView|Tight Grid}}: se è {{TRUE}} la griglia locale è localizzata attorno all'origine della forma, altrimenti si estende oltre. |
||
</div> |
|||
==== Hidden properties View ==== |
|||
All other view properties, including hidden properties, are those of the base [[Part_Feature|Part Feature]] object. |
|||
== Script == |
== Script == |
Revision as of 12:36, 19 December 2019
Introduzione
Un Part Part2DObject, o formalmente un Part::Part2DObject
, è un elemento semplice a cui è associato un Shape
topologico che può essere visualizzato nella Vista 3D.
Part::Part2DObject
è derivato da una Part Feature, ma è specializzato nella geometria 2D, dato che la sua forma è posizionata su un piano. Il piano è definito dalla sua proprietà DatiPlacement (posizione, normale e rotazione). Tuttavia, il piano può anche essere definito supportando elementi geometrici, come il piano creato da tre vertici arbitrari o una faccia di un corpo solido.
Diagramma semplificato delle relazioni tra gli oggetti principali in FreeCAD. La classe Part::Part2DObject
è specializzata per le forme 2D, quindi è la classe di base per gli oggetti planari creati con gli ambienti Draft e Sketcher.
Utilizzo
Part Part2DObject è un oggetto interno, quindi non può essere creato dall'interfaccia grafica, ma solo dalla console Python come descritto nel paragrafo Script.
Part::Part2DObject
è definito nell'ambiente Part ma può essere usato come classe base per gli oggetti da script in tutti gli [[Workbenches/it|ambienti] ] che producono forme geometriche 2D. Ad esempio, è l'oggetto base per gli (Sketcher SketchObject) degli schizzi e per la maggior parte degli oggetti creati con Draft.
I workbench possono aggiungere diverse proprietà a questo elemento di base per produrre un oggetto con comportamento complesso.
Proprietà
Vedere Proprietà per tutti i tipi di proprietà che possono avere gli oggetti con script.
Un Part Part2DObject (classe Part::Part2DObject
) è derivato da una Part Feature (classe Part::Feature
), pertanto condivide tutte le proprietà di quest'ultimo.
Oltre alle proprietà descritte in Part Feature, Part Part2DObject ha le seguenti proprietà nell'editor delle proprietà.
Dati
Attachment
- DatiMap Mode: "Deactivated" di default. Questa proprietà definisce il piano che l'oggetto utilizza come riferimento per la geometria 2D. Facendo clic sui puntini di sospensione (tre puntini), a destra del campo di immissione si apre il pannello Part Attachment della scheda azioni che consente di selezionare il piano di supporto selezionando diversi elementi nella vista 3D. Le diverse modalità sono: Deactivated, Translate origin, Object's XY, Object's XZ, Object's YZ, Plane face, Tangent to surface, Normal to edge, Frenet NB, Frenet TN, Frenet TB, Concentric, Revolution section, Plane by 3 points, Normal to 3 points, Folding, Inertia 2-3, Align O-N-X, Align O-N-Y, Align O-X-Y, Align O-X-N, Align O-Y-N, Align O-Y-X.
Vedere Part Attachment per ulteriori informazioni su tutte le modalità di associazione.
Hidden properties Data
Attachment
- DatiAttacher Type (
String
): class name of the attach engine object driving the attachment. It defaults toAttacher::AttachEnginePlane
. - DatiSupport (
LinkSubList
): it is the plane or face supporting the 2D geometry. It defaults to an empty list[]
. - DatiMap Reversed (
Bool
): it defaults tofalse
; if it istrue
the Z direction will be reversed. For example, a sketch will be flipped upside down. - DatiMap Path Parameter (
Float
): sets point of curve to map a sketch to. It goes from0
to1
, which corresponds to thestart
andend
. It defaults to0
. - DatiAttachment Offset (
Placement
): the position of the object in the 3D view, with respect to the attachment object's placement. The placement is defined by aBase
point (vector), and aRotation
(axis and angle). See Placement.
Vista
Grid
- VistaGrid Size: un valore che determina la dimensione della spaziatura delle linee della griglia locale nella vista 3D.
- VistaGrid Snap: se è
true
la griglia può essere utilizzata per agganciare i punti. - VistaGrid Style: Dashed or Light; lo stile delle linee della griglia.
- VistaShow Grid: se è
true
nella vista 3D viene visualizzata una griglia locale all'oggetto. Questa griglia è indipendente dalla griglia di Draft. - VistaTight Grid: se è
true
la griglia locale è localizzata attorno all'origine della forma, altrimenti si estende oltre.
Hidden properties View
All other view properties, including hidden properties, are those of the base Part Feature object.
Script
Vedere anche: Script di base per FreeCAD, e script di oggetti.
Vedere Part Feature per le informazioni generali.
Un Part Part2DObject viene creato con il metodo addObject()
del documento.
import FreeCAD as App
doc = App.newDocument()
obj = App.ActiveDocument.addObject("Part::Part2DObject", "Name")
obj.Label = "Custom label"
- Primitives: Box, Cylinder, Sphere, Cone, Torus, Tube, Create primitives, Shape builder
- Creation and modification: Extrude, Revolve, Mirror, Fillet, Chamfer, Make face from wires, Ruled Surface, Loft, Sweep, Section, Cross sections, 3D Offset, 2D Offset, Thickness, Projection on surface, Attachment
- Boolean: Make compound, Explode Compound, Compound Filter, Boolean, Cut, Fuse, Common, Connect, Embed, Cutout, Boolean fragments, Slice apart, Slice, XOR
- Measure: Measure Linear, Measure Angular, Measure Refresh, Clear All, Toggle All, Toggle 3D, Toggle Delta
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub