// Global constants for the multi-axis robot

// Set Units
@settings(defaultLengthUnit = in, kclVersion = 1.0)

// Axis Angles
export axisJ4 = 25deg
export axisJ3 = 60deg
export axisJ2 = 110deg
export axisJ1 = 80deg

// Robot Arm Base
export basePlateRadius = 5
export basePlateThickness = 0.5
export baseChamfer = 2
export baseHeight = 5

// J2 Axis for Robot Arm
export axisJ2ArmLength = 31
export axisJ2ArmWidth = 4
export axisJ2ArmThickness = 2.5

// J3 Axis for Robot Arm
export axisJ3C = axisJ3 - 180 + axisJ2
export axisJ3CArmLength = 20
export axisJ3CArmWidth = 3.75
export axisJ3CArmThickness = 2.5

// Planes
export plane001 = {
  origin = [0.0, 0.0, baseHeight - 1.5 + 0.1],
  xAxis = [1.0, 0.0, 0.0],
  yAxis = [0.0, 1.0, 0.0]
}

export plane002 = {
  origin = [0.0, 0.0, 0.0],
  xAxis = [
    sin(axisJ1): number(in),
    cos(axisJ1): number(in),
    0.0
  ],
  yAxis = [0.0, 0.0, 1.0]
}

// Define Plane to Move J2 Axis Robot Arm
export plane003 = {
  origin = [-0.1, 0.0, 0.0],
  xAxis = [
    sin(axisJ1): number(in),
    cos(axisJ1): number(in),
    0.0
  ],
  yAxis = [0.0, 0.0, 1.0]
}
