A feed hopper drawing package from nine sizes, checked by a script that did not draw it
- Problem
- A small shop asked to build a hopper needs more than four flat patterns: a drawing set that the customer’s engineer can review and the cutter can work from, drawn again for every new size.
- What was built
- A generator that runs in the browser: type nine sizes on the drawing, and a seven-sheet set (PDF and DXF) and four cut DXFs are redrawn from one geometry, with a manifest and a verifier in the ZIP.
- Result
- The cut files of the sample pass 36 checks by an ezdxf script written separately from the drawing code; the sample set on this page is the generator output, byte for byte.
Problem
A feed hopper is a common shop job: a square bin, a square-to-round transition, a rolled spout and a flange. The flat patterns are the easy part, and the free tool on this site already does the four panels. What a customer or an inspector asks for is the rest: a general arrangement with a bill of material, part sheets, a welding sheet, an assembly sheet, a title block with the shop's name, and cut files whose sizes agree with the bill of material and with each other.
Drawing that by hand takes time, and every change of size means doing it again, with the usual risk that a sheet and a cut file stop agreeing.
Constraints
- Runs in the visitor's browser. The sizes are never sent to a server; the ZIP is built on the visitor's computer.
- The PDF and the DXF must be the same sheets, not two drawings that happen to look alike.
- Millimetres or inches; inch sheets in fractions to 1/16, plate thicknesses in decimal inches; cut files in the unit chosen.
- Geometry and fabrication only. Plate thickness and welds are not sized for any load; the notes say so, and the title block leaves space for the reviewing engineer's seal.
- No DWG: it is a closed format with no way here to prove a clean file. The DXF opens in AutoCAD and other CAD programs and can be saved as DWG there.
How the logic works
The nine sizes are the top opening (width and depth), the hopper height, the square outlet, the round outlet's mean diameter, the transition height, the spout length, the sheet thickness and the flange thickness. From them the geometry gives the four trapezoid panels and their true corner line, the square-to-round transition developed into flat facets with a bend table, the spout blank (its length is the mean circumference, so it meets the transition's round edge), and the flange with its bore and bolt holes sized to the spout.
Each sheet is one list of lines, arcs, text and tables in sheet millimetres. Three writers turn that list into an SVG for the screen, a PDF and a DXF R12, so the preview, the PDF and the CAD file are made from the same data. The sizes shown on the drawing are the boxes you type into.
System
| Sheet | Content |
|---|---|
| 1 | General arrangement |
| 2 | General notes |
| 3 | H1, H2 hopper panels |
| 4 | T1 transition — developed view and forming |
| 5 | S1 spout and F1 flange |
| 6 | Welding details |
| 7 | Assembly |
The download is a ZIP: the drawing set as PDF and DXF, four cut DXFs named by drawing number, a manifest with the inputs and the derived sizes, the verifier and a README. Company name, project, drawing number and the designed, drawn and checked boxes are typed on the title block.
Validation
- Independent check of the cut files. A Python script using ezdxf, written apart from the drawing code, reads the four cut DXFs and checks each against the geometry: every panel edge, the true corner line, the transition's round edge against π × diameter, the spout blank against the transition, flange bore and hole clearances, and the area and mass of each part against the bill of material in manifest.json (it reads the cut files, not the sheets). The sample passes all 36 checks (output).
- Other sizes. Tests build complete packages for four sizes in millimetres, the sample among them, and run the verifier and an ezdxf audit of the drawing-set DXF on each; one more package, in inches, goes through the verifier. Other tests check the PDF's cross-reference table and that the DXF is plain R12 with every sheet.
- The sample is real output. A test fails if the sample PDF, DXF or cut files below differ by one byte from what the generator makes today.
- Review. An independent review of the sheets found seven drafting faults (among them the flange set-back, missing bend lines on the developed view, label clashes and the weld wording); all were fixed before publication.
Result
A drawing set for a new hopper size from the sizes typed in, with cut files checked against the bill of material and the mating lengths by a script anyone can run. The set still goes through the shop's own checking and the engineer's review. The generator is free to use on this site: open the hopper drawing package.
Responsibility
The set is geometry and fabrication information. It does not size plate, welds, supports or lifting points, and it does not cover the contents or their flow. It needs review by a licensed professional engineer for the intended use before anything is built; the notes on sheet 2 say this on every set.
Technology
TypeScript · one sheet display list → SVG, PDF and DXF R12 writers · Python + ezdxf (independent check) · Vitest · Playwright