I'm playing with a little app ("Wing Rib") to generate paths for cutting out a set of ribs for building wings for model aircraft. The basic app is working -- I don't know who can access it, but take a look to see what I mean. I need to space the ribs apart by at least the thickness of the cutter, so cutting one doesn't damage it's neighbors. It would be valuable to know the cutter diameter without having to force the user to enter it as a parameter, or manually reposition the ribs.
Also, planning to add a feature that cuts spar slots in the ribs. The user will specify the width and depth of the slot. But the min: value of the range-type for the slot should not allow a value smaller than the bit size. So again, I need to know the bit size, and I also need to set that min: value programatically, rather than as a compile-time constant.
Similarly, when offering to generate ribs, I may limit the chord (length of rib) to practical values from say 3" to 12" with min: and max: properties of the range-type. But if the user is drawing in mm, those values need to be changed from 3-12 to let's say 75-300.
Ok, I see that, but if I generate 10 ribs, they each need to be scaled to a specific size. If I explicitly set the size of the SVG, how do I relate the points on a path to the dimensions of the SVG? Let's say I return an SVG 10" square. I want to draw a path that starts in the exact center of that square. So the path needs to begin with a "move" to the 5,5 coordinate, something like this:
<path d="M5 5 L...... Z" />
but that isn't five inches, it's five pixels or something. So how do I scale that number so that it will correctly equate to 5 inches? Or 127 mm?
Ok, good. But it's importing as outline cuts On Path and not Outside cuts as needed in this case. And if I add internal features (like lightening holes) I'll need to cut those Inside the path.
On a separate note, this app presently caters for only two airfoil sections, by including two arrays in the code. But there are literally thousands of sections available, each with dozens of data-points. Even if the app limits users to a dozen or so common ones, that's a large constant dataset, only a small portion of which is likely to be used at a time. Is there any provision for accessing external reference data? It might be country outlines, shapes of flowers, or anything.