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

[WIP] Chicken coop #143

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

[WIP] Chicken coop #143

wants to merge 7 commits into from

Conversation

Irev-Dev
Copy link
Collaborator

@Irev-Dev Irev-Dev commented Jan 28, 2025

Some images first than details below

image

image

image

image

image

image

image

  • It's a chicken coop, it's about 3x7.5m big about 2.5m tall at the highest point.
  • I think what makes this most different to our other samples is that this is mostly a big assembly, the geometry of each stud is very simple, but there's about 200 of them.
  • The main output of the kcl is a BOM of sorts, the geometry is only useful as a visual aid during development, I'm not exporting the geometry to do anything useful with it.
  • I very much ran into the issue of too many function definitions causing the modeling app to slow down, this mean I stopped at the frame (didn't model the cladding or roof sheets) and that I wasn't able to add all the abstractions I wanted.
  • The core concept of having a stud function that adds the stud to the scene but also returns a "cut-item" (the studs length and the cut angles) worked, and from it I was able to create a cut list
  • The cut list code was written in javascript, since I was already hitting the "too many functions" problem with kcl, I too the escape hatch of taking the data from kcl and doing more work with it in javascript
  • I was however able to make a concat and flatmap functions in KCL by abstracting reduce, might be worth adding these into rust, but was cool to see it's doable.
  • Every single stud get it's length and is placed with variables/math/trig, but I can imagine some useful raycast/intersection util functions that would let me query the existing geometry in order to drive lengths and what not instead of labouring so much on math.
  • Because the "too many function" problem, I would work on individual files, and would bring them together in assembly.kcl only when I needed to see it all together. This worked but the Cannot send modeling commands while importing. was a real PITA because I would have to comment things out to get the assembly working again, and then uncomment when working again in the sub-file.
  • I don't have an example handy, but I noticed that errors in files that you're important are "silent". We don't have UI or similar to tell the user there's a problem in the imported file.
  • at the time of writing I'm waiting for the roof sheet and cladding to arrive so I can finish it.

Here's the well loved cut list that I printed and poured over (it's 5 pages). I checked everything because I was terrified there would be a bug, causing bad cuts wasting material and therefore money, but it was perfect, the only mistakes were my implementing the cut list where I had cut things wrong, but the list it's self was perfect.
image

Of course it's parametric, so here's the coop I made
image

But here it is again with a steper pitched roof for the coop, A wider coop and shorter run, and studs that are more American 2x4"s instead of 35x90mm
image

Misc

errors in kcl appear on the feature tree icon??
image
formatting of arrays that wrap can get really gnarly (see the definition of coopFront for an example)
image

@nadr0
Copy link
Contributor

nadr0 commented Jan 28, 2025

errors in kcl appear on the feature tree icon??

Fixed in KittyCAD/modeling-app#4979

@adamchalmers
Copy link
Collaborator

adamchalmers commented Jan 28, 2025

Too many functions bug: KittyCAD/modeling-app#4437

@Irev-Dev
Copy link
Collaborator Author

Thanks Kevin, I had a feeling it might have gotten fixed, but forgot I was still behind main.

@jessfraz
Copy link
Contributor

Cannot send modeling commands while importing. is fixed now in nightly, I can't find a bug for the "errors in assemblies broken in ui" maybe we need one? unless you all know?

# Conflicts:
#	README.md
#	step/80-20-rail.step
#	step/a-parametric-bearing-pillow-block.step
#	step/ball-bearing.step
#	step/bracket.step
#	step/car-wheel-assembly.step
#	step/dodecahedron.step
#	step/enclosure.step
#	step/flange-with-patterns.step
#	step/flange-xy.step
#	step/focusrite-scarlett-mounting-bracket.step
#	step/food-service-spatula.step
#	step/french-press.step
#	step/gear-rack.step
#	step/gear.step
#	step/hex-nut.step
#	step/i-beam.step
#	step/kitt.step
#	step/lego.step
#	step/mounting-plate.step
#	step/multi-axis-robot.step
#	step/pipe-flange-assembly.step
#	step/pipe-with-bend.step
#	step/pipe.step
#	step/poopy-shoe.step
#	step/router-template-cross-bar.step
#	step/router-template-slate.step
#	step/sheet-metal-bracket.step
#	step/socket-head-cap-screw.step
#	step/walkie-talkie.step
#	step/washer.step
Copy link
Contributor

The following files failed to export to STEP format:
chicken-coop/main.kcl

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

Successfully merging this pull request may close these issues.

5 participants