Skip to content

Easily divided by zero in 45 degrees GDS patterns #4

@arided02

Description

@arided02

Line 153 to 156:
length_ij = np.linalg.norm(normal_ij, axis=1)
length_ik = np.linalg.norm(normal_ik, axis=1)
normal_ij /= np.stack((length_ij, length_ij), axis=1)
normal_ik /= np.stack((length_ik, length_ik), axis=1)
The length_ij and length_ik are easily be zero in offgrid alogn the 45 degrees hypotenuse. Request to add 0.000000001 prevent divided by zero.
length_ij = np.linalg.norm(normal_ij, axis=1)+0.00000001
length_ik = np.linalg.norm(normal_ik, axis=1)+0.00000001
normal_ij /= np.stack((length_ij, length_ij), axis=1)
normal_ik /= np.stack((length_ik, length_ik), axis=1)
To do so, I can easily to translate irregular patterns.

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