|
Beskrivning |
---|
Ingen |
Författare |
Yorik |
Links |
Makron recept How to install macros How to customize toolbars |
Version |
1.0 |
Date last modification |
2011-08-01 |
Contents |
Detta makro plattar ut ritlinjer som inte är parallella (i Z-axeln) till deras median Z koordinat.
import FreeCAD obj = FreeCAD.ActiveDocument.ActiveObject z = 0 for p in obj.Points: z += p.z z = z/len(obj.Points) newpoints = [] for p in obj.Points: newppoints.append(FreeCAD.Vector(p.x,p.y,z)) obj.Points = newppoints