The whole language on one page - for typing a drawing, or writing one from another program.
Heck says what a drawing is. This page is all
of it: the words, the marks, every kind of thing and what it takes, what the
program works out for itself, and what it writes back. Every example here is
read by the program as it stands. Paste one into /source and
press Apply to see it.
A header, then a sheet block for each sheet:
HeckerSketch 2 units = ft in // a comment here belongs to the first sheet sheet 'Shop' scale = '1/4"' snap = '1/16"' view = 3d box Bench = 0 east, 0 north, 0 up; 6' east, 2' north, 3' up end
The sheet's settings come first and are all optional: units,
scale and snap (in quotes, because they are names
from the program's own lists: '1/4"', '1/16"'),
view (plan, iso or 3d), and
the sheet's own ink, width and sides -
the defaults for everything on it (sides is how many straight
pieces a circle is drawn in, 24 unless said). The program also writes
camera and cut there to remember the view; leave
them out and it frames the drawing itself. A points block at
the sheet's top level only names places: it draws nothing. Text pasted into
/source without a header or a sheet is read as one sheet.
A line with = is complete. A line without one opens a
block, and end closes it. That is the whole block grammar.
Every thing has both forms, and you may write either:
line = a to b line Rafter points = a to b ink = red width = 2 end
A list too long for a line opens a bracket after the = and
runs to the line that closes it:
face = ( p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 )
A reader skips any block or line it does not know, so a newer drawing
still opens in an older program. There is no begin (one is let
pass if typed), and nothing in a file ever runs.
// to the end of the line or
{ in braces }. A comment above a thing, or at the end of its
line, stays with that thing through every save. The program's own
{ facing up } notes on faces are never read as anything._ -
a, p272, LegSW. Not x,
y or z. A name with spaces goes in quotes:
group 'Left turbine'. Names are not case sensitive.'the fitter''s bracket'.' straight after a digit is feet; anywhere else it
opens text. Where quote marks are a nuisance there are words:
4ft, 6in, 90deg.true and false
(1 and 0 are read too); nothing is
none.#RRGGBB, or black white gray red
orange yellow green blue purple brown.units = | Lengths look like |
|---|---|
ft in | 5' 10 5/8" 4' 18" 3/4" 1.5' 2.84" 5ft 10 5/8in |
in, ft | the same marks |
mm, m | 1200 12.5 1200mm 1.2m |
units = ft, and millimeters on a metric one, even
units = m. A whole number and a fraction together need their
mark: 70 5/8".2.843721934", and never rounded to look
friendlier than it is.4' + 2",
(Width - 1') / 2. The program writes back the answer. A sum
that comes out below nought turns the way round: (1' - 3') east
is 2' west. There is no sine or cosine; a corner at an angle is
worked out beforehand and written as its numbers.Width east, RU * 4 up:
const Width = 4' Gap = (Width - 1') / 2 endThe program writes back the answers; the
const block itself is
not kept yet.A place says all three directions, always: east or
west, north or south, up
or down. No number in a place is ever negative - the word
carries the way. 0 up is on the floor.
2' east, 3' north, 0 up 3' west, 2' south, 6" down x 2' y 3' z 0 the letters are read too
A step says only what changes: 4' east, or
3" east, 2" up.
Wherever a place is wanted it may be a place, a name, or a name and a
step: a, a + 1" up. In a list, places are
joined with to, and + and a step means "from the
one before", so a list is a walk:
face = 0 east, 0 north, 0 up to + 4' east to + 4' north to + 4' west
A list of names needs only spaces: face = a b c d, and
a..h or ra1..ra24 is every name from one to the
other.
A points block names places. Everything in the same block
and the blocks inside it can use them, which is what makes a corner shared by
three faces one corner:
points a = 0 east, 0 north, 0 up b = a + 4' east c = b + 4' north d = a + 4' north end
b = a + 4' east is how b's place is written
down, not a link: change the 4' and b moves, and
so does whatever was written from it.
A ring is corners spaced evenly round a circle, said once. Its corners are its name and a number, counted anticlockwise seen from the side it faces:
points
ring ra
center = 2' east, 2' north, 2' up
radius = 1'
sides = 24
facing = up
starts = 15deg where corner 1 is; 0 if left out
end
end
face = ra1..ra24
A ring only names corners. Its edge loop is a run of lines like any
other - line = ra1..ra24 ra1 goes round and back to the first.
A face gets its edges drawn for it; a noface does
not (it says which loop of lines is not a face, so the lines must be
there).
facing is the way a flat thing looks:
up, down, east, west,
north, south; one that leans,
up, leaning 30° toward east; or three numbers,
0.5 east, 0.5 north, 0.7071 up. Only the direction counts, so
the numbers need not make a length of one: 3 east, 4 up is the
same as 0.6 east, 0.8 up, and a step can be used as a facing
as it stands. starts is
measured from east for a thing facing up or down, otherwise from its level
line - up x facing: facing east, corner 1 is on the north side
of the center; facing north, on the west; facing south, on the east; facing
west, on the south.
Any thing may have a name after its word - box Lid,
line Rafter. Defaults are in brackets; what is left out is the
default.
| Thing | One line | As a block |
|---|---|---|
line | line = a to b, or a to b to c for a run of lines - a cable, a pipe route, a ring's edge loop | points; ink, width, soft (false - an edge of a curved surface, hidden but for the outline), ref (false - a reference line). What a block says holds for every line of its run. |
circle | circle Hole = center; radius, and a third part, the way it faces, when that is not up: circle Port = 0 east, 0 north, 1' up; 6"; north | center, radius, facing; starts (0), sides (24), ink, width |
arc | - | center, radius, facing, sweep; starts (0), sides, ink, width |
face | face = a b c d, or face = Hole for the disk in a circle (and points = Hole in a block, to paint it) | points, hole (as many as it has), paint, ink |
noface | noface = a b c d - a loop of lines that is not a face | - |
rect | rect = corner; size - two parts: 3' east, 2' north lies flat, 3' east, 2' up stands | at, size; paint, ink, width |
box | box = corner; size - the low south-west corner and a three-part size - and ; open top for sides left open | at, size; open (none - any of top bottom east west north south), paint, ink, width |
pull | pull = outline; step - pull = Hole; 3' up is a cylinder | points (corners, or a circle's name: points = Hole), by; paint, ink, width |
loft | loft = outline; outline; ... - loft Boom = Big; Small | through; open (none - start, end or ends), paint, ink, width |
solid | - | paint first, then its points, faces, lines and bores |
bore | - | inside a solid: points (the opening), goes (a step through) |
group | - | locked (false), hidden (false), jig, data, then everything in it |
note | - | at (where the text is), text (a line each, repeated); to (where a leader from it points), size (1: a multiple of the normal text size), ink (its color) |
dim | - | from, to, off (a step: how far and which way the dimension line stands off from the two points); label (text in place of the measured length), ink |
guide | guide = place to place, or one place for a guide point | - |
points, const | - | names, as above |
Faces are what closed lines become, and a face always has edges round it - as in SketchUp, there is no face without them. Twelve lines that close a cube give you its six faces, so a plain face is never written. Write a face only when something about it is not automatic: it is painted, it has a hole the lines would not cut, or it faces the other way.
paint is on - and a hole the other way;
hole = Name takes a circle, whichever way it faces. A
noface has no way round: write it either way. A painted
rect faces east, north or up, as a plain face would.
It is kept the way it was written: written the wrong way round, its paint is
on the inside. A loop in a face or noface closes by
itself; do not repeat the first corner (a line run, by contrast,
has to come back to it to close).
A face the program makes from lines picks its own way: in a solid, out of
the solid; a loose one toward east, north or up. So in a solid you need
only write the lines, and the faces come out facing out.open on a box leaves sides off:
box Tray = 0 east, 0 north, 0 up; 3' east, 1' north, 10" up; open top,
or open = top north in a block.noface when it is not one.noface is a loop of lines that is not a face: an
open top on anything that is not a box, a window. It is how you leave
something open, instead of drawing a face and rubbing it out.face you
write out gives its own holes with hole =, and nothing drawn on
it cuts it. A circle in another group never cuts.
noface on the loop takes the inner face away and leaves the
opening (noface = Hole for a circle). That opens one face only;
a hole right through a solid is a bore.paint = none on a face in a painted solid leaves that one
face unpainted.hole typed without lines stays an opening. A solid written as
its faces alone is taken as all of them: no other loop of the lines the
reader draws becomes a face. A solid with lines of its own works the
usual way: write its lines, and a face only where it needs paint or a
hole.A solid is one piece: push/pull moves only its own geometry,
and lines drawn against it do not join its edges (a circle or loop drawn on
one of its faces in its group still cuts that face, as above). A
points block goes inside a solid or a
loft; for a box or a pull, name the
points in the group around it. It names its corners,
then gives its lines, and faces only where needed:
solid Wedge
paint = gray
points
a = 5' east, 0 north, 0 up
b = a + 1' east
c = a + 1' north
d = a + 1' up
end
line = a to b
line = b to c
line = c to a
line = a to d
line = b to d
line = c to d
end
box and pull are solids in one line. A
box is a rectangle pulled up; a pull is any flat
outline - corners, or a circle by name - moved a step. The program writes a
solid back as a box or a pull while it still is exactly one, and as its
corners and lines once it has been changed. A box with a side rubbed out on
the sheet is still a box, written with open. A solid that is
exactly a box is written as one even if you wrote out its corners, and their
names go with them.
A loft is a solid that runs through outlines in order - a
cone, a reducer, a tapered boom, a fuselage, a duct transition. Each
outline is a circle by name or a list of corners, and every outline has as
many corners as the first (a circle has its sides, 24 unless
said). The first or the last outline may be one point instead, a
tip every corner of the outline beside it runs to - a cone, a spinner, a
nose. Corner 1 of one outline joins corner 1 of the next, and so on round,
so give the outlines the same start (see where a ring's corner 1 is, above)
or the sides twist.
// a tail boom: 8" round to 3" round, rising a little
circle BoomFront = 3' west, 0 north, 4' 8" up; 8"; east
circle BoomTail = 21' west, 0 north, 5' up; 3"; east
loft Boom = BoomFront; BoomTail
// a spinner: a circle to a point in front of it
circle SpinnerBase = 9' east, 0 north, 4' up; 6"; east
loft Spinner = SpinnerBase; 9' 10" east, 0 north, 4' up
// an airfoil wing: a points block inside the loft names its corners
loft Wing
points
r1 = 0 east, 0 north, 7' up
r2 = r1 + 16" west, 5" up
r3 = r1 + 64" west
r4 = r1 + 12" west, 2" down
t1 = 0 east, 16' north, 7' 9" up
t2 = t1 + 12" west, 4" up
t3 = t1 + 48" west
t4 = t1 + 9" west, 1 1/2" down
end
through = r1..r4; t1..t4
paint = white
end
// a body through several rings: Nose, Front, Middle and Rear are
// circles drawn before it, all facing the way the body runs
loft Cabin
through = Nose; Front; Middle; Rear
paint = red
end
// a duct from 12" square to 6" square, 3' up and offset: open both ends
loft Transition
through = 0 east, 0 north, 0 up to + 1' east to + 1' north to + 1' west; 3" east, 3" north, 3' up to + 6" east to + 6" north to + 6" west
open = ends
end
open says
start, end or ends; the outlines between
are never faces.open and a points block need
the block form; the one line says only the outlines. Points named
inside a loft are its own; points named outside it can be used too, and two
lofts may go through the same circle or the same corners - each is still
its own solid.A group keeps a piece to itself: it is picked, moved, hidden
and locked as one thing, its geometry never joins its neighbor's, and groups
go inside groups for an assembly. A point or circle named in a group or a
solid is known inside it and the blocks within it; a name given at the
sheet's top level is known everywhere. Keeping every name different is
simplest. There is no paint for a whole group: paint goes on each solid,
box or pull.
group 'Hangers' locked = true jig = 'hangers' with Count = 6, Spacing = 16" ... end
jig names a program that writes the group's contents (see
Jigs); data is a block a tool keeps
for itself, kept as it is.
The program reads Heck into a drawing and writes the drawing out again -
on every save, and in /source as you work. What it keeps and
what it puts its own way:
floor1, top1 - and an unnamed circle as
c1. Lines that belong to no solid are written with their
places, not names.A mistake stops the whole Apply, marked on its line with what was expected; nothing on the sheet changes until the text reads.
A chest with its lid propped open on the back edge, and a post and a plate beside it:
// a chest: a box, and its lid swung up 30 degrees on the back edge
group 'Chest'
box Body
at = 0 east, 0 north, 0 up
size = 3' east, 2' north, 1' 6" up
paint = brown
end
// the front edge has swung up: 2' cos 30 = 20.7846" back,
// 2' sin 30 = 12" up
solid Lid
paint = brown
points
h1 = 0 east, 2' north, 1' 6" up
h2 = h1 + 3' east
f1 = h1 + 20.7846" south, 12" up
f2 = f1 + 3' east
end
line = h1 to h2
line = h2 to f2
line = f2 to f1
line = f1 to h1
end
end
// a cylinder is a pulled circle; a circle on a box's top cuts it
group 'Post and plate'
circle Post = 6' east, 1' north, 0 up; 3"
pull Column = Post; 3' up
circle Hole = 9' east, 1' north, 2" up; 3"
box Plate = 8' east, 0 north, 0 up; 2' east, 2' north, 2" up
end
A round tube from one place along any step - a roll cage, a pipe - is a circle facing the way the tube runs, pulled by the step. The step is its own facing, so there is nothing to work out:
// 1 3/4" tube from the top of the front hoop, back 7" and up 24" circle HoopTop = 15" west, 62" north, 29" up; 7/8"; 7 south, 24 up pull UpperHoop = HoopTop; 7" south, 24" up
Tubes meeting at a joint simply overlap there; each stays a tube of its own.
A painted panel with a square window in it:
face Panel points = 20' east, 0 north, 0 up to + 4' east to + 4' north to + 4' west hole = 21' east, 1' north, 0 up to + 1' north to + 1' east to + 1' south paint = #3366CC end
An open tray on legs, built in groups, is on the Heck page.
What there is not yet: a statement for a turned or swept shape - an
elbow, a dome, a sphere (a loft through rings does a lot of it) - and paint on a box, pull
or rect written on one line (write it as a block to paint it). A round solid with
different ends is a solid of rings with lines between them; an
elbow is two pulls meeting, or a loft through rings turned a little each.
open on a box and
noface elsewhere for what is open.box for blocks,
pull for a profile pushed some distance, circle
with pull for round things./source and press
Apply; a mistake is marked on its line.