Draft: PathArray
Draft PathArray |
poziția meniului |
---|
Draft → PathArray |
Ateliere |
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 DateBase object doesn't seem to be positioned correctly in the path, check that its DatePlacement 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.
- DateBase: Obiectul tip formă
- DatePathObj: Obeictul tip traiectorie
- DatePathSubs: Sub-elementele(edges) obeictului tip traiectorie car va fi utilizat
- DateCount: Numărul de ori de repetarea a formei
- DateXlate: Vectorul de translație
- DateAlign: Este adevărat să aliniați formele la traiectorie, False pentru a lăsa forme în orientarea lor implicită.
Objects
- DateBase (
LinkGlobal
): specifies the object to duplicate in the path. - DateCount (
Integer
): specifies the number of copies to create in the path. - DatePath 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 a Wire or BSpline. - DatePath Subelements (
LinkSubListGlobal
): specifies the sub-elements (edges) of the DatePath 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 DatePath 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()
Explicație tehnică
Când "Align = false", logica PathArray este destul de ușor de înțeles.
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.
Path on XY Plane
Path on XZ Plane
Path on YZ Plane
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
- 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