View Single Post
  #10  
Old 09-11-2012, 11:49 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Thanks. The following code should translate the screw object along its local Y-axis:
Code:
screw = model.insertGroupBelow('Inst-1430')
screw.setPosition([0,0.1,0])
This works by inserting a node below the Inst-1430 node. If you had called getChild on the node, it would have inserted a transform above the node, which would then translate the node in the incorrect reference frame.

Make sure you only call insertGroupBelow once per sub-node, since each call will insert a new node.
Reply With Quote