Hackagem can import GemCad .asc files using the GemCadImport function, which takes a single string argument. Since these files contain multiple lines, the most convenient way to pass the string is by enclosing it with backtick (`) characters instead of double or single quotes, like so:

GemCadImport(`
GemCad 5.0
g 96 0.0
y 4 y
I 1.54
H PC 11.134  SMALLEST SQUARE
H Robert H. Long, 7/27/17
H Assigned to the Public Domain
a 90.000000 1.09380454 96 24 48 72 n g1
a -38.000000 0.87556750 96 72 48 24 n 1
a 20.000000 0.23666377 96 24 48 72 n a
a 10.000000 0.12457376 12 36 60 84 n b
F For Low RI Material
`)

After executing this you’ll get the complete faceting diagram. Hackagem has a hidden feature to translate the GemCad file into a hackagen program. To see this you’ll have to go to the “Developer tools” and look in the console for the program.

setDesigner("Robert H. Long, 7/27/17")
setName("PC 11.134  SMALLEST SQUARE")
setInfo("Assigned to the Public Domain")
setIndexGear(96)
setSym(4, true)
setRI(1.54)

cut("1", range(0, 24), 38,  meet_1_)

crown()
cut("g", range(0, 24), 90,  meet_g_)
cut("a", range(0, 24), 20,  meet_a_)
cut("b", index(12), 10,  meet("g,g,a,a"))

This doesn’t fully translate it (yet): you’ll have to fill in all the “meet_X_” cases yourself. The corrected version looks like:

setDesigner("Robert H. Long, 7/27/17")
setName("Smallest Square")
setInfo("Assigned to the Public Domain")
setIndexGear(96)
setSym(4, true)
setRI(1.54)
setShape("Square")

cut("1", range(0, 24), 38,  centerPoint())

crown()
cut("g", range(0, 24), 90,  setSize())
cut("a", range(0, 24), 20,  meet("1,g").addY(0.05))  // Adding 0.05 for the girdle
cut("b", index(12), 10,  meet("g,g,a,a"))