Translating an Object
Most of the times you will translate your Object in the builder by using location objects in a locations list. (See also: Rotating an Object)
| from build123d import *
from ocp_vscode import *
set_defaults(reset_camera=Camera.KEEP, black_edges=True,center_grid=True)
with BuildPart() as TestPart:
# Creates TWO locations in the Locations LIST
with Locations(Location((0,0,0)),Location((10,10,0))):
# Creates a cube at EACH Location in the Location LIST
Box(6,5,3)
show_all()
|
This can be written in short:
| from build123d import *
from ocp_vscode import *
set_defaults(reset_camera=Camera.KEEP, black_edges=True,center_grid=True)
with BuildPart() as TestPart:
# Creates TWO locations in the Locations LIST
with Locations((0,0,0),(10,10,0)):
# Creates a cube at EACH Location in the Location LIST
Box(6,5,3)
show_all()
|
Other ways to change postion is:
Pos(): Description needed
move: Description needed
offset: Description needed