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

Issue hatching areas with nested shapes #826

Closed
kostic2000 opened this issue Oct 3, 2016 · 4 comments
Closed

Issue hatching areas with nested shapes #826

kostic2000 opened this issue Oct 3, 2016 · 4 comments
Assignees
Labels
bug An error which causes unexpected or unintended results

Comments

@kostic2000
Copy link

When trying to hatch a shape that has another enclosed shape, in some cases the fill is incorrect. It seems that some sharp edges make a difference, but not 100% sure.
Attached is an example DXF, where the areas are letters of a particular font converted to curves (by doing Explode).

Original drawing:
hatch_letters

Select all curves of one letter at a time and do a solid hatch. Here is what I get:
hatch_issue

And here what I expected to get:
hatch_expected

Source DXF supplied in the zip
hatch_issue.zip

@r-a-v-a-s
Copy link
Member

It's reproducible simply by creating a rectangle inside another rectangle.

@r-a-v-a-s r-a-v-a-s added the bug An error which causes unexpected or unintended results label Oct 31, 2016
@FelixHoepke
Copy link

FelixHoepke commented Jan 12, 2017

optimizeContours() isn't evolved enough yet to cope with selected, non-closing entities. (a workaround is to split the hatch-areas into individual non-intersecting ones.) ravas, could you please assign me (-assuming that's the way to do it) and i try beef it up

@lordofbikes lordofbikes self-assigned this Jan 12, 2017
@lordofbikes
Copy link
Member

@FelixNotTheCat you're welcome to work on this, but assigning is prohibited to team members.
So I assigned myself to give you the chance to work on it.
The recommend way is to fork LibreCAD and work on your own fork. Then we can discuss solutions there and finally create a pull request that we can merge your solution.

If you hit any issues, don't hesitate to ask here. Thanks for your contribution.

@FelixHoepke
Copy link

@lordofbikes many thanks Armin -simply don't want to step on others' toes, or do redundant work. Pls see today's LibreCAD/ commit (i.e. rs_hatch.cpp and rs_entitycontainer.cpp). It's far from a complete (hatch) solution but addresses issues such as highlighted by kostic2000; your/LC team's critiscm/comments/feedback etc is much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error which causes unexpected or unintended results
Projects
None yet
Development

No branches or pull requests

4 participants