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

Apparently incorrect output using ParallelOffsetIslands #49

Open
esuig opened this issue Jan 27, 2022 · 1 comment
Open

Apparently incorrect output using ParallelOffsetIslands #49

esuig opened this issue Jan 27, 2022 · 1 comment

Comments

@esuig
Copy link

esuig commented Jan 27, 2022

Hello,

first of all, great work. Your library is impressive.

I'm starting using it to understand the potentialities.

I'm looking at the ParallelOffsetIslands. I created a small test in which I have three profiles (one outer profile and two islands). The coordinates of the profiles are as follows:

island 1:
(20,20)
(20,40)
(40,40)
(40,20)
IsClosed() = true;

island 2:
(60,30)
(60,80)
(80,80)
(80,30)
IsClosed() = true;

outer contour:
(0,0)
(100,0)
(100,100)
(0,100)
IsClosed() = true;

Then I followed exaclty the steps reported here:
https://github.com/jbuckmccready/CavalierContours/blob/master/examples/polylineoffsetislands.cpp

to perform the offset of the input profiles. However, I get a strange result that is (the blue profiles are the input ones, while the green are the output ones):
output_cavc_1
In the output I get 2 profiles (the smaller one and the bigger that includes both the offset of the bigger island and the offset of the outer contour), but I would expect 3 profiles if the coincident segments are not discarded.
Or, I would expect something like:
expected_output
Maybe I am missing something? or it is a bug?

@jbuckmccready
Copy link
Owner

It's a known limitation right now in the simultaneous/island offsetting where overlapping/coincident offset segments are not removed. I had planned to look into it more when I implement the simultaneous offset algorithm in the Rust project where I'm continuing development here.

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