Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Python - Rotate Imported CAD Geometry Around Selected Reference Frame

#1
Hi All,

I am wondering whether it is possible to apply translations and rotations to an object (in my case an imported .stl file) w.r.t. a user defined reference frame?

Thanks,
Tim
#2
嗨,蒂姆,

Yes, you can use setPose to set the position with respect to the parent reference the object is attached to. Example:

Code:
RDK = Robolink()
part = RDK.Addfile("path to your 3D object.stl")
part.setParent(reference) # place the object relative to a reference
part.setPose(transl(100,200,300)*rotz(pi/2)) # set the pose with respect to the reference

You can also use setPoseAbs() to set the abolute pose (with respect to the absolute station reference).

Albert




Users browsing this thread:
1 Guest(s)