Skip to content

Bug in offset? #172

Nov 8, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The offset of a projection is something that is prone to errors - as offsets for Bézier do not work great (as of now).

Could you do the offset on the sketch step?

const { drawCircle } = replicad;

const main = () => {  
  const circle1 = drawCircle(20);
  const circle2 = drawCircle(30);

  const together = circle2.cut(circle1);

  return [
    circle2.offset(2).cut(circle2.offset(-2)),
    {shape: together.translate(100), color: "red"}
  ]
};

direct link

I am working on better offsets for Bézier, but for pantograph - which should become the draw level API for replicad.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@BarbourSmith
Comment options

Answer selected by BarbourSmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants