Skip to content

MakePath64 very slow #3

Description

@FishOrBear
        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);
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions