[solved]Draft OrthoArray Tool

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
xianyu
Posts: 66
Joined: Mon Jun 27, 2022 7:34 am

[solved]Draft OrthoArray Tool

Post by xianyu »

Hi,
I'm improving a project. Now I have a lens formed by cutting a box from two planes. I use "App:: PropertyLinkList" to link three objects. When I array, I only get the parent object, but not the three child objects. What should I do? :roll:
https://wiki.freecadweb.org/Draft_Ortho ... tric_array

Code: Select all

#array(objectslist, xvector, yvector, zvector, xnum, ynum, znum)

Code: Select all

obj.addProperty('App::PropertyLinkList', 'Links', 'Lens', 'FreeCAD objects to be lenses').Links = [front_Surface, rear_Surface, edge_Surface]
#Picture 1
    def NonParametric_array(self, obj):
        Draft.array(obj,FreeCAD.Vector(obj.Height, 0, 0), 
                        FreeCAD.Vector(0, obj.Width, 0), 
                        FreeCAD.Vector(0, 0, 0),
                        3,3,1)
                        
#Picture 2
    def NonParametric_array(self, obj):
        objlist = [self.obj, self.front_Surface, self.rear_Surface, self.edge_Surface]
        Draft.array(objlist,FreeCAD.Vector(obj.Height, 0, 0), 
                        FreeCAD.Vector(0, obj.Width, 0), 
                        FreeCAD.Vector(0, 0, 0),
                        3,3,1)
1.png
1.png (24.99 KiB) Viewed 329 times
2.png
2.png (28.92 KiB) Viewed 329 times

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.29177 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: 68e337670e227889217652ddac593c93b5e8dc94
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.2
Freecad novice, A Python enthusiast
Post Reply