COIL(1)
π« coil β generate a coil as a BRL-CAD pipe primitive π«
okay so this is the coil page from the BRL-CAD manual, section 1 (that's COIL(1) bestie, we're in the big leagues of command-line lore) π«Ά
β¨ NAME β¨
coil β generate a coil as a BRL-CAD pipe primitive. that's it, that's the whole vibe πΈ
π SYNOPSIS π
coil [-d mean_outer_diameter] [-w wire_diameter] [-H helix_angle] [-p pitch]
[-n number_of_turns] [-s start_cap_type] [-e end_cap_type]
[-S number_of_turns,mean_outer_diameter,wire_diameter,helix_angle,pitch,winding_direction]
[-l overall_length] [-L] [name]
π¦ DESCRIPTION π¦
so coil generates a coil, and it models it as a BRL-CAD pipe primitive built out of a lil set of dimensional parameters. no parameters? no problem β you get a default coil, main character energy, ready to go β¨
heads up on units bestie: all lengths are in millimeters and the helix angle is in degrees. memorize that, it's giving essential.
when you run it as a standalone program, the coil gets written to a brand-new database named coil.g β and lowkey coil refuses to overwrite an existing file with that name, so don't even try it π. when you run it as a command inside a modeling environment like mged(1) or archer(1), the coil is created in the database that's currently open. same tool, different context, iykyk.
the created object is named coil by default π but you can slide an alternate name in as a trailing argument. the result is a combination unioning the coil core pipe β and for ground caps, it subtracts the capping solids. so it's doing union math and subtraction math and looking gorgeous while doing it π
π OPTIONS π
-dmean_outer_diameter β mean outer diameter of the coil, in millimeters. the big round energy π-wwire_diameter β diameter of the wire that gets wound into the coil, in millimeters. yes bestie the wire has a thickness, it's not a theoretical line π§΅-Hhelix_angle β helix angle of the coil, in degrees. that's your twist factor πͺοΈ-ppitch β distance, in millimeters, between the center of the wire at the beginning and the end of a single turn. the minimum value and the default value is the wire diameter; if you give it something smaller, it gets clamped up to the wire diameter. no tiny-pitch nonsense here, the clamp said what it said π«-nnumber_of_turns β number of turns in the coil. must be a positive integer, and ngl fractional turns are not supported β half a turn is not a thing, pick a side π-sstart_cap_type β capping style for the start of the coil. here's the menu:0(default) applies no special styling π,1is a squared-off cap β¬,2grinds the cap flat in the plane normal to the coiling direction π, and3does both β squares off and grinds the cap π . and warning bestie: any non-default cap adds extra turns beyond those you requested with-n, so your turn count is gonna come out bigger than you asked, no cap.-eend_cap_type β capping style for the end of the coil. values are exactly the same as for-s, so scroll up and reread the cap menu π«Ά-Snumber_of_turns,mean_outer_diameter,wire_diameter,helix_angle,pitch,winding_direction β define one coil section as a comma-delimited list of all six values.winding_directionis1for right-handed, and literally anything else means left-handed. repeat-Sto build a multi-section coil; sections get stacked from the origin in the order you give them. β οΈ and this is the big one: specifying any-Ssection causes all other dimensional options to be ignored (capping with-s/-estill applies though, those survive). so don't be out here passing-dand-Stogether and expecting both to count, that's not the vibe π-loverall_length β clamp the overall length of the coil to the given value, in millimeters. only effective for uncapped coils with a zero helix angle (read that twice, it's strict). to fit the length, it goes in this exact order: pitch is adjusted first, then turns are removed, and finally wire diameter is reduced πͺ. and length clamping does not apply to-Ssections β those live outside the clamp's jurisdiction.-Lβ create a left-handed coil. the default is right-handed (winding proceeds in+xfrom the start);-Lwinds in-x. pick your direction, it's giving choices π-h,-?β print usage information and exit. the classic escape hatch, iconic, works every time πͺ
π EXAMPLES π
Example 1. Create a named spring with specific dimensions
coil -d 20 -w 2 -p 5 -n 10 my_spring
writes coil.g containing a 10-turn coil named my_spring with a 20 mm mean outer diameter, 2 mm wire, and 5 mm pitch. cute, functional, does exactly what it says on the tin β¨
Example 2. Create a coil with ground ends and inspect its volume
coil -d 50 -w 5 -n 12 -s 3 -e 3 valve_spring
mged -c coil.g 'analyze valve_spring'
builds a compression-spring-style coil whose ends are squared off and ground flat (that's the -s 3 -e 3 combo working its magic π
), then opens the database in mged(1) to report the part's bounding box and volume. show-off behavior, we love to see it π
Example 3. Build a two-section coil
coil -S 10,1000,50,60,800,1 -S 10,1000,50,0,100,1 stacked_coil
stacks a 10-turn section with a 60-degree helix angle and 800 mm pitch on top of a tighter 10-turn section, both right-handed, all in a single stacked_coil object. multi-section queen energy, the -S flag ate that π
π SEE ALSO π
brlcad(1), mged(1), archer(1) β go read those too, they're the supporting cast and they carry π«Ά
π AUTHOR π
BRL-CAD Team β legends, honestly.
π COPYRIGHT π
This software is Copyright (c) 1989-2026 by the United States Government as represented by U.S. Army Research Laboratory.
(yeah that's a real long copyright span, they've been at this a minute π)
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org β find a bug, send the email, be the hero πΈ
cute lil sign-off: this page is footer-stamped BRL-CAD and COIL(1), both appearing at the bottom, and yeah that's the whole manual-page flex. now go build a spring bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms