Sketcher: New Features: Python copy and array commands

======================================================

Two new python commands (no UI yet).

Copy: Copies the geoids in a list by a displacement given by a Vector3d:

App.ActiveDocument.Sketch001.addCopy([0,1,2,3,4,5],App.Vector(150,150,0))

Array: Copies the geoids in a list cols times in the displacement vector
direction and rows times in the perpendicular to the displacement vector:

App.ActiveDocument.Sketch001.addArray([0,1,2,3,4,5], App.Vector(150,150,0),3,4)

N.B.: You need to recompute or solve to update the view

App.ActiveDocument.recompute()

or

App.ActiveDocument.Sketch001.solve()
This commit is contained in:
Abdullah Tahiri
2015-07-20 07:47:29 +02:00
committed by wmayer
parent 359e9a5d78
commit 3eb8f21116
4 changed files with 216 additions and 1 deletions

View File

@@ -136,7 +136,17 @@
<Documentation>
<UserDocu>add a symmetric geometric objects to the sketch with respect to a reference point or line</UserDocu>
</Documentation>
</Methode>
</Methode>
<Methode Name="addCopy">
<Documentation>
<UserDocu>add a copy of geometric objects to the sketch displaced by a vector3d</UserDocu>
</Documentation>
</Methode>
<Methode Name="addArray">
<Documentation>
<UserDocu>add an array of size cols by rows where each element is a copy of the selected geometric objects displaced by a vector3d in the cols direction and by a vector perpendicular to it in the rows direction</UserDocu>
</Documentation>
</Methode>
<Methode Name="ExposeInternalGeometry">
<Documentation>
<UserDocu>Exposes all internal geometry of an object supporting internal geometry</UserDocu>