jasonhamilton / hotwing-core

This project contains a series of classes and functions to aid in creating GCode for 4-Axis CNC foam cutters, specifically working with wing profiles, interpolating new profiles, and computing inverse kinematics for CNC.
GNU General Public License v3.0
8 stars 7 forks source link

Add support for spars #1

Open jasonhamilton opened 6 years ago

monkeypants commented 3 years ago

some questions/thoughts about this:

monkeypants commented 3 years ago

Taking my first look at the code, with spar support in mind. Would the place to start be the Rib class (consider the signature, how to pass in spars?) and test it so it renders OK with the various types of spar that seem like good ideas, then work out to panels/cutting strategies (in hotwing-cli)?

jasonhamilton commented 3 years ago

Excellent ideas! It’s been awhile since I’ve looked at the code but I think you would want the Panel class to handle the spars. The rib is just a cross section of a wing, whereas the Panel is more like a solid wing.

My initial thought would be to create a Spar class that’s passed to the Panel class? I’m happy to take a shot at a simple Spar implementation unless you want go have a go at it.

It’s been a few years since I’ve cut a wing so I don’t have my hot wire set up to test it. I can test in a sim, however.

monkeypants commented 3 years ago

Yes a Spar class makes sense. Spars are lofted shapes (like Panels), oriented in a frame relative to Panels. They need to share the same ends as the Panel if your hot-wire machine (or sim) is anything like mine :). Actually like you I'm currently without a hot-wire cutter (my machine is on loan and might not come back), I discovered your code because I was thinking about making another one... would you just use LinuxCNC to simulate/test? I think that's what I would do too. FWIW the LinuxCNC config of my old machine is here.

Maybe I'm over-thinking this bit, but in real life a Spar is more like a Wing than a Panel (i.e. for multi-panel wings, most spars will be beams that span multiple panels). So the thing that shares the ends of the Panel is a SparSegment (and a Panel is a WingSegment). Now that pedantry is out of my system I'm happy to call them Spars and add them to Panels.

The Spars I can imagine finding useful are:

The last one is a bit funky. Do we say "the top surface of the spar has this shape, we want it to follow the top|bottom surface with these positions at the left/right ends, and be as close to the surface as possible without extending beyond it"? knowing how deep to cut the slot will require interpolating the Panel shape. e.g. if the spar is swept at a different angle to the wing, and the panel has different airfoils at each end, then the spar could need to pass under hills and valleys without sitting proud of the surface. I don't know what the right geometric strategy is or how to implement it. Maybe it's simpler to let the user specify the locations and complain/warn about proud surfaces?

While looking at this, maybe we should also consider hinges, which might be bastardised "full height section spars" or maybe a variant on that which resolves angles for wipers etc, or Fowler flap mechanisms, etc? Not trying to say that's in-scope for Spars, but if we approach it right may end up as more of the same. LE slots too.

Should the current LE/TE cutoffs be re-implemented as Spars too?