We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
const { MakePath64, Paths64, FillRule, Union64 } = MainModule for (let i = 0; i < 10000; i++) { let a = [-5070000, -23550000, 7710000, -23550000, 7710000, 22590000, -5070000, 22590000]; let b = [0, 0, 7140200, 0, 7140200, 860200, 0, 860200]; const subject = new Paths64(); const clip = new Paths64(); const combinedNfp1 = Union64(subject, clip, FillRule.NonZero); subject.push_back(MakePath64(a)); const subject1 = new Paths64(); subject1.push_back(MakePath64(b)); let finalNfp1 = clipperCpp.lib2.Difference64(subject1, combinedNfp1, FillRule.NonZero); let fnfp = []; for (let i = 0; i < finalNfp1.size(); i++) { let path = finalNfp1.get(i); path.size(); let arr = []; for (let j = 0; j < path.size(); j++) { let p = path.get(j); arr.push({ x: p.x, y: p.y }); } fnfp.push(arr); } // console.log(fnfp); }
The text was updated successfully, but these errors were encountered:
Data transfer from js->cpp should be avoided as much as possible, and should be transferred once.
Sorry, something went wrong.
Hi @FishOrBear , could you see if the changes in: #5 Improve the performance for you?
If this works I can replace the original MakePath with the new improved one.
No branches or pull requests
The text was updated successfully, but these errors were encountered: