Draft PointArray/it: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
Line 23: Line 23:
Lo strumento [[Image:Draft_PointArray.svg|16px]] Serie su punti posiziona le copie di una forma selezionata lungo vari punti selezionati.
Lo strumento [[Image:Draft_PointArray.svg|16px]] Serie su punti posiziona le copie di una forma selezionata lungo vari punti selezionati.


<div class="mw-translate-fuzzy">
Questo strumento può essere utilizzato su forme 2D create con [[Draft Workbench/it|Draft]] ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con [[Part Workbench/it|Part]] o [[PartDesign Workbench/it|PartDesign]] o [[Arch Workbench/it|Arch]].
Questo strumento può essere utilizzato su forme 2D create con [[Draft Workbench/it|Draft]] ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con [[Part Workbench/it|Part]] o [[PartDesign Workbench/it|PartDesign]] o [[Arch Workbench/it|Arch]].
</div>


<div class="mw-translate-fuzzy">
Per posizionare le copie in una schiera ortogonale usare [[Draft Array/it|Serie]]; per posizionare le copie su un percorso, utilizzare [[Draft PathArray/it|Serie su percorso]]; per creare copie o cloni e posizionarli manualmente, utilizzare [[Draft Move/it|Sposta]], [[Draft Rotate/it|Ruota]] e [[Draft Clone/it|Clona]].
Per posizionare le copie in una schiera ortogonale usare [[Draft Array/it|Serie]]; per posizionare le copie su un percorso, utilizzare [[Draft PathArray/it|Serie su percorso]]; per creare copie o cloni e posizionarli manualmente, utilizzare [[Draft Move/it|Sposta]], [[Draft Rotate/it|Ruota]] e [[Draft Clone/it|Clona]].
</div>


[[Image:Draft_PointArray_Example.png|400px]]
[[Image:Draft_PointArray_Example.png|400px]]
Line 32: Line 36:
==Utilizzo==
==Utilizzo==


<div class="mw-translate-fuzzy">
# Selezionare un oggetto che si desidera distribuire.
# Selezionare un oggetto che si desidera distribuire.
# Selezionare un composto di punti.
# Selezionare un composto di punti.
# Premere il pulsante {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft PointArray/it|Serie su punti]]}}.
# Premere il pulsante {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft PointArray/it|Serie su punti]]}}.
</div>


Ogni elemento della serie è un clone esatto dell'oggetto originale, ma l'intera serie è considerata una singola unità in termini di proprietà e aspetto.

=== Point compound ===

<div class="mw-translate-fuzzy">
Per creare un composto punto selezionare vari [[Draft Point/it|Punti]] e poi premere il pulsante {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade/it|Promuovi]]}}.
Per creare un composto punto selezionare vari [[Draft Point/it|Punti]] e poi premere il pulsante {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade/it|Promuovi]]}}.
</div>


In essence, the object to be used as the compound must have one of three properties, {{PropertyData|Components}}, {{PropertyData|Links}}, or {{PropertyData|Geometry}}, and inside that compound, there must be at least one point with {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}} properties.
Ogni elemento della serie è un clone esatto dell'oggetto originale, ma l'intera serie è considerata una singola unità in termini di proprietà e aspetto.

{{Emphasis|Note:}} in the case of {{Button|[[File:Draft_Point.svg|16px]] [[Draft_Point|Draft Point]]}} and {{Button|[[File:Part_Point.svg|16px]] [[Part_Point|Part Point]]}} the array will try to position the copies using the {{PropertyData|Placement}} of the point. In the case of a sketcher {{Button|[[File:Sketcher_CreatePoint.svg|16px]] [[Sketcher_CreatePoint|Point]]}}, the position will be taken from its internal {{incode|X}}, {{incode|Y}}, and {{incode|Z}} attributes.

{{Emphasis|Note 2:}} for {{Button|[[File:Draft_Point.svg|16px]] [[Draft_Point|Draft Point]]}} its {{PropertyData|Placement}} always follows the values of {{PropertyData|X}}, {{PropertyData|Y}}, {{PropertyData|Z}}, so modifying these values is enough to produce the desired displacement. However, for {{Button|[[File:Part_Point.svg|16px]] [[Part_Point|Part Point]]}}, the net displacement is given by the sum of {{PropertyData|Placement}} with the vector with components {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}}.


