
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
replicad-threads
Advanced tools
A small library to build threads using replicad.
This is a library based on replicad.
This library contains a set of helpers to create thread for your 3D models.
This module can be used either as a library:
pnpm install replicad-threads
You can also import it within the replicad studio:
import { makeThread } from "https://cdn.jsdelivr.net/npm/replicad-threads@latest/dist/studio/replicad-threads.js";
/** @typedef { typeof import("replicad") } replicadLib */
/** @type {replicadLib} */
const { makeCylinder } = replicad;
export default function main() {
const thread = makeThread({
pitch: 5,
radius: 10,
height: 20,
rootWidth: 3,
apexWidth: 1,
toothHeight: 1,
});
return thread.translate(0, 0, 1).fuse(makeCylinder(10, 22));
}
makeThread({ pitch, radius, height, rootWidth, apexWidth, toothHeight })Creates a thread shape. The thread is a helix with a trapezoidal profile, with the following parameters:
pitch: the distance between two consecutive threads.radius: the base radius of the thread.height: the height of the thread.rootWidth: the width of the thread profile at the root (the radius)apexWidth: the width of the thread profile at the apex (the radius + toothHeight)toothHeight: the height of the tooth. A negative value will create an internal thread.This thread will get small at the beginning and end of the thread. There are additional function to create alternative shapes:
makeRawThread: creates a thread with a blunt end.makeChamferedThread: creates a thread with a chamfered end.trapezoidalThreadConfig(pitch, threadAngle, external: true)Creates a partial configuration (you need to provide the radius and the height).
trapezoidalThreadConfigConjugate(threadConfig, clearance)Creates a conjugate thread configuration. This is useful to create the corresponding internal thread from an external one (or vice versa). You can add an offset which will be added to the radius to allow for some tolerance.
metricThreadConfig(name, height, external, clearance)Creates a thread configuration for a metric thread. The name is the name of
the thread (e.g. "M6") and the height is the height of the thread. Note that
external and internal threads have different configurations, you will use this
function with external: true for external threads and external: false for
internal threads.
addClearance(threadConfig, clearance)Adds a clearance to a thread configuration. This is useful to create a thread that will fit into another one (especially for 3D printing). This function is used by the previous ones if you specify a clearance.
You can find a full example in the ./example directory. See what it
look here.
FAQs
Helper function to create threads using replicad
We found that replicad-threads demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.