scottbez1 / splitflap

DIY split-flap display
https://scottbez1.github.io/splitflap
Other
3.1k stars 257 forks source link

Wrong Dimensions and Problems in flapAnnotated.svg #39

Closed martinlombana closed 4 years ago

martinlombana commented 5 years ago

image

I think it has to do with the way you export SVG from illustrator. You need to select the maximum decimal points.

Also the corners are slanted.

image

This makes this SVG, not suitable for production, whatever the method used (die cuts, laser, CNC).

Attatched corrected file, for future reference, in PDF. I would recommend to change it to PDF as well in your repository files. It is more reliable.

I also changed the corner radius to be just 3mm, as it is a good rounded measure, and it happens to coincide with my CR80 Cards. And the annotated 3mm is much clear to understand now.

[flapAnnotated_amended.pdf] (Pending validation and approval by @scottbez1 )(https://github.com/scottbez1/splitflap/files/2406276/flapAnnotated_amended.pdf)

scottbez1 commented 5 years ago

Thanks. Mind sending a pull request that adds it to the docs/img folder? (it's not really the right spot for it, but that's where the SVG currently lives so might as well be consistent).

The flattened corners are an artifact of the SVG being exported directly from the OpenSCAD model - OpenSCAD operates on curves as a quantized approximation rather than a true vector curve, so actually every curve in the enclosure SVG for laser-cutting is made up of straight lines as well.

Here's the definition of those corners in the model: https://github.com/scottbez1/splitflap/blob/cdb2a54f4b392c4344c2c6e8975a77ac421b8b70/3d/splitflap.scad#L346-L349

The $fn=40 there is specifying a quantization of 40 segments for a full circle. So while the number of segments could be increased for a smoother approximation, any export from the model is always going to use discrete line segments rather than a vector curve.

I'm not totally sure about the dimension issue. It's showing up with the proper dimensions in mm for me in Inkscape, and looking at the raw SVG source I see that the document's root node appears to specify the document dimensions in mm correctly:

   width="94.335823mm"
   height="68.030777mm"

I'm happy to include your PDF as a supplement, but I do have a slight preference to keep the SVG alongside it if you don't mind, mostly because it's closer to the model's source which should make it easier (for me at least) to update and change in the future if the underlying model changes for some reason.