== Opzioni ==
== Opzioni ==
Line 46: Line 62:
== Proprietà ==
== Proprietà ==


A [[Draft_PointArray|PointArray]] is derived from a [[Part_Feature|Part Feature]] ({{incode|Part::Feature}} class), therefore it shares all the latter's properties. In addition to the properties described in [[Part_Feature|Part Feature]], the PointArray has the following properties in the [[property editor|property editor]].

<div class="mw-translate-fuzzy">
* {{PropertyData/it|Base}}: specifica l'oggetto da duplicare.
* {{PropertyData/it|Base}}: specifica l'oggetto da duplicare.
* {{PropertyData/it|Count}}: (sola lettura) specifica il numero di copie dell'oggetto di base. Questo numero dipende dal numero di [[Draft Point/it|Punti]] nel composto.
* {{PropertyData/it|Count}}: (sola lettura) specifica il numero di copie dell'oggetto di base. Questo numero dipende dal numero di [[Draft Point/it|Punti]] nel composto.
Line 51: Line 70:
L'oggetto composto deve avere un attributo {{PropertyData/it|Links}}, {{PropertyData/it|Componets}} o {{PropertyData/it|Geometry}}. Ciascuno degli oggetti all'interno del composto deve essere un [[Draft Point/it|Punto Draft]] con gli attributi {{PropertyData/it|X}}, {{PropertyData/it|Y}} e {{PropertyData/it|Z}}.
L'oggetto composto deve avere un attributo {{PropertyData/it|Links}}, {{PropertyData/it|Componets}} o {{PropertyData/it|Geometry}}. Ciascuno degli oggetti all'interno del composto deve essere un [[Draft Point/it|Punto Draft]] con gli attributi {{PropertyData/it|X}}, {{PropertyData/it|Y}} e {{PropertyData/it|Z}}.
I composti possono essere creati con [[Part Compound/it|Crea composto di Part]] (attributo {{PropertyData|Links}} ) o con [[Draft Upgrade/it|Promuovi di Draft]] (attributo {{PropertyData|Componets}}).
I composti possono essere creati con [[Part Compound/it|Crea composto di Part]] (attributo {{PropertyData|Links}} ) o con [[Draft Upgrade/it|Promuovi di Draft]] (attributo {{PropertyData|Componets}}).
</div>


== Script ==
== Script ==
Line 56: Line 76:


Lo strumento PointArray può essere utilizzato nelle [[macros/it|macro]] e dalla [[Python/it|console di Python]] tramite la seguente funzione:
Lo strumento PointArray può essere utilizzato nelle [[macros/it|macro]] e dalla [[Python/it|console di Python]] tramite la seguente funzione:

Older call
{{Code|code=
point_array = makePointArray(base_object, point_object)
}}

New call
{{Code|code=
{{Code|code=
point_array = make_point_array(base_object, point_object, extra=None):
PointArray = makePointArray(base, ptlst)
}}
}}


<div class="mw-translate-fuzzy">
* Crea un oggetto {{incode|PointArray}} dall'oggetto base {{incode|base}}, posizionando le copie sulla {{incode|ptlst}}.
* Crea un oggetto {{incode|PointArray}} dall'oggetto base {{incode|base}}, posizionando le copie sulla {{incode|ptlst}}.
* {{incode|ptlst}} è un oggetto con gli attributi {{incode|Geometry}}, {{incode|Links}}, o {{incode|Components}} che definisce la posizione delle copie.
* {{incode|ptlst}} è un oggetto con gli attributi {{incode|Geometry}}, {{incode|Links}}, o {{incode|Components}} che definisce la posizione delle copie.
</div>


Esempio:
Esempio:
{{Code|code=
{{Code|code=
import FreeCAD, Draft
import FreeCAD as App
import Draft


doc = App.newDocument()
Polygon = Draft.makePolygon(3, radius=500.0)


p1 = Draft.makePoint(FreeCAD.Vector(1500, 0, 0))
polygon = Draft.make_polygon(3, radius=500.0)
p2 = Draft.makePoint(FreeCAD.Vector(2500, 0, 0))
p3 = Draft.makePoint(FreeCAD.Vector(2000, 1000, 0))


p1 = Draft.make_point(App.Vector(1500, 0, 0))
# Create a compound of points
addList, deleteList = Draft.upgrade([p1, p2, p3])
p2 = Draft.make_point(App.Vector(2500, 0, 0))
p3 = Draft.make_point(App.Vector(2000, 1000, 0))


compound = doc.addObject("Part::Compound", "Compound")
# Extract the compound from the list
compound = addList[0]
compound.Links = [p1, p2, p3]


PointArray = Draft.makePointArray(Polygon, compound)
point_array = Draft.make_point_array(polygon, compound)
doc.recompute()
}}
}}



