3
# ***************************************************************************
4
# * Copyright (c) 2013 WandererFan <wandererfan@gmail.com> *
6
# * This file is part of the FreeCAD CAx development system. *
8
# * This program is free software; you can redistribute it and/or modify *
9
# * it under the terms of the GNU Lesser General Public License (LGPL) *
10
# * as published by the Free Software Foundation; either version 2 of *
11
# * the License, or (at your option) any later version. *
12
# * for detail see the LICENCE text file. *
14
# * FreeCAD is distributed in the hope that it will be useful, *
15
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
16
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
17
# * GNU Library General Public License for more details. *
19
# * You should have received a copy of the GNU Library General Public *
20
# * License along with FreeCAD; if not, write to the Free Software *
21
# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
24
# ***************************************************************************/
26
# Tester for Draft makePathArray - shapes on a path - without subelements (see testPathArraySel.py)
27
# Usage: in FC gui, select a "shape" document object (sphere, box, etc) (!!select in
28
# tree, not document view!!), then a "wire" document object (Wire, Circle, Rectangle,
29
# DWire, etc) then run this macro.
36
print("testPathArray started")
38
centretrans = FreeCAD.Vector(0, 0, 0) # no translation
39
# centretrans = FreeCAD.Vector(-5,-5,0) # translation
40
orient = True # align to curve
41
# orient = False # don't align to curve
43
s = FreeCADGui.Selection.getSelection()
44
print("testPathArray: Objects in selection: ", len(s))
45
print("First object in selection is a: ", s[0].Shape.ShapeType)
46
print("Second object in selection is a: ", s[1].Shape.ShapeType)
51
# o = Draft.makePathArray(base,path,items) # test with defaults
52
o = Draft.makePathArray(base, path, items, centretrans, orient, pathsubs) # test with non-defaults
54
print("testPathArray ended")