Skip to content
New issue

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

Shape dimensions are not calculated correctly for path-shapes with multiple sub-paths #40

Open
redremus opened this issue Apr 19, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@redremus
Copy link

I wanted to pour a shape mutiple sub-paths, as seen in the image.
image
Unfortunately the shape got placed off center even if loctation is [0,0].
I tracked the problem down to an erroneous behaviour of SvgPath._getDimensions() for multi-shape paths:

from pcbmode.utils import svgpath
path = " M 10,-10 L 0,-10 L 0,-0 L 10,-0 z M 25,-10 L 15,-10 L 15,-0 L 25,-0 z M 40,-10 L 30,-10 L 30,-0 L 40,-0 z M 55,-10 L 45,-10 L 45,-0 L 55,-0 z"
svgp = svgpath.SvgPath(path)
print svgp._getDimensions(svgp._relative_parsed)

>>(55.0, 40.0)

@saardrimer
Copy link
Contributor

I'm starting to work on the next version of PCBmodE at branch cinco-master. I'll look at this issue -- I know that there is one! -- during this work. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants