Tray from scanned profile and build123d
Obliczymy ostateczną cenę na podstawie wybranego pliku. Sprawdzisz ją i zaakceptujesz przed płatnością.
Zapisane na tym urządzeniu.
Trace a scanned shape in Inkscape, make and SVG and then import into build123d. In case case made a tray.
- Ocena
- 0 / 5
- Polubienia
- 4
- Pobrania
- 20
- Wydruki
- 1
- Wyświetlenia
- 147
- Oceny
- 0
Aktualizacja u źródła:
Informacje o modelu
- Źródło
- Printables
- Kategoria
- Other Art & Designs
- Licencja
- Creative Commons — Attribution — Noncommercial
The challenge was to make a tray to accurately fit into a metal flower box, to capture excess water from orchids in smaller pots in the flower box.
The shape of the flower box was left-right symmetrical, but with a non-mathematical shape. This post describes the procedure I followed to design the tray to closely fit.
It was evident that the inside of the tray followed the shape of the outer edges of the box's bottom, with a constant offset to the inside. Hence the shape (but not the size) was found by tracing the shape on a piece of paper. This trace was scanned to a bitmap. The traced outline was bigger than my A4 scanner, so I could not scan the whole shape.
In this case the left-right symmetry meant that I only scanned the left half, with the intention to mirror the right half (it worked).
The process was as follows:
- Trace the outside of the box, fold the paper around the vertical centre line, such that the left and right edges perfectly aligned. This gives the one half of the shape.
- Load the scanned outline bitmap into https://inkscape.org.
- In Inkscape draw the line as a curved vector using the GUI and Bezier curves. Use as many points as you need (I used 18 points on one side). Open the SVG file in Inscape to experiment with the process.
- In this case I had to mirror the left side to the right side. Then I moved the centre of the ellipse to the page origin (0,0) because Inkscape will use these coordinates to export.
- Save the file to SVG (Inkscape's native format). This file has the shape, but not the size required.
- Install build123d (https://build123d.readthedocs.io/en/latest/installation.html).
- Import the SVG file using build123d's
import_svg_as_buildline_code()function and print theBuildLinecode to screen. On the command line capture the output with python ellipseflower.py > capture.txt. This procedure converts the SVG file line to build123d code. - Copy and paste the code created above in a
BuildPart/BuildSketchcontexts (see the attached Python code). Use the code to make a tray STL file. - Measure the inside of the flower box (width and length) and then use the PrusaSlicer measurement tool to measure the outside dimensions of the tray. Calculate and apply the scale required to make the tray fit inside the flower box.
- Measure the scaled STL file sizes to verify that it will fit in the box.
- Print.
This example is a simple case but you can use any arbitrary shape in the SVG file. You can subtract SVG shapes by importing the shape and then add using Mode.SUBTRACT.