Draft PointArray: Difference between revisions

From FreeCAD Documentation
(How to use)
(More tools used in creating arrays)
Line 15: Line 15:
<!--T:3-->
<!--T:3-->
The PointArray tool places copies of a selected shape along various selected points.
The PointArray tool places copies of a selected shape along various selected points.
</translate>


The PointArray tool can be used on 2D shapes created with the Draft Workbench, but can also be used on many types of 3D objects such as those created with the [[Part Workbench|Part]], [[PartDesign Workbench|PartDesign]], or [[Arch Workbench]]es.

To position copies in an orthogonal array use [[Draft Array]]; to position copies along a path use [[Draft PathArray]]; to create copies or clones, and manually place them use [[Draft Move]], [[Draft Rotate]], and [[Draft Clone]].

</translate>
[[Image:Draft_PointArray_Example.png|400px]]
[[Image:Draft_PointArray_Example.png|400px]]
<translate>
<translate>

Revision as of 23:36, 15 November 2018

Draft PointArray

Menu location
Draft → PointArray
Workbenches
Draft, Arch
Default shortcut
None
Introduced in version
0.18
See also
Draft Array, Draft PathArray

Description

The PointArray tool places copies of a selected shape along various selected points.

The PointArray tool can be used on 2D shapes created with the Draft Workbench, but can also be used on many types of 3D objects such as those created with the Part, PartDesign, or Arch Workbenches.

To position copies in an orthogonal array use Draft Array; to position copies along a path use Draft PathArray; to create copies or clones, and manually place them use Draft Move, Draft Rotate, and Draft Clone.

How to use

  1. Select an object which you wish to distribute.
  2. Select a point compound.
  3. Press the Draft PointArray button.

To create a point compound select various Draft Points and then press Draft Upgrade.

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

  • DataBase: The shape object
  • DataCount: The number of times to copy the shape (read only)
  • DataPointList: 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