Skip to content

cant fillet on close tag? #7279

Open
Open
@jessfraz

Description

@jessfraz
/* Generated by Text-to-CAD:
the controller for a nintendo switch */



@settings(defaultLengthUnit = mm)

// Define dimensions
controllerWidth = 50
controllerHeight = 173
controllerDepth = 14
buttonRadius = 5
joystickRadius = 10
joystickBaseHeight = 3
joystickHeight = 15
dpadSize = 20
dpadThickness = 2
buttonSpacing = 15

// Create the main body of the controller
controllerBody = startSketchOn(XY)
  |> startProfile(at = [
       -controllerWidth / 2,
       -controllerHeight / 2
     ])
  |> xLine(length = controllerWidth)
  |> yLine(length = controllerHeight)
  |> xLine(length = -controllerWidth)
  |> close()
  |> extrude(length = controllerDepth)

// Create the left joystick
leftJoystickBase = startSketchOn(controllerBody, face = END)
  |> circle(
       center = [
         -controllerWidth / 4,
         controllerHeight / 4
       ],
       radius = joystickRadius,
     )
  |> extrude(length = joystickBaseHeight)

leftJoystick = startSketchOn(leftJoystickBase, face = END)
  |> circle(
       center = [
         -controllerWidth / 4,
         controllerHeight / 4
       ],
       radius = joystickRadius - 2,
     )
  |> extrude(length = joystickHeight)

// Create the right joystick
rightJoystickBase = startSketchOn(controllerBody, face = END)
  |> circle(
       center = [
         controllerWidth / 4,
         controllerHeight / 4
       ],
       radius = joystickRadius,
     )
  |> extrude(length = joystickBaseHeight)

rightJoystick = startSketchOn(rightJoystickBase, face = END)
  |> circle(
       center = [
         controllerWidth / 4,
         controllerHeight / 4
       ],
       radius = joystickRadius - 2,
     )
  |> extrude(length = joystickHeight)

// Create the D-pad
sketch001 = startSketchOn(controllerBody, face = END)
dpad = startProfile(sketch001, at = [-3.15, -43.88])
  |> yLine(length = dpadSize / 2)
  |> xLine(length = dpadSize / 2)
  |> yLine(length = -dpadSize / 2)
  |> xLine(length = dpadSize / 2)
  |> yLine(length = -dpadSize / 2)
  |> xLine(length = -dpadSize / 2)
  |> yLine(length = -dpadSize / 2)
  |> xLine(length = -dpadSize / 2)
  |> yLine(length = dpadSize / 2)
  |> xLine(length = -dpadSize / 2)
  |> yLine(length = dpadSize / 2)
  |> close()

dpad
  |> extrude(length = dpadThickness)

// Create the buttons
buttonPositions = [
  [-buttonSpacing, -buttonSpacing],
  [buttonSpacing, -buttonSpacing],
  [-buttonSpacing, buttonSpacing],
  [buttonSpacing, buttonSpacing]
]

buttons = map(
  buttonPositions,
  f = fn(@pos) {
    return startSketchOn(controllerBody, face = END)
      |> circle(center = pos, radius = buttonRadius)
      |> extrude(length = buttonRadius)
  },
)


video here https://kittycadworkspace.slack.com/archives/C06L2RHP9SL/p1748540439197309?thread_ts=1748540073.400029&cid=C06L2RHP9SL

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions