Skip to content

sgenoud/replicad-shrink-wrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replicad shrink wrap

This is a library based on replicad.

This library contains a set of helpers to shrink wrap a drawing. This corresponds to the hull operation in some CAD software.

As a library

This module can be used either as a library:

pnpm install replicad-shrink-wrap

Within the replicad studio

You can also import it within the replicad studio:

import shrinkWrap from "https://cdn.jsdelivr.net/npm/replicad-shrink-wrap/dist/studio/replicad-shrink-wrap.js";
/** @typedef { typeof import("replicad") } replicadLib */
/** @type {replicadLib} */
const { drawRoundedRectangle, drawCircle, draw } = replicad;

export default function main() {
  const circle = drawCircle(7).translate(8, 18);
  const rect = drawRoundedRectangle(20, 14, 5);

  return [
    { shape: rect, color: "silver" },
    { shape: circle, color: "silver" },
    shrinkWrap(rect.fuse(circle), 50),
  ];
}

Go an play with it there

About

A replicad library to create a hull out of drawings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published