microsoft / microsoft/maker.js

Issue with Converting SVG Path to Model and Distortion Creating Multiple Models

Open
#595 0 comments 0 reactions 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

I am experiencing an issue with converting an SVG path to a model using the library. After distorting the base model, it creates multiple models instead of a single one. Additionally, the original endless shape becomes non-endless after distortion.
svgPath.txt

// SVG Path data added as an attachment
const svgPath =above file svgPath.txt has path;

// Convert SVG path to model
const baseModel = importer.fromSVGPathData(svgPath);

// Distort the model
let newModel = model.distort(baseModel, 0.21619089656166393, 0.21619089656166393);

Issue Details:

  1. Importing a single SVG path and creating a base model.
  2. After distortion, multiple models are created.
  3. The base model was an endless shape but becomes non-endless after distortion.

Expected Behavior:

  1. The model should remain a single entity after distortion same and the endless shape should be preserved.

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 with the attached svgPath.txt and reproduce the case using importer.fromSVGPathData, then call model.distort with the values shown. Compare the resulting model count and whether the shape remains endless; done means distortion preserves one model and the endless shape.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.