# Hand Saw

> A low-poly carpenter’s hand saw with a tapered steel blade, a crisp row of teeth and a closed wooden pistol-grip handle held by brass screws. Show it mid-cut in a bark log with a dark kerf and little piles of sawdust, or lying flat on the ground. Set the blade length and colors for workshops, lumber yards, cabins and crafting games.

![Hand Saw preview](https://codels.download/m/hand-saw.png)

Multi-view sheet (3/4, front, side, top): https://codels.download/m/hand-saw.sheet.png

## Facts

- Category: Props › Tools
- Size (W × H × D): 0.82 × 0.52 × 0.74 m — units are meters, +Y up, front faces +Z
- Origin: center of the base (y = 0)
- Triangles: 808 · Meshes: 19 · Materials: 8
- License: CC0-1.0 (Codels built-in)
- Tags: carpentry, hand-saw, log, lumberjack, saw, workshop, low-poly, stylized, construction, farm, forest, village, rpg, survival, equipment, interactable, prop, tool, metal, wood, mobile-friendly, parametric, color-brown, color-orange, size-small, poly-low
- Page: https://codels.download/models/hand-saw

## Files

| Format | URL |
|---|---|
| three.js ES module (`createHandSaw()`) | https://codels.download/m/hand-saw.js |
| React Three Fiber component (`<HandSaw />`) | https://codels.download/m/hand-saw.jsx |
| Instancing module (`createHandSawInstances(count, place)`, one draw call per material) | https://codels.download/m/hand-saw.instanced.js |
| Standalone HTML demo | https://codels.download/m/hand-saw.html |
| glTF binary | https://codels.download/m/hand-saw.glb |
| glTF binary, Meshopt-compressed (2–3× smaller; GLTFLoader needs `setMeshoptDecoder(MeshoptDecoder)`) | https://codels.download/m/hand-saw.glb?compress=meshopt |
| glTF JSON | https://codels.download/m/hand-saw.gltf |
| OBJ (vertex colors) + MTL | https://codels.download/m/hand-saw.obj · https://codels.download/m/hand-saw.mtl |
| STL | https://codels.download/m/hand-saw.stl |
| CodelSpec JSON | https://codels.download/m/hand-saw.json |

## Parameters

Append them as query parameters to any URL above to get a customized variant (e.g. `?pose=...`).

| Param | Type | Range / options | Default | Current |
|---|---|---|---|---|
| `pose` | select | log \| flat | log | log |
| `length` | number | 0.4 – 0.7 | 0.55 | 0.55 |
| `handle` | color | #rrggbb | #9c5b2f | #9c5b2f |
| `metal` | color | #rrggbb | #b8bec6 | #b8bec6 |

## Parts

- log (cylinder · bark)
- endGrain (cylinder · endGrain)
- treeRing (cylinder · ring)
- endGrain (cylinder · endGrain)
- treeRing (cylinder · ring)
- kerf (cylinder · kerf)
- sawdust (dodecahedron · sawdust)
- sawdust (dodecahedron · sawdust)
- speck (box · sawdust)
- speck (box · sawdust)
- speck (box · sawdust)
- speck (box · sawdust)
- speck (box · sawdust)
- speck (box · sawdust)
- saw (group)
  - blade (extrude · blade)
  - handle (extrude · handle)
  - screw (cylinder · brass)
  - screw (cylinder · brass)
  - screw (cylinder · brass)

## How to use

Save the code below as `hand-saw.js`, then:

```js
import { createHandSaw } from './hand-saw.js';
const model = createHandSaw();
scene.add(model);
```

## Code

```js
/**
 * Hand Saw — Codels 3D model library (https://codels.download/models/hand-saw)
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 808 · Size (W × H × D): 0.82 × 0.52 × 0.74 m
 *
 * Usage:
 *   import { createHandSaw } from './hand-saw.js';
 *   
 *   const model = createHandSaw();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

// Deterministic vertex displacement (organic low-poly look).
function jitter(geometry, amount, seed) {
  const pos = geometry.attributes.position;
  const h = (a, b, c, s) => {
    let x = Math.imul(a, 73856093) ^ Math.imul(b, 19349663) ^ Math.imul(c, 83492791) ^ Math.imul(s, 2654435761);
    x = Math.imul(x ^ (x >>> 16), 2246822507);
    x = Math.imul(x ^ (x >>> 13), 3266489909);
    return ((x ^ (x >>> 16)) >>> 0) / 4294967295 - 0.5;
  };
  for (let i = 0; i < pos.count; i++) {
    const x = pos.getX(i), y = pos.getY(i), z = pos.getZ(i);
    const qx = Math.round(x * 1000), qy = Math.round(y * 1000), qz = Math.round(z * 1000);
    pos.setXYZ(i, x + h(qx, qy, qz, seed) * 2 * amount, y + h(qx, qy, qz, seed + 1) * 2 * amount, z + h(qx, qy, qz, seed + 2) * 2 * amount);
  }
  pos.needsUpdate = true;
  geometry.computeVertexNormals();
  return geometry;
}

// Extrude a 2D outline along Z (centered). bevel = [thickness, size, segments].
function extrude(outline, depth, holes = [], bevel = null) {
  const shape = new THREE.Shape(outline.map(([x, y]) => new THREE.Vector2(x, y)));
  for (const hole of holes) shape.holes.push(new THREE.Path(hole.map(([x, y]) => new THREE.Vector2(x, y))));
  const options = bevel
    ? { depth, bevelEnabled: true, bevelThickness: bevel[0], bevelSize: bevel[1], bevelSegments: bevel[2] }
    : { depth, bevelEnabled: false };
  return new THREE.ExtrudeGeometry(shape, options).translate(0, 0, -depth / 2);
}

export function createHandSaw() {
  const root = new THREE.Group();
  root.name = 'HandSaw';

  // Materials
  const bladeMat = new THREE.MeshStandardMaterial({ name: 'blade', color: 0xb8bec6, roughness: 0.3, metalness: 0.55, flatShading: true });
  const handleMat = new THREE.MeshStandardMaterial({ name: 'handle', color: 0x9c5b2f, roughness: 0.7, flatShading: true });
  const brassMat = new THREE.MeshStandardMaterial({ name: 'brass', color: 0xd8ae52, roughness: 0.35, metalness: 0.5, flatShading: true });
  const barkMat = new THREE.MeshStandardMaterial({ name: 'bark', color: 0x5d4029, roughness: 1, flatShading: true });
  const endGrainMat = new THREE.MeshStandardMaterial({ name: 'endGrain', color: 0xd9b27c, roughness: 0.9, flatShading: true });
  const ringMat = new THREE.MeshStandardMaterial({ name: 'ring', color: 0xb88b55, roughness: 0.9, flatShading: true });
  const kerfMat = new THREE.MeshStandardMaterial({ name: 'kerf', color: 0x2b1d12, roughness: 1, flatShading: true });
  const sawdustMat = new THREE.MeshStandardMaterial({ name: 'sawdust', color: 0xdcb676, roughness: 1, flatShading: true });

  // Shared geometries
  const cylinderGeo = new THREE.CylinderGeometry(0.118, 0.118, 0.012, 9);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.065, 0.065, 0.004, 9);
  const boxGeo = new THREE.BoxGeometry(0.012, 0.004, 0.012);
  const cylinderGeo3 = new THREE.CylinderGeometry(0.0075, 0.0075, 0.03, 6);

  // Parts
  const log = new THREE.Mesh(new THREE.CylinderGeometry(0.13, 0.13, 0.8, 9), barkMat);
  log.name = 'log';
  log.position.set(0, 0.13, -0.08);
  log.rotation.set(0, 0, deg(90));
  root.add(log);
  const endGrain = new THREE.Mesh(cylinderGeo, endGrainMat);
  endGrain.name = 'endGrain';
  endGrain.position.set(-0.401, 0.13, -0.08);
  endGrain.rotation.set(0, 0, deg(90));
  root.add(endGrain);
  const treeRing = new THREE.Mesh(cylinderGeo2, ringMat);
  treeRing.name = 'treeRing';
  treeRing.position.set(-0.408, 0.13, -0.08);
  treeRing.rotation.set(0, 0, deg(90));
  root.add(treeRing);
  const endGrain2 = new THREE.Mesh(cylinderGeo, endGrainMat);
  endGrain2.name = 'endGrain';
  endGrain2.position.set(0.401, 0.13, -0.08);
  endGrain2.rotation.set(0, 0, deg(90));
  root.add(endGrain2);
  const treeRing2 = new THREE.Mesh(cylinderGeo2, ringMat);
  treeRing2.name = 'treeRing';
  treeRing2.position.set(0.408, 0.13, -0.08);
  treeRing2.rotation.set(0, 0, deg(90));
  root.add(treeRing2);
  const kerf = new THREE.Mesh(new THREE.CylinderGeometry(0.133, 0.133, 0.007, 3, 1, false, 0.6981, Math.PI * 0.6667), kerfMat);
  kerf.name = 'kerf';
  kerf.position.set(0.14, 0.13, -0.08);
  kerf.rotation.set(0, 0, deg(90));
  root.add(kerf);
  const sawdust = new THREE.Mesh(jitter(new THREE.DodecahedronGeometry(0.07, 0), 0.008, 2), sawdustMat);
  sawdust.name = 'sawdust';
  sawdust.position.set(0.13, 0.008, -0.25);
  sawdust.scale.set(1.3, 0.15, 0.9);
  root.add(sawdust);
  const sawdust2 = new THREE.Mesh(jitter(new THREE.DodecahedronGeometry(0.07, 0), 0.008, 4), sawdustMat);
  sawdust2.name = 'sawdust';
  sawdust2.position.set(0.15, 0.008, 0.09);
  sawdust2.scale.set(1.3, 0.15, 0.9);
  root.add(sawdust2);
  const speck = new THREE.Mesh(boxGeo, sawdustMat);
  speck.name = 'speck';
  speck.position.set(0.2061, 0.002, -0.3568);
  speck.rotation.set(0, deg(41.0573), 0);
  root.add(speck);
  const speck2 = new THREE.Mesh(boxGeo, sawdustMat);
  speck2.name = 'speck';
  speck2.position.set(0.0125, 0.002, 0.0778);
  speck2.rotation.set(0, deg(43.3062), 0);
  root.add(speck2);
  const speck3 = new THREE.Mesh(boxGeo, sawdustMat);
  speck3.name = 'speck';
  speck3.position.set(0.136, 0.002, -0.2829);
  speck3.rotation.set(0, deg(23.6931), 0);
  root.add(speck3);
  const speck4 = new THREE.Mesh(boxGeo, sawdustMat);
  speck4.name = 'speck';
  speck4.position.set(0.1558, 0.002, -0.2631);
  speck4.rotation.set(0, deg(7.5234), 0);
  root.add(speck4);
  const speck5 = new THREE.Mesh(boxGeo, sawdustMat);
  speck5.name = 'speck';
  speck5.position.set(0.2041, 0.002, -0.094);
  speck5.rotation.set(0, deg(71.4359), 0);
  root.add(speck5);
  const speck6 = new THREE.Mesh(boxGeo, sawdustMat);
  speck6.name = 'speck';
  speck6.position.set(0.2539, 0.002, -0.1858);
  speck6.rotation.set(0, deg(62.1523), 0);
  root.add(speck6);
  const saw = new THREE.Group();
  saw.name = 'saw';
  saw.position.set(0.14, 0.3104, 0.2443);
  saw.rotation.set(deg(-18), deg(90), 0);
  root.add(saw);
  const blade = new THREE.Mesh(extrude([[-0.01, 0], [0.02, 0], [0.0336, -0.0105], [0.0389, 0], [0.0526, -0.0105], [0.0579, 0], [0.0715, -0.0105], [0.0768, 0], [0.0904, -0.0105], [0.0957, 0], [0.1093, -0.0105], [0.1146, 0], [0.1283, -0.0105], [0.1336, 0], [0.1472, -0.0105], [0.1525, 0], [0.1661, -0.0105], [0.1714, 0], [0.1851, -0.0105], [0.1904, 0], [0.204, -0.0105], [0.2093, 0], [0.2229, -0.0105], [0.2282, 0], [0.2418, -0.0105], [0.2471, 0], [0.2608, -0.0105], [0.2661, 0], [0.2797, -0.0105], [0.285, 0], [0.2986, -0.0105], [0.3039, 0], [0.3176, -0.0105], [0.3229, 0], [0.3365, -0.0105], [0.3418, 0], [0.3554, -0.0105], [0.3607, 0], [0.3743, -0.0105], [0.3796, 0], [0.3933, -0.0105], [0.3986, 0], [0.4122, -0.0105], [0.4175, 0], [0.4311, -0.0105], [0.4364, 0], [0.4501, -0.0105], [0.4554, 0], [0.469, -0.0105], [0.4743, 0], [0.4879, -0.0105], [0.4932, 0], [0.5068, -0.0105], [0.5121, 0], [0.5258, -0.0105], [0.5311, 0], [0.5447, -0.0105], [0.55, 0], [0.554, 0.085], [0.538, 0.09], [-0.01, 0.13]], 0.003), bladeMat);
  blade.name = 'blade';
  saw.add(blade);
  const handle = new THREE.Mesh(extrude([[0.04, -0.004], [-0.04, -0.012], [-0.115, -0.024], [-0.135, -0.005], [-0.122, 0.022], [-0.135, 0.07], [-0.152, 0.125], [-0.148, 0.16], [-0.115, 0.175], [-0.075, 0.162], [-0.03, 0.148], [0.04, 0.142]], 0.016, [[[-0.0601, 0.0785], [-0.076, 0.1058], [-0.093, 0.1133], [-0.1013, 0.0966], [-0.0959, 0.0655], [-0.08, 0.0382], [-0.063, 0.0307], [-0.0547, 0.0474]]], [0.004, 0.003, 1]), handleMat);
  handle.name = 'handle';
  saw.add(handle);
  const screw = new THREE.Mesh(cylinderGeo3, brassMat);
  screw.name = 'screw';
  screw.position.set(0.018, 0.03, 0);
  screw.rotation.set(deg(90), 0, 0);
  saw.add(screw);
  const screw2 = new THREE.Mesh(cylinderGeo3, brassMat);
  screw2.name = 'screw';
  screw2.position.set(0.018, 0.112, 0);
  screw2.rotation.set(deg(90), 0, 0);
  saw.add(screw2);
  const screw3 = new THREE.Mesh(cylinderGeo3, brassMat);
  screw3.name = 'screw';
  screw3.position.set(-0.03, 0.128, 0);
  screw3.rotation.set(deg(90), 0, 0);
  saw.add(screw3);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createHandSaw;
```

---
Codels — 3D models as code for three.js. Search more: https://codels.download/api/v1/models?q=<query> · Guide: https://codels.download/llms.txt
