|Draft → PointArray|
|Draft Array, Draft PathArray|
Thetool places copies of a selected shape along various selected points.
The PointArray tool can be used on any object that has a Part TopoShape, meaning 2D shapes created with the Draft Workbench, but also 3D solids created with other workbenches, for example, Part, PartDesign, or Arch.
- To create orthogonal, polar or circular arrays, use the corresponding , , or tools.
- To position App Link copies at specified points use .
- To position copies along a path use or .
- To create copies and manually place them use or .
- To create exact copies and manually place or scale them, use or .
Object arranged at specific points
- Select the object that you wish to distribute.
- Select a point compound.
- Press the button.
Each element in the array is an exact clone of the original object, but the entire array is considered a single unit in terms of properties and appearance.
The point compound object can be created in different ways.
- Create various or , and then press to create the compound.
- Repeat the previous method but instead of a compound use to create a "Block".
- Create a , and inside add various .
In essence, the object to be used as the compound must have one of three properties, DataComponents, DataLinks, or DataGeometry, and inside that compound, there must be at least one point with DataX, DataY, and DataZ properties.
Note: in the case of DataPlacement of the point. In the case of a , the position will be taken from its internal
Note 2: for DataPlacement always follows the values of DataX, DataY, DataZ, so modifying these values is enough to produce the desired displacement. However, for , the net displacement is given by the sum of DataPlacement with the vector with components DataX, DataY, and DataZ.its
There are no options for this tool. Either it works with the selected objects or not.
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.
- DataBase (
Link): the object to duplicate; it must have a Part TopoShape.
- DataCount (
Integer): (read-only) specifies the number of copies in the array. This property is read-only because the number of copies is determined by the number of points inside of DataPoint Object.
- DataExtra Placement (
Placement): specifies an additional placement, translation and rotation, that will be applied to each copy in the array. Each copy normally appears with the same rotation as the DataBase object; with this property it is possible to provide additional rotation, or counter the original rotation, and make small adjustments to the position of the copies. introduced in version 0.19
- DataPoint Object (
Link): specifies a compound object with points that indicate where the copies of the DataBase object will appear. The compound object needs to have one of DataLinks, DataComponents, or DataGeometry properties, and contain at least one element with DataX, DataY, and DataZ attributes.
point_array = makePointArray(base_object, point_object)
point_array = make_point_array(base_object, point_object, extra=None):
- Creates a
"PointArray"object from the
base_object, by placing the copies in the points contained within
point_objectshould have one of
Componentsattributes containing points.
- Instead of a reference to an object,
point_objectcan also be
Labels(strings) of objects existing in the current document.
extracan be a full
App.Placement, or just an
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()