Draft PointArray
Draft PointArray |
Menu location |
---|
Modification → Array tools → Point array |
Workbenches |
Draft, Arch |
Default shortcut |
None |
Introduced in version |
0.18 |
See also |
Draft OrthoArray, Draft PolarArray, Draft CircularArray, Draft PathArray, Draft PathLinkArray, Draft PointLinkArray, Draft Clone |
Description
The Draft PointArray tool 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 OrthoArray, PolarArray, or CircularArray tools.
- To position App Link copies at specified points use PointLinkArray.
- To position copies along a path use PathArray or PathLinkArray.
- To create copies and manually place them use Move or Rotate.
- To create exact copies and manually place or scale them, use Clone or Std LinkMake.
Object arranged at specific points
Usage
- Select the object that you wish to distribute.
- Select a point compound.
- Press the PointArray 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.
Point compound
The point compound object can be created in different ways.
- Create various Draft Points or Part Points, and then press Part Compound to create the compound.
- Repeat the previous method but instead of a compound use Draft Upgrade to create a "Block".
- Create a Sketch, and inside add various Sketcher Points.
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 Draft Point and Part Point the array will try to position the copies using the DataPlacement 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 DataPlacement always follows the values of DataX, DataY, DataZ, so modifying these values is enough to produce the desired displacement. However, for Part Point, the net displacement is given by the sum of DataPlacement with the vector with components DataX, DataY, and DataZ.
Properties
See also: Property editor.
A Draft PointArray object is derived from a Part Feature object and inherits all its properties (with the exception of some View properties that are not inherited by Link arrays). The following properties are additional unless otherwise stated:
Data
Link
The properties in this group are only available for Link arrays. See Std LinkMake for more information.
- DataScale (
Float
) - Data (Hidden)Scale Vector (
Vector
) - DataScale List (
VectorList
) - Data (Hidden)Visibility List (
BoolList
) - Data (Hidden)Placement List (
PlacementList
) - Data (Hidden)Element List (
LinkList
) - Data (Hidden)_ Link Touched (
Bool
) - Data (Hidden)_ Child Cache (
LinkList
) - Data (Hidden)Colored Elements (
LinkSubHidden
) - DataLink Transform (
Bool
)
Objects
- DataBase (
Link
): specifies the object to duplicate in the array. - DataCount (
Integer
): (read-only) specifies the number of elements in the array. This number is determined by the number of points in the DataPoint Object. - DataExpand Array (
Bool
): specifies whether to expand the array in the Tree view to enable the selection of its individual elements. Only available for Link arrays. - DataExtra Placement (
Placement
): : specifies an additional placement, translation and rotation, for each element in the array. introduced in version 0.19 - DataPoint Object (
Link
): specifies the compound object whose points are used to position the elements in the array. The object must have a DataLinks, DataComponents or DataGeometry property, and contain at least one element with DataX, DataY, and DataZ properties.
View
Link
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See Std LinkMake for more information.
- ViewDraw Style (
Enumeration
) - ViewLine Width (
FloatConstraint
) - ViewOverride Material (
Bool
) - ViewPoint Size (
FloatConstraint
) - ViewSelectable (
Bool
): this is an inherited property that appears in the Selection group for other arrays - ViewShape Material (
Material
)
Base
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See Std LinkMake for more information.
- View (Hidden)Child View Provider (
PersistentObject
) - View (Hidden)Material List (
MaterialList
) - View (Hidden)Override Color List (
ColorList
) - View (Hidden)Override Material List (
BoolList
) - View (Hidden)Proxy (
PythonObject
): this is an inherited property.
Display Options
The properties in this group are inherited properties. See Part Feature for more information.
- ViewBounding Box (
Bool
): this property is not inherited by Link arrays. - ViewDisplay Mode (
Enumeration
): for Link arrays it can beLink
orChildView
. For other arrays it can be:Flat Lines
,Shaded
,Wireframe
orPoints
- ViewShow In Tree (
Bool
) - ViewVisibility (
Bool
)
Draft
- ViewPattern (
Enumeration
): not used. - ViewPattern Size (
Float
): not used.
Object style
The properties in this group are not inherited by Link arrays.
Scripting
See also: Autogenerated API documentation and FreeCAD Scripting Basics.
To create a point array use the make_point_array
method (introduced in version 0.19) of the Draft module. This method replaces the deprecated makePointArray
method.
point_array = make_point_array(base_object, point_object, extra=None, use_link=True)
base_object
is the object to be arrayed. It can also be theLabel
(string) of an object in the current document.point_object
is the object containing the points. It can also be theLabel
(string) of an object in the current document. It should have aGeometry
,Links
, orComponents
property containing points.extra
is anApp.Placement
, anApp.Vector
or anApp.Rotation
that displaces each element.- If
use_link
isTrue
the created elements are App Links instead of regular copies.
Example:
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()
- Drafting: Line, Polyline, Fillet, Arc, Arc by 3 points, Circle, Ellipse, Rectangle, Polygon, B-spline, Cubic Bézier curve, Bézier curve, Point, Facebinder, ShapeString, Hatch
- Annotation: Text, Dimension, Label, Annotation styles, Annotation scale
- Modification: Move, Rotate, Scale, Mirror, Offset, Trimex, Stretch, Clone, Array, Polar array, Circular array, Path array, Path link array, Point array, Point link array, Edit, Subelement highlight, Join, Split, Upgrade, Downgrade, Wire to B-spline, Draft to sketch, Set slope, Flip dimension, Shape 2D view
- Draft Tray: Select plane, Set style, Toggle construction mode, AutoGroup
- Snapping: Snap lock, Snap endpoint, Snap midpoint, Snap center, Snap angle, Snap intersection, Snap perpendicular, Snap extension, Snap parallel, Snap special, Snap near, Snap ortho, Snap grid, Snap working plane, Snap dimensions, Toggle grid
- Miscellaneous: Apply current style, Layer, Manage layers, Add a new named group, Move to group, Select group, Add to construction group, Toggle normal/wireframe display, Create working plane proxy, Heal, Show snap toolbar
- Additional: Constraining, Pattern, Preferences, Import Export Preferences, DXF/DWG, SVG, OCA, DAT
- Context menu:
- Layer container: Merge layer duplicates, Add new layer
- Layer: Activate this layer, Select layer contents
- Text: Open hyperlinks
- Wire: Flatten
- Working plane proxy: Write camera position, Write objects state
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub