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

Design stopped loading after trying to add "rotation" to a patternTransform #5112

Open
tapeDuct opened this issue Jan 19, 2025 · 0 comments
Open

Comments

@tapeDuct
Copy link

[Add a title above and insert a description of the issue here]
I've been building a design and exploring how to duplicate one beam across the design. It was working well with patternTransform when I only return a single translate, but when I tried to add a rotation, the whole view stopped showing. Further changes to the code didn't change the view.

Screenshot

Note: If you are capturing from a browser there is limited support for screenshots, only captures the modeling scene.
If you are on MacOS native screenshots may be disabled by default. To enable native screenshots add Zoo Modeling App to System Settings -> Screen & SystemAudio Recording for native screenshots.

Core Dump

coredump-4f1e2e13-57dc-4e89-a286-90be646d204a.json

Reference ID: 4f1e2e13-57dc-4e89-a286-90be646d204a

KCL Code
// Generated by Text-to-CAD: a flat floor that is 120 cm by 120 cm and 1 mm thick.

// Define the dimensions of the floor
floorLength = 1200 // in mm
floorWidth = 1200  // in mm
floorThickness = 1 // in mm

// Create a sketch for the floor
floorSketch = startSketchOn("XY")

// Create the floor profile
floorProfile = startProfileAt([-floorLength / 2, -floorWidth / 2], floorSketch)
  |> xLine(floorLength, %)
  |> yLine(floorWidth, %)
  |> xLine(-floorLength, %)
  |> yLine(-floorWidth, %)
  |> close(%)
  |> extrude(floorThickness, %)


// Generated by Text-to-CAD: 100mm x 100mm (4”x4”) treated lumber for corner posts 2.1m in length. light brown color.

// Define the dimensions of the lumber
lumberWidth = 100 // mm
lumberHeight = 100 // mm
lumberLength = 2100 // mm

// Define the color for the lumber
lumberColor = '#A0522D' // light brown color in hex

// Each instance will be shifted along the X axis,
// with a gap between the original (at x = 0) and the first replica
fn transform(id) {
  return {translate = [550 * (id), 0, 0]}

lumberSketch = startSketchOn('XY')
  |> startProfileAt([-600, 500], %)
  |> xLine(lumberWidth, %)
  |> yLine(lumberHeight, %)
  |> xLine(-lumberWidth, %)
  |> yLine(-lumberHeight, %)
  |> close(%)
  |> extrude(lumberLength, %)
  |> patternTransform(3, transform, %)
  |> appearance({
    color = lumberColor,
    metalness = 10,
    roughness = 70
  }, %)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant