Draft PointArray/tr: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{Docnav
{{Docnav|[[Draft_PathArray|Path Array]]|[[Draft_Clone|Clone]]|[[Draft_Module|Draft]]|IconL=Draft_PathArray.svg|IconC=Workbench_Draft.svg|IconR=Draft_Clone.svg}}
|[[Draft_PathArray|Path Array]]
|[[Draft_Clone|Clone]]
|[[Draft_Module|Draft]]
|IconL=Draft_PathArray.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Clone.svg
}}


<div class="mw-translate-fuzzy">
{{GuiCommand/tr
{{GuiCommand/tr
|Name=Draft PointArray
|Name=Draft PointArray
Line 11: Line 19:
|SeeAlso=[[Draft Array/tr|Draft Array]], [[Draft PathArray/tr|Draft PathArray]]
|SeeAlso=[[Draft Array/tr|Draft Array]], [[Draft PathArray/tr|Draft PathArray]]
}}
}}
</div>


== Tanım ==
== Tanım ==
Line 16: Line 25:
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.


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.
The PointArray tool can be used on 2D shapes created with the [[Draft Workbench|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|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]].
To position copies in an orthogonal array use [[Draft Array|Draft Array]]; to position copies along a path use [[Draft PathArray|Draft PathArray]]; to create copies or clones, and manually place them use [[Draft Move|Draft Move]], [[Draft Rotate|Draft Rotate]], and [[Draft Clone|Draft Clone]].


[[Image:Draft_PointArray_Example.png|400px]]
[[Image:Draft_PointArray_Example.png|400px]]
Line 27: Line 36:
# Select an object that you wish to distribute.
# Select an object that you wish to distribute.
# Select a point compound.
# Select a point compound.
# Press the {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft PointArray]]}} button.
# Press the {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft PointArray|Draft PointArray]]}} button.


To create a point compound select various [[Draft Point]]s and then press the {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade]]}} button.
To create a point compound select various [[Draft Point|Draft Point]]s and then press the {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade|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.
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.
Line 40: Line 49:


* {{PropertyData|Base}}: the object to duplicate.
* {{PropertyData|Base}}: the object to duplicate.
* {{PropertyData|Count}}: (read-only) specifies the number of copies of the base object. This number will depend on the number of [[Draft Point]]s in the compound.
* {{PropertyData|Count}}: (read-only) specifies the number of copies of the base object. This number will depend on the number of [[Draft Point|Draft Point]]s in the compound.
* {{PropertyData|PointList}}: specifies a compound object with point objects that indicate where the copies of the {{PropertyData|Base}} object will appear.
* {{PropertyData|PointList}}: specifies a compound object with point objects that indicate where the copies of the {{PropertyData|Base}} object will appear.
The compound object needs to have a {{PropertyData|Links}}, {{PropertyData|Componets}}, or {{PropertyData|Geometry}} attribute. Each of the objects inside the compound should be [[Draft Point|Draft Points]] that have {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}} attributes.
The compound object needs to have a {{PropertyData|Links}}, {{PropertyData|Componets}}, or {{PropertyData|Geometry}} attribute. Each of the objects inside the compound should be [[Draft Point|Draft Points]] that have {{PropertyData|X}}, {{PropertyData|Y}}, and {{PropertyData|Z}} attributes.
Line 46: Line 55:


==Scripting==
==Scripting==
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[Draft API|Draft API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


The PointArray tool can be used in [[macros]] and from the [[Python]] console by using the following function:
The PointArray tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
{{Code|code=
{{Code|code=
PointArray = makePointArray(base, ptlst)
PointArray = makePointArray(base, ptlst)
Line 75: Line 84:
}}
}}


{{Docnav
{{Docnav|[[Draft_PathArray|Path Array]]|[[Draft_Clone|Clone]]|[[Draft_Module|Draft]]|IconL=Draft_PathArray.svg|IconC=Workbench_Draft.svg|IconR=Draft_Clone.svg}}
|[[Draft_PathArray|Path Array]]
|[[Draft_Clone|Clone]]
|[[Draft_Module|Draft]]
|IconL=Draft_PathArray.svg
|IconC=Workbench_Draft.svg
|IconR=Draft_Clone.svg
}}


{{Draft Tools navi}}
{{Draft Tools navi}}

Revision as of 09:09, 25 October 2019

Nokta dizisi

Menü konumu
Draft → PointArray
Tezgahlar
Draft, Arch
Varsayılan kısayol
Hiçbiri
Versiyonda tanıtıldı
0.18
Ayrıca bkz
Draft Array, Draft PathArray

Tanım

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.

Object arranged at specific points

How to use

  1. Select an object that 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 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.

Options

There are no options for this tool. Either it works with the selected objects or not.

Properties

  • VeriBase: the object to duplicate.
  • VeriCount: (read-only) specifies the number of copies of the base object. This number will depend on the number of Draft Points in the compound.
  • VeriPointList: specifies a compound object with point objects that indicate where the copies of the VeriBase object will appear.

The compound object needs to have a VeriLinks, VeriComponets, or VeriGeometry attribute. Each of the objects inside the compound should be Draft Points that have VeriX, VeriY, and VeriZ attributes. The compounds could be created with Part MakeCompound (VeriLinks attribute) or with Draft Upgrade (VeriComponets attribute).

Scripting

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.
  • ptlst is an object with Geometry, Links, or Components attributes that define the position of the copies.

Example:

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[0]

PointArray = Draft.makePointArray(Polygon, compound)