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

Update Onboarding Tutorial to be more robust to param changes #4827

Open
jgomez720 opened this issue Dec 17, 2024 · 0 comments
Open

Update Onboarding Tutorial to be more robust to param changes #4827

jgomez720 opened this issue Dec 17, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@jgomez720
Copy link
Collaborator

Description

From Vorpal in Discord:

So, I think the demo / tutorial model is a bit buggy, perhaps doesn't make the greatest impression. See the image. used the Alt key and dragged to move it back and forth. Think I was up at 14 and then back down to 5.

KCL

// Shelf Bracket
// This is a bracket that holds a shelf. It is made of aluminum and is designed to hold a force of 300 lbs. The bracket is 6 inches wide and the force is applied at the end of the shelf, 12 inches from the wall. The bracket has a factor of safety of 1.2. The legs of the bracket are 5 inches and 2 inches long. The thickness of the bracket is calculated from the constraints provided.


// Define constants
sigmaAllow = 35000 // psi (6061-T6 aluminum)
width = 6 // inch
p = 300 // Force on shelf - lbs
factorOfSafety = 1.2 // FOS of 1.2
shelfMountL = 5 // inches
wallMountL = 2 // inches
shelfDepth = 12 // Shelf is 12 inches in depth from the wall
moment = shelfDepth * p // assume the force is applied at the end of the shelf to be conservative (lb-in)


filletRadius = .375 // inches
extFilletRadius = .25 // inches
mountingHoleDiameter = 0.5 // inches


// Calculate required thickness of bracket
thickness = sqrt(moment * factorOfSafety * 6 / (sigmaAllow * width)) // this is the calculation of two brackets holding up the shelf (inches)


// Sketch the bracket body and fillet the inner and outer edges of the bend
bracketLeg1Sketch = startSketchOn('XY')
  |> startProfileAt([0, 0], %)
  |> line([shelfMountL - filletRadius, 0], %, $fillet1)
  |> line([0, width], %, $fillet2)
  |> line([-shelfMountL + filletRadius, 0], %)
  |> close(%)
  |> hole(circle({
       center = [1, 1],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [shelfMountL - 1.5, width - 1],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [1, width - 1],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [shelfMountL - 1.5, 1],
       radius = mountingHoleDiameter / 2
     }, %), %)

// Extrude the leg 2 bracket sketch
bracketLeg1Extrude = extrude(thickness, bracketLeg1Sketch)
  |> fillet({
       radius = extFilletRadius,
       tags = [
         getNextAdjacentEdge(fillet1),
         getNextAdjacentEdge(fillet2)
       ]
     }, %)

// Sketch the fillet arc
filletSketch = startSketchOn('XZ')
  |> startProfileAt([0, 0], %)
  |> line([0, thickness], %)
  |> arc({
       angleEnd = 180,
       angleStart = 90,
       radius = filletRadius + thickness
     }, %)
  |> line([thickness, 0], %)
  |> arc({
       angleEnd = 90,
       angleStart = 180,
       radius = filletRadius
     }, %)

// Sketch the bend
filletExtrude = extrude(-width, filletSketch)

// Create a custom plane for the leg that sits on the wall
customPlane = {
  plane = {
    origin = { x = -filletRadius, y = 0, z = 0 },
    xAxis = { x = 0, y = 1, z = 0 },
    yAxis = { x = 0, y = 0, z = 1 },
    zAxis = { x = 1, y = 0, z = 0 }
  }
}

// Create a sketch for the second leg
bracketLeg2Sketch = startSketchOn(customPlane)
  |> startProfileAt([0, -filletRadius], %)
  |> line([width, 0], %)
  |> line([0, -wallMountL], %, $fillet3)
  |> line([-width, 0], %, $fillet4)
  |> close(%)
  |> hole(circle({
       center = [1, -1.5],
       radius = mountingHoleDiameter / 2
     }, %), %)
  |> hole(circle({
       center = [5, -1.5],
       radius = mountingHoleDiameter / 2
     }, %), %)

// Extrude the second leg
bracketLeg2Extrude = extrude(-thickness, bracketLeg2Sketch)
  |> fillet({
       radius = extFilletRadius,
       tags = [
         getNextAdjacentEdge(fillet3),
         getNextAdjacentEdge(fillet4)
       ]
     }, %)

Version

v0.32.0

Recordings/Screenshots

Image

@jgomez720 jgomez720 added the bug Something isn't working label Dec 17, 2024
@jgomez720 jgomez720 self-assigned this Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant