Draft PointArray/tr: Difference between revisions
(Updating to match new version of source page) |
(Updating to match new version of source page) |
||
(16 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
{{docnav|[[Draft_PathArray|Path Array]]|[[Draft_Clone|Clone]]|[[Draft_Module|Draft_Module]]}} |
|||
{{Docnav |
|||
|[[Draft_PathLinkArray|PathLinkArray]] |
|||
|[[Draft_PointLinkArray|PointLinkArray]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL=Draft_PathLinkArray.svg |
|||
|IconR=Draft_PointLinkArray.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
|||
<div class="mw-translate-fuzzy"> |
|||
{{GuiCommand/tr |
{{GuiCommand/tr |
||
|Name=Draft PointArray |
|Name=Draft PointArray |
||
|Name/tr=Nokta dizisi |
|Name/tr=Nokta dizisi |
||
|Icon=Draft_PointArray.svg |
|Icon=Draft_PointArray.svg |
||
|Workbenches=[[Draft Module/tr|Draft]], [[Arch Module/tr|Arch]] |
|||
|MenuLocation=Draft → PointArray |
|MenuLocation=Draft → PointArray |
||
|Workbenches=[[Draft_Workbench/tr|Draft]], [[Arch_Workbench/tr|Arch]] |
|||
|Version=0.18 |
|Version=0.18 |
||
|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 == |
||
The [[Image:Draft_PointArray.svg|24px]] '''Draft PointArray''' command creates a regular array from a selected object by placing copies at the points from a [[#Point_compound|point compound]]. Use the [[Draft_PointLinkArray|Draft PointLinkArray]] command to create a more efficient [[App_Link|Link]] array instead. Except for the type of array that is created, Link array or regular array, the [[Draft_PointLinkArray|Draft PointLinkArray]] command is identical to this command. |
|||
The PointArray tool places copies of a selected shape along various selected points. |
|||
Both commands can be used on 2D objects created with the [[Draft_Workbench|Draft Workbench]] or [[Sketcher_Workbench|Sketcher Workbench]], but also on many 3D objects such as those created with the [[Part_Workbench|Part Workbench]], [[PartDesign_Workbench|PartDesign Workbench]] or [[Arch_Workbench|Arch Workbench]]. |
|||
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]]. |
|||
[[Image:Draft_PointArray_Example.png|400px]] |
[[Image:Draft_PointArray_Example.png|400px]] |
||
{{Caption| |
{{Caption|Draft PointArray}} |
||
== |
==Usage== |
||
# Select |
# Select the object you wish to array. |
||
# |
# Add the [[#Point_compound|point compound]] object to the selection. |
||
# There are several ways to invoke the command: |
|||
# Press the {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft PointArray]]}} button. |
|||
#* Press the {{Button|[[Image:Draft_PointArray.svg|16px]] [[Draft_PointArray|Draft PointArray]]}} button. |
|||
#* Select the {{MenuCommand|Modification → Array tools → [[Image:Draft_PointArray.svg|16px]] Point array}} option from the menu. |
|||
# The array is created. |
|||
# Optionally change the [[#Properties|properties]] of the array in the [[property_editor|Property editor]]. |
|||
==Point compound== |
|||
To create a point compound select various [[Draft Point]]s and then press the {{Button|[[Image:Draft Upgrade.svg|16px]] [[Draft Upgrade]]}} button. |
|||
A point compound is an object that contains one or more points. These are the supported point compounds and how they can be created: |
|||
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. |
|||
* [[Part_Compound|Part Compound]]: Create one or more [[Draft_Point|Draft Points]] or [[Part_Point|Part Points]], select them and invoke the [[Part_Compound|Part Compound]] command. |
|||
* Draft Block: Create one or more [[Draft_Point|Draft Points]] or [[Part_Point|Part Points]], select them and invoke the [[Draft_Upgrade|Draft Upgrade]] command. |
|||
* [[Sketcher_NewSketch|Sketcher Sketch]]: Create a [[Sketcher_NewSketch|Sketch]] and add one or more [[Sketcher_CreatePoint|Sketcher Points]] to the sketch. |
|||
== |
==Properties== |
||
See also: [[property_editor|Property editor]]. |
|||
There are no options for this tool. Either it works with the selected objects or not. |
|||
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: |
|||
==Properties== |
|||
===Data=== |
|||
{{TitleProperty|Link}} |
|||
The properties in this group are only available for Link arrays. See [[Std_LinkMake#Properties|Std LinkMake]] for more information. |
|||
* {{PropertyData|Scale|Float}} |
|||
* {{PropertyData|Scale Vector|Vector|Hidden}} |
|||
* {{PropertyData|Scale List|VectorList}} |
|||
* {{PropertyData|Visibility List|BoolList|Hidden}} |
|||
* {{PropertyData|Placement List|PlacementList|Hidden}} |
|||
* {{PropertyData|Element List|LinkList|Hidden}} |
|||
* {{PropertyData|_ Link Touched|Bool|Hidden}} |
|||
* {{PropertyData|_ Child Cache|LinkList|Hidden}} |
|||
* {{PropertyData|Colored Elements|LinkSubHidden|Hidden}} |
|||
* {{PropertyData|Link Transform|Bool}} |
|||
{{TitleProperty|Objects}} |
|||
* {{PropertyData|Base|Link}}: specifies the object to duplicate in the array. |
|||
* {{PropertyData|Count|Integer}}: (read-only) specifies the number of elements in the array. This number is determined by the number of points in the {{PropertyData|Point Object}}. |
|||
* {{PropertyData|Expand Array|Bool}}: specifies whether to expand the array in the [[Tree_view|Tree view]] to enable the selection of its individual elements. Only available for Link arrays. |
|||
* {{PropertyData|Extra Placement|Placement}}: : specifies an additional [[Placement|placement]], translation and rotation, for each element in the array. {{Version|0.19}} |
|||
* {{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=== |
|||
{{TitleProperty|Link}} |
|||
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. |
|||
* {{PropertyView|Draw Style|Enumeration}} |
|||
* {{PropertyView|Line Width|FloatConstraint}} |
|||
* {{PropertyView|Override Material|Bool}} |
|||
* {{PropertyView|Point Size|FloatConstraint}} |
|||
* {{PropertyView|Selectable|Bool}}: this is an inherited property that appears in the Selection group for other arrays |
|||
* {{PropertyView|Shape Material|Material}} |
|||
{{TitleProperty|Base}} |
|||
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. |
|||
* {{PropertyView|Child View Provider|PersistentObject|Hidden}} |
|||
* {{PropertyView|Material List|MaterialList|Hidden}} |
|||
* {{PropertyView|Override Color List|ColorList|Hidden}} |
|||
* {{PropertyView|Override Material List|BoolList|Hidden}} |
|||
* {{PropertyView|Proxy|PythonObject|Hidden}}: this is an inherited property. |
|||
{{TitleProperty|Display Options}} |
|||
The properties in this group are inherited properties. See [[Part_Feature#Properties|Part Feature]] for more information. |
|||
* {{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|Show In Tree|Bool}} |
|||
* {{PropertyView|Visibility|Bool}} |
|||
{{TitleProperty|Draft}} |
|||
* {{PropertyView|Pattern|Enumeration}}: not used. |
|||
* {{PropertyView|Pattern Size|Float}}: not used. |
|||
{{TitleProperty|Object style}} |
|||
The properties in this group are not inherited by Link arrays. |
|||
* {{PropertyData|Base}}: specifies 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|PointList}}: specifies the compound object with the points needed to place the copies of the base object. |
|||
==Scripting== |
==Scripting== |
||
{{Emphasis|See also:}} [[Draft API]] and [[FreeCAD Scripting Basics]]. |
|||
See also: [https://freecad.github.io/SourceDoc/ Autogenerated API documentation] 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: |
|||
To create a point array use the {{incode|make_point_array}} method ({{Version|0.19}}) of the Draft module. This method replaces the deprecated {{incode|makePointArray}} method. |
|||
{{Code|code= |
{{Code|code= |
||
point_array = make_point_array(base_object, point_object, extra=None, use_link=True) |
|||
PointArray = makePointArray(base, ptlst) |
|||
}} |
}} |
||
* |
* {{incode|base_object}} is the object to be arrayed. It can also be the {{incode|Label}} (string) of an object in the current document. |
||
* {{incode| |
* {{incode|point_object}} is the object containing the points. It can also be the {{incode|Label}} (string) of an object in the current document. It should have a {{incode|Geometry}}, {{incode|Links}}, or {{incode|Components}} property containing points. |
||
* {{incode|extra}} is an {{incode|App.Placement}}, an {{incode|App.Vector}} or an {{incode|App.Rotation}} that displaces each element. |
|||
* If {{incode|use_link}} is {{incode|True}} the created elements are [[App_Link|App Links]] instead of regular copies. |
|||
Example: |
|||
Example: |
|||
{{Code|code= |
{{Code|code= |
||
import FreeCAD |
import FreeCAD as App |
||
import Draft |
|||
doc = App.newDocument() |
|||
Polygon = Draft.makePolygon(3, radius=500.0) |
|||
polygon = Draft.make_polygon(3, radius=500.0) |
|||
p2 = Draft.makePoint(FreeCAD.Vector(2500, 0, 0)) |
|||
p3 = Draft.makePoint(FreeCAD.Vector(2000, 1000, 0)) |
|||
p1 = Draft.make_point(App.Vector(1500, 0, 0)) |
|||
# Create a compound of points |
|||
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() |
|||
}} |
|||
# Extract the compound from the list |
|||
compound = addList[0] |
|||
{{Docnav |
|||
PointArray = Draft.makePointArray(Polygon, compound) |
|||
|[[Draft_PathLinkArray|PathLinkArray]] |
|||
|[[Draft_PointLinkArray|PointLinkArray]] |
|||
|[[Draft_Workbench|Draft]] |
|||
|IconL=Draft_PathLinkArray.svg |
|||
|IconR=Draft_PointLinkArray.svg |
|||
|IconC=Workbench_Draft.svg |
|||
}} |
}} |
||
{{Draft Tools navi{{#translation:}}}} |
|||
{{docnav|[[Draft_PathArray|Path Array]]|[[Draft_Clone|Clone]]|[[Draft_Module|Draft_Module]]}} |
|||
{{Userdocnavi{{#translation:}}}} |
|||
{{Draft Tools navi}} |
|||
{{Userdocnavi}} |
|||
{{clear}} |
Revision as of 12:37, 17 September 2021
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 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
- Select the object you wish to array.
- Add the point compound object to the selection.
- There are several ways to invoke the command:
- Press the Draft PointArray button.
- Select the Modification → Array tools → Point array option from the menu.
- The array is created.
- 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:
- Part Compound: Create one or more Draft Points or Part Points, select them and invoke the Part Compound command.
- Draft Block: Create one or more Draft Points or Part Points, select them and invoke the Draft Upgrade command.
- Sketcher Sketch: Create a Sketch and add one or more Sketcher Points to the sketch.
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.
- VeriScale (
Float
) - Veri (Hidden)Scale Vector (
Vector
) - VeriScale List (
VectorList
) - Veri (Hidden)Visibility List (
BoolList
) - Veri (Hidden)Placement List (
PlacementList
) - Veri (Hidden)Element List (
LinkList
) - Veri (Hidden)_ Link Touched (
Bool
) - Veri (Hidden)_ Child Cache (
LinkList
) - Veri (Hidden)Colored Elements (
LinkSubHidden
) - VeriLink Transform (
Bool
)
Objects
- VeriBase (
Link
): specifies the object to duplicate in the array. - VeriCount (
Integer
): (read-only) specifies the number of elements in the array. This number is determined by the number of points in the VeriPoint Object. - VeriExpand 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. - VeriExtra Placement (
Placement
): : specifies an additional placement, translation and rotation, for each element in the array. introduced in version 0.19 - VeriPoint Object (
Link
): specifies the compound object whose points are used to position the elements in the array. The object must have a VeriLinks, VeriComponents or VeriGeometry property, and contain at least one element with VeriX, VeriY, and VeriZ 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.
- GörünümDraw Style (
Enumeration
) - GörünümLine Width (
FloatConstraint
) - GörünümOverride Material (
Bool
) - GörünümPoint Size (
FloatConstraint
) - GörünümSelectable (
Bool
): this is an inherited property that appears in the Selection group for other arrays - GörünümShape 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.
- Görünüm (Hidden)Child View Provider (
PersistentObject
) - Görünüm (Hidden)Material List (
MaterialList
) - Görünüm (Hidden)Override Color List (
ColorList
) - Görünüm (Hidden)Override Material List (
BoolList
) - Görünüm (Hidden)Proxy (
PythonObject
): this is an inherited property.
Display Options
The properties in this group are inherited properties. See Part Feature for more information.
- GörünümBounding Box (
Bool
): this property is not inherited by Link arrays. - GörünümDisplay Mode (
Enumeration
): for Link arrays it can beLink
orChildView
. For other arrays it can be:Flat Lines
,Shaded
,Wireframe
orPoints
- GörünümShow In Tree (
Bool
) - GörünümVisibility (
Bool
)
Draft
- GörünümPattern (
Enumeration
): not used. - GörünümPattern 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, Start, Surface, TechDraw, Test Framework, Web
- Hubs: User hub, Power users hub, Developer hub