Draft PointArray/it: Difference between revisions

From FreeCAD Documentation
(Created page with "==Descrizione==")
(Created page with "Lo strumento PointArray posiziona le copie di una forma selezionata lungo vari punti selezionati.")
Line 12: Line 12:
==Descrizione==
==Descrizione==


The PointArray tool places copies of a selected shape along various selected points.
Lo strumento PointArray posiziona le copie di una forma selezionata lungo vari punti selezionati.


[[Image:Draft_PointArray_Example.png|400px]]
[[Image:Draft_PointArray_Example.png|400px]]

Revision as of 19:20, 12 December 2018

Draft PointArray

Posizione nel menu
Draft → PointArray
Ambiente
Draft, Arch
Avvio veloce
Nessuno
Introdotto nella versione
0.18
Vedere anche
Array, PathArray

Descrizione

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

How to use

  1. Create a shape object you wish to distribute. You will get the best results if your object is centred around the origin, that is, if its Datiposition is [0, 0, 0].
  2. Place points using Draft Point.
  3. Select the points and create a compound of them using Draft Upgrade.
  4. First select your shape, then the new point compound, and then press the Draft PointArray button.

Options

  • The array starts with shape copies which are not aligned to the path, nor translated to a new position by default. You can then change the alignment and/or translation vector in the properties.

Properties

  • DatiBase: The shape object
  • DatiCount: The number of times to copy the shape (read only)
  • DatiPointList: a compound of points

Scripting

The PointArray tool can be used in macros and from the Python console by using the following function:

makePointArray(base, ptlst)
  • base is the shape to copy, and ptlst is an object with Geometry, Links, or Components that define the position of the copies.

Example:

import FreeCAD, Draft

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

upg = Draft.upgrade([p1, p2, p3], delete=True)
compound = upg[0][0]  # Extract the compound from the list

array = Draft.makePointArray(poly, compound)

Usage Notes

  • in progress