The Draft 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.
Object arranged at specific points
- Select an object that you wish to distribute.
- Select a point compound.
- Press the Draft PointArray button.
To create a point compound select various Draft Points and then press the Draft Upgrade 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.
There are no options for this tool. Either it works with the selected objects or not.
- DataBase: the object to duplicate.
- DataCount: (read-only) specifies the number of copies of the base object. This number will depend on the number of Draft Points in the compound.
- DataPointList: specifies a compound object with point objects that indicate where the copies of the DataBase object will appear.
The compound object needs to have a DataLinks, DataComponets, or DataGeometry attribute. Each of the objects inside the compound should be Draft Points that have DataX, DataY, and DataZ attributes.
The compounds could be created with Part Compound (DataLinks attribute) or with Draft Upgrade (DataComponets attribute).
See also: Draft API and FreeCAD Scripting Basics.
The PointArray tool can be used in macros and from the Python console by using the following function:
PointArray = makePointArray(base, ptlst)
- Creates a
PointArray object from the
base object, by placing the copies along
ptlst is an object with
Components attributes that define the position of the copies.
import FreeCAD, Draft
Polygon = 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))
# Create a compound of points
addList, deleteList = Draft.upgrade([p1, p2, p3])
# Extract the compound from the list
compound = addList
PointArray = Draft.makePointArray(Polygon, compound)
- Basics: Coordinates, Constraining, Snapping (Near, Extension, Parallel, Grid, Endpoint, Midpoint, Perpendicular, Angle, Center, Ortho, Intersection, Special, Dimensions, Working plane)
- Drawing: Line, Polyline, Fillet, Circle, Arc, Arc 3 points, Ellipse, Polygon, Rectangle, Text, Dimension, BSpline, Point, ShapeString, Facebinder, Cubic Bezier Curve, Bezier Curve, Label
- Modifying: Move, Rotate, Offset, Trimex, Join, Split, Upgrade, Downgrade, Scale, Edit, SubelementHighlight, Wire to BSpline, Add point, Delete point, Shape 2D View, Draft to Sketch, Array, LinkArray, Polar Array, Circular Array, Path Array, Path LinkArray, Point Array, Clone, Drawing, Mirror, Stretch
- Utilities: Set working plane, Finish line, Close line, Undo line, Toggle construction mode, Toggle continue mode, Apply style, Toggle display mode, Add to group, Select group contents, Toggle snap, Toggle grid, Show snap bar, Heal, Flip Dimension, VisGroup, Slope, AutoGroup, Set Working Plane Proxy, Add to Construction group
- Additional: Preferences, Import-Export Preferences (DXF/DWG, SVG, OCA, DAT); Draft API
- Installation: Linux/Unix, Windows, Mac, Docker, AppImage; Getting started
- Basics: About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials, Video tutorials
- Workbenches: Std Base; Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Plot, Points, Raytracing, Reverse Engineering, Robot, Ship, Sketcher, Spreadsheet, Start, Surface workbench, TechDraw, Test Framework, Web
- Scripting: Introduction to Python, FreeCAD scripting tutorial, FreeCAD Scripting Basics, How to install macros, Gui Command, Units Modules: Builtin modules, Workbench creation, Installing more workbenches Meshes: Mesh Scripting, Mesh Module Parts: The Part Module, Topological data scripting, PythonOCC, Mesh to Part Coin scenegraph: The Coin/Inventor scenegraph, Pivy Qt interface: PySide, Using the FreeCAD GUI, Dialog creation Parametric objects: Scripted objects Other: Code snippets, Line drawing function, Embedding FreeCAD, FreeCAD vector math library, Power users hub, Python, Macros, FreeCAD Scripting Basics, Topological data scripting