microsoft / microsoft/maker.js

Need help with design

Open
#593 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2k
Forks
302
Avg merge
21h 28m
Merged PRs (30d)
5

Description

image

I'm unable to find solution any where hence posting here.
I want to make highlighted portion smooth, radius should be 120.
My design is combination of Elliptic Arc, Arc, and line. I want all to be seamless smooth. I've used hard coded values for demonstration purposes.

code

var makerjs = require('makerjs');

function demo(startAngle, endAngle, radiusX, radiusY) {
  
  var example = new makerjs.models.EllipticArc(startAngle, endAngle, radiusX, radiusY);

  
  
  var arc = new makerjs.paths.Arc([35.00000002352587,-69.28203202838824], [20, -89], 120, false, false);
  
  var line1 = new makerjs.paths.Line([20,-89.00000002838823], [18.00000002352587,-109.28203202838823]);
  
  makerjs.model.addPath(example, arc, 'arc');
  makerjs.model.addPath(example, line1, 'line');
  
  var fillet = makerjs.chain.fillet(
     makerjs.model.findSingleChain(example),
     120
   );
  
//  var fillet1 = new makerjs.path.fillet(arc, line1, 20);
    
    this.models = {
     example: example,
      fillet: fillet
    };

}

demo.metaParameters = [
  { title: "startAngle", type: "range", min: 0, max: 90, value: 300 },
  { title: "endAngle", type: "range", min: 90, max: 360, value: 240 },
  { title: "radiusX", type: "range", min: 1, max: 50, value: 70 },
  { title: "radiusY", type: "range", min: 1, max: 50, value: 80 }
];

module.exports = demo;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the example using makerjs.models.EllipticArc, makerjs.paths.Arc, makerjs.paths.Line, and makerjs.chain.fillet. Inspect how findSingleChain handles the combined model and how the fillet radius is applied. The issue does not define the expected geometry beyond making the highlighted joins seamless with radius 120.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.