Draft PointArray: Difference between revisions

From FreeCAD Documentation
(Removed 'In progress')
(Marked this version for translation)
Line 46: Line 46:
# Optionally change the [[#Properties|properties]] of the array in the [[property_editor|Property editor]].
# Optionally change the [[#Properties|properties]] of the array in the [[property_editor|Property editor]].


==Point compound==
==Point compound== <!--T:33-->


<!--T:18-->
<!--T:18-->
Line 56: Line 56:
==Properties== <!--T:8-->
==Properties== <!--T:8-->


<!--T:34-->
See also: [[property_editor|Property editor]].
See also: [[property_editor|Property editor]].


Line 61: Line 62:
A Draft PointArray object is derived from a [[Part_Feature|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:
A Draft PointArray object is derived from a [[Part_Feature|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===
===Data=== <!--T:35-->


<!--T:36-->
{{TitleProperty|Link}}
{{TitleProperty|Link}}


<!--T:37-->
The properties in this group are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.
The properties in this group are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.


<!--T:38-->
* {{PropertyData|Scale|Float}}
* {{PropertyData|Scale|Float}}
* {{PropertyData|Scale Vector|Vector|Hidden}}
* {{PropertyData|Scale Vector|Vector|Hidden}}
Line 88: Line 92:
* {{PropertyData|Point Object|Link}}: specifies the compound object whose points are used to position the elements in the array. The object must have a {{PropertyData|Links}}, {{PropertyData|Components}} or {{PropertyData|Geometry}} property, and contain at least one element with {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}} properties.
* {{PropertyData|Point Object|Link}}: specifies the compound object whose points are used to position the elements in the array. The object must have a {{PropertyData|Links}}, {{PropertyData|Components}} or {{PropertyData|Geometry}} property, and contain at least one element with {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}} properties.


===View===
===View=== <!--T:39-->


<!--T:40-->
{{TitleProperty|Link}}
{{TitleProperty|Link}}


<!--T:41-->
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.


<!--T:42-->
* {{PropertyView|Draw Style|Enumeration}}
* {{PropertyView|Draw Style|Enumeration}}
* {{PropertyView|Line Width|FloatConstraint}}
* {{PropertyView|Line Width|FloatConstraint}}
Line 101: Line 108:
* {{PropertyView|Shape Material|Material}}
* {{PropertyView|Shape Material|Material}}


<!--T:43-->
{{TitleProperty|Base}}
{{TitleProperty|Base}}


<!--T:44-->
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.
The properties in this group, with the exception of the inherited property, are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information.


<!--T:45-->
* {{PropertyView|Child View Provider|PersistentObject|Hidden}}
* {{PropertyView|Child View Provider|PersistentObject|Hidden}}
* {{PropertyView|Material List|MaterialList|Hidden}}
* {{PropertyView|Material List|MaterialList|Hidden}}
Line 111: Line 121:
* {{PropertyView|Proxy|PythonObject|Hidden}}: this is an inherited property.
* {{PropertyView|Proxy|PythonObject|Hidden}}: this is an inherited property.


<!--T:46-->
{{TitleProperty|Display Options}}
{{TitleProperty|Display Options}}


<!--T:47-->
The properties in this group are inherited properties. See [[Part_Feature#Properties|Part Feature]] for more information.
The properties in this group are inherited properties. See [[Part_Feature#Properties|Part Feature]] for more information.


<!--T:48-->
* {{PropertyView|Bounding Box|Bool}}: this property is not inherited by Link arrays.
* {{PropertyView|Bounding Box|Bool}}: this property is not inherited by Link arrays.
* {{PropertyView|Display Mode|Enumeration}}: for Link arrays it can be {{value|Link}} or {{value|ChildView}}. For other arrays it can be: {{value|Flat Lines}}, {{value|Shaded}}, {{value|Wireframe}} or {{value|Points}}
* {{PropertyView|Display Mode|Enumeration}}: for Link arrays it can be {{value|Link}} or {{value|ChildView}}. For other arrays it can be: {{value|Flat Lines}}, {{value|Shaded}}, {{value|Wireframe}} or {{value|Points}}
Line 120: Line 133:
* {{PropertyView|Visibility|Bool}}
* {{PropertyView|Visibility|Bool}}


<!--T:49-->
{{TitleProperty|Draft}}
{{TitleProperty|Draft}}


<!--T:50-->
* {{PropertyView|Pattern|Enumeration}}: not used.
* {{PropertyView|Pattern|Enumeration}}: not used.
* {{PropertyView|Pattern Size|Float}}: not used.
* {{PropertyView|Pattern Size|Float}}: not used.


<!--T:51-->
{{TitleProperty|Object style}}
{{TitleProperty|Object style}}


<!--T:52-->
The properties in this group are not inherited by Link arrays.
The properties in this group are not inherited by Link arrays.



Revision as of 09:13, 16 June 2021

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

Description

The Draft PointArray command creates a regular array from a selected object by placing copies at the points from a point compound. Use the Draft PointLinkArray command to create a more efficient Link array instead. Except for the type of array that is created, Link array or regular array, the Draft PointLinkArray command is identical to this command.

Both commands can be used on 2D objects created with the Draft Workbench or Sketcher Workbench, but also on many 3D objects such as those created with the Part Workbench, PartDesign Workbench or Arch Workbench.

Draft PointArray

Usage

  1. Select the object you wish to array.
  2. Add the point compound object to the selection.
  3. There are several ways to invoke the command:
    • Press the Draft PointArray button.
    • Select the Modification → Array tools → Point array option from the menu.
  4. The array is created.
  5. Optionally change the properties of the array in the Property editor.

Point compound

A point compound is an object that contains one or more points. These are the supported point compounds and how they can be created:

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 be Link or ChildView. For other arrays it can be: Flat Lines, Shaded, Wireframe or Points
  • 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 the Label (string) of an object in the current document.
  • point_object is the object containing the points. It can also be the Label (string) of an object in the current document. It should have a Geometry, Links, or Components property containing points.
  • extra is an App.Placement, an App.Vector or an App.Rotation that displaces each element.
  • If use_link is True 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()