Revision as of 21:41, 5 June 2020

Serie su punti

Posizione nel menu
Draft → Serie su punti
Ambiente
Draft, Arch
Avvio veloce
Nessuno
Introdotto nella versione
0.18
Vedere anche
Serie, Serie su tracciato

Descrizione

Lo strumento Serie su punti posiziona le copie di una forma selezionata lungo vari punti selezionati.

Questo strumento può essere utilizzato su forme 2D create con Draft ma può anche essere utilizzato su molti tipi di oggetti 3D come quelli creati con Part o PartDesign o Arch.

Per posizionare le copie in una schiera ortogonale usare Serie; per posizionare le copie su un percorso, utilizzare Serie su percorso; per creare copie o cloni e posizionarli manualmente, utilizzare Sposta, Ruota e Clona.

Oggetto duplicato in punti specifici

Utilizzo

  1. Selezionare un oggetto che si desidera distribuire.
  2. Selezionare un composto di punti.
  3. Premere il pulsante Serie su punti.

Ogni elemento della serie è un clone esatto dell'oggetto originale, ma l'intera serie è considerata una singola unità in termini di proprietà e aspetto.

Point compound

Per creare un composto punto selezionare vari Punti e poi premere il pulsante Promuovi.

In essence, the object to be used as the compound must have one of three properties, DatiComponents, DatiLinks, or DatiGeometry, and inside that compound, there must be at least one point with DatiX, DatiY, and DatiZ properties.

Note: in the case of Draft Point and Part Point the array will try to position the copies using the DatiPlacement of the point. In the case of a sketcher Point, the position will be taken from its internal X, Y, and Z attributes.

Note 2: for Draft Point its DatiPlacement always follows the values of DatiX, DatiY, DatiZ, so modifying these values is enough to produce the desired displacement. However, for Part Point, the net displacement is given by the sum of DatiPlacement with the vector with components DatiX, DatiY, and DatiZ.

Opzioni

Non ci sono opzioni per questo strumento. O funziona con l'oggetto selezionato o non funziona.

Proprietà

A PointArray is derived from a Part Feature (Part::Feature class), therefore it shares all the latter's properties. In addition to the properties described in Part Feature, the PointArray has the following properties in the property editor.

  • DatiBase: specifica l'oggetto da duplicare.
  • DatiCount: (sola lettura) specifica il numero di copie dell'oggetto di base. Questo numero dipende dal numero di Punti nel composto.
  • DatiPointList: specifica un oggetto composto da oggetti punto che indicano dove verranno visualizzate le copie dell'oggetto DatiBase.

L'oggetto composto deve avere un attributo DatiLinks, DatiComponets o DatiGeometry. Ciascuno degli oggetti all'interno del composto deve essere un Punto Draft con gli attributi DatiX, DatiY e DatiZ. I composti possono essere creati con Crea composto di Part (attributo DatiLinks ) o con Promuovi di Draft (attributo DatiComponets).

Script

Vedere anche: Draft API e Nozioni di base sugli script di FreeCAD.

Lo strumento PointArray può essere utilizzato nelle macro e dalla console di Python tramite la seguente funzione:

Older call

point_array = makePointArray(base_object, point_object)

New call

point_array = make_point_array(base_object, point_object, extra=None):
  • Crea un oggetto PointArray dall'oggetto base base, posizionando le copie sulla ptlst.
  • ptlst è un oggetto con gli attributi Geometry, Links, o Components che definisce la posizione delle copie.

Esempio:

import FreeCAD as App
import Draft

doc = App.newDocument()

polygon = Draft.make_polygon(3, radius=500.0)

p1 = Draft.make_point(App.Vector(1500, 0, 0))
p2 = Draft.make_point(App.Vector(2500, 0, 0))
p3 = Draft.make_point(App.Vector(2000, 1000, 0))

compound = doc.addObject("Part::Compound", "Compound")
compound.Links = [p1, p2, p3]

point_array = Draft.make_point_array(polygon, compound)
doc.recompute()