Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units aren't changing with cmd+k #5155

Open
jgomez720 opened this issue Jan 27, 2025 · 1 comment
Open

Units aren't changing with cmd+k #5155

jgomez720 opened this issue Jan 27, 2025 · 1 comment
Assignees
Labels
bug Something isn't working high-priority

Comments

@jgomez720
Copy link
Collaborator

Description

This is either a bug for project.toml or the front end is not displaying the correct units. When using cmd+k to switch units, nothing happens.

Version

0.37.0

Recording

Screenshare.-.2025-01-27.10_16_54.AM.mp4

KCL

// Generated by Text-to-CAD: design a rectangular plate that is 200mm x 100 mm and put a 50 mm diameter hole in the center. Fillet the corners by 12.5 mm. place four mounting holes that are 20mm near the corners

// Define constants
plateLength = 250  // Updated plate length
plateWidth = 100
plateThickness = 5
centerHoleDiameter = 50
cornerFilletRadius = 12.5
mountingHoleDiameter = 5
mountingHoleOffset = 20

// Create a function that defines the body width and length of the plate. Tag the corners so they can be passed through the fillet function.
fn rectShape(pos, w, l) {
  rr = startSketchOn('XY')
    |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %)
    |> lineTo([pos[0] + w / 2, pos[1] - (l / 2)], %, $edge1)
    |> lineTo([pos[0] + w / 2, pos[1] + l / 2], %, $edge2)
    |> lineTo([pos[0] - (w / 2), pos[1] + l / 2], %, $edge3)
    |> close(%, $edge4)
  return rr
}

// Create the plate extrusion, center hole, and fillets
rs = rectShape([0, 0], plateWidth, plateLength)
plate = rs
  |> hole(circle({
       center = [0, 0],
       radius = centerHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [
         -plateWidth / 2 + mountingHoleOffset,
         plateLength / 2 - mountingHoleOffset
       ],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [
         plateWidth / 2 - mountingHoleOffset,
         plateLength / 2 - mountingHoleOffset
       ],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [
         -plateWidth / 2 + mountingHoleOffset,
         -plateLength / 2 + mountingHoleOffset
       ],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [
         plateWidth / 2 - mountingHoleOffset,
         -plateLength / 2 + mountingHoleOffset
       ],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> extrude(plateThickness, %)
  |> fillet({
       radius = cornerFilletRadius,
       tags = [
         getPreviousAdjacentEdge(rs.tags.edge1),
         getPreviousAdjacentEdge(rs.tags.edge2),
         getPreviousAdjacentEdge(rs.tags.edge3),
         getPreviousAdjacentEdge(rs.tags.edge4)
       ]
     }, %)
@jgomez720 jgomez720 added bug Something isn't working high-priority labels Jan 27, 2025
@jgomez720
Copy link
Collaborator Author

@franknoirot reassign as needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

No branches or pull requests

3 participants