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

Compatibility #1

Open
JLundberg65 opened this issue Feb 1, 2021 · 5 comments
Open

Compatibility #1

JLundberg65 opened this issue Feb 1, 2021 · 5 comments

Comments

@JLundberg65
Copy link

Hello,
I really like the feasibility of your slicing routine as a hatch fill. I have a project I'm playing with that's in Visual Studio C and C++. Since I'm not using Ubuntu and its dependencies, is it possible to make a version that would compile in Visual Studio?

John.

@CaseySanchez
Copy link
Owner

CaseySanchez commented Feb 20, 2021

It ought to sans Cairo and the main.cpp program provided; the core Mandoline library itself should compile so long as you can manage to link your program to Eigen, which can be found here: https://eigen.tuxfamily.org/index.php?title=Main_Page

Note that I have not tried to build on Windows, but I am certain it should.

@JLundberg65
Copy link
Author

JLundberg65 commented Feb 20, 2021 via email

@CaseySanchez
Copy link
Owner

CaseySanchez commented Feb 20, 2021

By "height" and "width" are you referring to two dimensions? This is dependent upon the complexity of the objects, increasing calculation time given the number of total sides to be compared against. When I get the chance I'd be happy to create & slice 30 20-sided polygons embedded in a rectangle at those specifications and report to you my findings.

EDIT: Also, changing the angle is simply a matter of applying an affine transformation via the "Transform" heuristic to the "Graph" to be sliced.

@JLundberg65
Copy link
Author

JLundberg65 commented Feb 20, 2021 via email

@CaseySanchez
Copy link
Owner

CaseySanchez commented Feb 21, 2021

Certainly, please contact me at [redacted]

https://i.imgur.com/Kk5hQ7F.png

This took 1283ms, which certainly is not the most performant, nor does it create an optimal path. It could stand to be optimized in various aspects I'm sure. Bear in mind this was designed for primitive robot path planning.

Mandoline works by utilizing the even-odd rule (https://en.wikipedia.org/wiki/Even%E2%80%93odd_rule), which requires a set of line segments. It may be possible to approximate Bezier curves using line segments to your desired precision to achieve a similar effect.

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

No branches or pull requests

2 participants