Skip to content

Instantly share code, notes, and snippets.

@astory
Created September 17, 2017 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astory/ae9934cb9740ccb560c892e54b03d029 to your computer and use it in GitHub Desktop.
Save astory/ae9934cb9740ccb560c892e54b03d029 to your computer and use it in GitHub Desktop.
Oseberg tablet jscad
// title : Oseberg Weaving Tablets
// author : Alec Story
// license : CC by 4.0
// revision : 1
// Based on a blueprint published in _52 WOOD WEAVING TABLETS
// recovered from The Oseberg Ship Burial in Norway - 834 AD_
// by Terri A. Morrison, 1999. Dimensions are ultimately from
// her private correspondance with Dr. Arne Emil Christensen,
// chief curator of the Vikingskipshuset in Oslo, Norway.
// All sizes in millimeters, and based on the middle of the
// range of sizes found on the cards, since they vary.
let face_length = 43;
let hole_diameter = 4;
let thickness = 1.5;
let hole_center_inset = 4.5;
// This number is not specified in the documentation.
let corner_radius = 1;
// Set to 8 for faster development renders
let resolution = 100;
function corner_circle(x_dir, y_dir) {
let offset = face_length / 2 - corner_radius;
return CAG.circle({center: [offset * x_dir, offset * y_dir],
radius: corner_radius,
resolution: resolution
});
}
function hole_circle(x_dir, y_dir) {
let offset = face_length / 2 - hole_center_inset;
return CAG.circle({center: [offset * x_dir, offset * y_dir],
radius: hole_diameter / 2,
resolution: resolution
});
}
function main() {
let card_polygon = hull(corner_circle(1, 1),
corner_circle(1, -1),
corner_circle(-1, 1),
corner_circle(-1, -1));
let polygon_with_holes = card_polygon.subtract([
hole_circle(1, 1),
hole_circle(1, -1),
hole_circle(-1, 1),
hole_circle(-1, -1)]);
return linear_extrude({height: thickness}, polygon_with_holes);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment