Draft: PathArray
poziția meniului |
---|
Draft → PathArray |
Workbenches |
Draft, Arch |
scurtătură |
nici unul |
Prezentat în versiune |
- |
A se vedea, de asemenea, |
Draft Array |
Descriere
Instrumentul PathArray plasează copii ale unei forme selectate de-a lungul unei căi selectate. Calea poate fi un Filament sau una sau mai multe muchii. Formele pot fi opțional aliniate cu tangenta traiectoriei. Dacă este necesar, poate fi specificat un Vector de tranlație pentru a deplasa formele astfel încât centroidul să fie pe traiectorie. Dacă nu sunt selectate obiecte, veți fi invitat să le selectați.
The PathArray 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 along a path use
PathLinkArray.
- To position copies at specified points use
PointArray or
PointLinkArray.
- 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 along a path
Cum se folosește
- Creați un obiect tip formă pe care doriți să îl distribuiți/multiplicați. Veți obține cele mai bune rezultate dacă obiectul dvs. este centrat în jurul originii, chiar dacă calea începe în altă parte.
- Selectați un obiect tip traiectorie de-a lungul căruia vor fi distribuite formele. -sau-
- Selectați unele margini ale unui obiect traiectorie.
- Apasați pe butonul
Draft PathArray.
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.
Note: if the DataBase object doesn't seem to be positioned correctly in the path, check that its DataPlacement is in the origin (0,0,0)
. Certain objects can be placed anywhere in the 3D space when used with the PathArray tool, but others must be at the origin, particularly those created by using
Part Extrude with a 2D profile like a
Sketch.
Opţiuni
- Matricea de repetabilitate începe cu copii ale formelor care nu sunt aliniate la cale, nici traduse la o nouă poziție în mod implicit. Apoi puteți schimba vectorul numărătoare, aliniere și/sau traducere în proprietăți.
Proprietăți
A PathArray is derived from a Part Feature (Part::Feature
class), therefore it shares all the latter's properties. In addition to the properties described in Part Feature, the PathArray has the following properties in the property editor.
- DataBase: Obiectul tip formă
- DataPathObj: Obeictul tip traiectorie
- DataPathSubs: Sub-elementele(edges) obeictului tip traiectorie car va fi utilizat
- DataCount: Numărul de ori de repetarea a formei
- DataXlate: Vectorul de translație
- DataAlign: Este adevărat să aliniați formele la traiectorie, False pentru a lăsa forme în orientarea lor implicită.
Objects
- DataBase (
LinkGlobal
): specifies the object to duplicate in the path. - DataCount (
Integer
): specifies the number of copies to create in the path. - DataPath Object (
LinkGlobal
): specifies the object along which the copies will be distributed. It must contain'Edges'
in its Part TopoShape; for example, it could be aWire or
BSpline.
- DataPath Subelements (
LinkSubListGlobal
): specifies the sub-elements (edges) of the DataPath Object on which the copies will be created. The copies will be created only on these edges. If this property is empty, the copies will be distributed on the entire DataPath Object.
Scrip-Programare
Instrumentul PathArray poate fi utilizat în macros și de la consola Python utilizând umătoarea funcție:
Older call
path_array = makePathArray(base_object, path_object, count, xlate=None, align=False, pathobjsubs=[])
New call
path_array = make_path_array(base_object, path_object,
count=4, extra=App.Vector(0, 0, 0), subelements=None,
align=False, align_mode="Original", tan_vector=App.Vector(1, 0, 0),
force_vertical=False, vertical_vector=App.Vector(0, 0, 1),
use_link=True):
- Plasează un numpr de copii ale unui obiect tip formă al documentului de-a lungul unui obiect tip traiectorie sau sub-obiecte ale unui path-object. Opțional translatează fiecare copie prin FreeCAD.Vector xlate pe direcția și la distanța pentru a ajusta pentru diferența de formă centru vs punct de referință. Opțional, aliniază elementul de bază la calea tangentă/normală/binormală.
Exempluː
import FreeCAD as App
import Draft
doc = App.newDocument()
p1 = App.Vector(500, -1000, 0)
p2 = App.Vector(1500, 1000, 0)
p3 = App.Vector(3000, 500, 0)
p4 = App.Vector(4500, 100, 0)
spline = Draft.make_bspline([p1, p2, p3, p4])
obj = Draft.make_polygon(3, 500)
path_array = Draft.make_path_array(obj, spline, 6)
doc.recompute()
wire = Draft.make_wire([p1, -p2, -p3, -p4])
path_array2 = Draft.make_path_array(obj, wire, count=3, extra=App.Vector(0, -500, 0), subelements=["Edge2", "Edge3"], align=True, force_vertical=True)
doc.recompute()
Object arranged along a closed path in the original orientation
Când "Align = true" logica este puțin mai dificil de înțeles:
- Construiți sistemele de coordonate Frenet pe cale (X este tangent, Z este normal, Y este binormal).
- Copiați obiectul original la fiecare sistem de coordonate pe traseu, astfel încât originea globală să corespundă originii sistemului de coordonate pe traseu.
Object arranged along a closed path; description of components and path
Este mult mai ușor de înțeles cu imagini. Următoarele imagini arată modul în care este produsă matricea de repetatibilitate, în funcție de planul în care se află traiectoria.
Object arranged along a closed path which is aligned to the XY plane
Path on XZ Plane:
Object arranged along a closed path which is aligned to the XZ plane
Path on YZ Plane:
Object arranged along a closed path which is aligned to the YZ plane
Avantajul clar al acestei logici este că, pe măsură ce reorientezi traiectoria, dar nu obiectul, rezultatul este consecvent - obiectul rămâne aliniat la cale așa cum a fost înainte de reorientarea traiectoriei.
(Thanks to @DeepSOIC for this explanation)
Additional alignment modes and options introduced in v0.19
Original mode (the default) is the historic alignment mode as in version 0.18. It is not really the Frenet alignment. Original mode uses the normal parameter from Draft.getNormal (or the default) as a constant - it does not calculate curve normal. X follows the curve tangent, Y is the normal parameter, Z is X.Cross(Y).
Tangent mode is similar to Original, but includes a rotation to align the Base object's X to the TangentVector before placing copies. After the rotation, Tangent behaves the same as Original. In previous versions this rotation would be performed manually before invoking PathArray.
Frenet mode orients the copies to a coordinate system along the path. X is tangent to curve, Y is curve normal, Z is curve binormal. If a normal can not be computed (ex a straight line), the default is used.
The ForceVertical option applies to Original and Tangent modes. When this option is applied, the normal parameter from Draft.getNormal is ignored. X follows the curve tangent, Z is the VerticalVector property and Y is X.Cross(Z).
Version 18 cycle chain - Original mode
Railway cross ties (sleepers) - Tangent mode + ForceVertical
Frenet Mode
- Basics: Coordinates, Constraining, Snapping (Near, Extension, Parallel, Grid, Endpoint, Midpoint, Perpendicular, Angle, Center, Ortho, Intersection, Special, Dimensions, Working plane)
- Drawing: Line, Wire, Circle, Arc, Ellipse, Polygon, Rectangle, Text, Dimension, BSpline, Point, ShapeString, Facebinder, Bezier Curve, Label
- Modifying: Move, Rotate, Offset, Trimex, Upgrade, Downgrade, Scale, Edit, Wire to BSpline, Add point, Delete point, Shape 2D View, Draft to Sketch, Array, Path Array, 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: Windows, Linux, Mac; Getting started
- Basics: About FreeCAD, Workbenches, Preferences, Document structure, Interface Customization, Properties, Mouse Model; Tutorials
- Workbenches: 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