Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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