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

Engraving #394

Merged
merged 4 commits into from May 13, 2019
Merged

Engraving #394

merged 4 commits into from May 13, 2019

Conversation

bcmpinc
Copy link
Contributor

@bcmpinc bcmpinc commented Apr 16, 2019

I mostly use solvespace for designing stuff that I then cut out using a laser cutter. For that purpose I always use the section export function. In the past I used Inkscape to add text or line segments, but I would prefer to be able to model these in solvespace, especially when positioning is important.

For custom line styles, there is an option "export these objects", which I hoped meant that these lines are included in the section export, but they aren't. This patch changes that, such that they are included. To get it to work properly I had to change some parts of the code for which I'm not sure whether I got them correct.

I don't know what "export these objects" is supposed to do, so I guess this is not entirely the right place for configuring a style for section export and that a new flag might be more appropriate.

Please let me know what you think of it.

P.S. I thought that it would be useful to add a way to disable the closed contour check for these custom line styles, but this is already possible by turning them into construction line segments (although those are visually indistinguishable).

src/export.cpp Outdated
@@ -92,8 +91,27 @@ void SolveSpaceUI::ExportSectionTo(const Platform::Path &filename) {
sb->auxA = Style::SOLID_EDGE;
}

el.CullExtraneousEdges();
bl.CullIdenticalBeziers();
el.CullExtraneousEdges(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have /*both=*/ here and elsewhere because it looks quite puzzling otherwise.

}
openContours->l.Add(loop);
} else {
loop->Clear();
Copy link
Contributor Author

@bcmpinc bcmpinc Apr 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is where the open loops used to be exploded into separate segments.

@whitequark whitequark merged commit 7d181f0 into solvespace:master May 13, 2019
@whitequark
Copy link
Contributor

@bcmpinc Thank you for the PR, and sorry for the delay in merging.

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

Successfully merging this pull request may close these issues.

None yet

2 participants