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

Problems with several linesites outgoing from the same pointsite #25

Open
Rogach opened this issue Feb 26, 2015 · 1 comment
Open

Problems with several linesites outgoing from the same pointsite #25

Rogach opened this issue Feb 26, 2015 · 1 comment

Comments

@Rogach
Copy link
Contributor

Rogach commented Feb 26, 2015

Simple testcase:

    ovd::Point p1(0.0, 0.0);
    ovd::Point p2(-0.5, 0);
    ovd::Point p3(0.5, 0);
    ovd::Point p4(0, 0.5);

    int v1 = vd->insert_point_site(p1);
    int v2 = vd->insert_point_site(p2);
    int v3 = vd->insert_point_site(p3);
    int v4 = vd->insert_point_site(p4);

    vd->insert_line_site(v1, v2);
    vd->insert_line_site(v1, v3);
    vd->insert_line_site(v1, v4);

Output:

voronoidiagram.cpp:1563: void ovd::VoronoiDiagram::add_edges(ovd::HEFace, ovd::HEFace, ovd::HEFace, std::pair<void*, void*>): Assertion `(new_count % 2) == 0' failed.

Almost any set of coordinates resembling these also fails, but with another problem:

    ovd::Point p1(0.002, 0.030);
    ovd::Point p2(-0.473, 0.099);
    ovd::Point p3(0.571, 0.008);
    ovd::Point p4(0.100, 0.524);

    int v1 = vd->insert_point_site(p1);
    int v2 = vd->insert_point_site(p2);
    int v3 = vd->insert_point_site(p3);
    int v4 = vd->insert_point_site(p4);

    vd->insert_line_site(v1, v2);
    vd->insert_line_site(v1, v3);
    vd->insert_line_site(v1, v4);

gives:

voronoidiagram.cpp:1216: void* ovd::VoronoiDiagram::find_seed_vertex(ovd::HEFace, ovd::Site*): Assertion `minPred < 0' failed.
@aewallin
Copy link
Owner

yes, these are called "spikes" in the Held papers, and I remember that I
got some very simple example to work, but then did not have time to look at
this further.
For e.g. cnc-milling of pockets these "spikes" are not very relevant
because any pocket or an 'island' contained within the pocket is just a
simple polygon and does not contain a spike.
It would be a useful addition to support spikes however. The logic is much
the same as for line-sites, but the handling of the end-point and insertion
of separator-edges (often no separator should be added) is different.

On Thu, Feb 26, 2015 at 8:12 PM, Rogach [email protected] wrote:

Simple testcase:

ovd::Point p1(0.0, 0.0);
ovd::Point p2(-0.5, 0);
ovd::Point p3(0.5, 0);
ovd::Point p4(0, 0.5);

int v1 = vd->insert_point_site(p1);
int v2 = vd->insert_point_site(p2);
int v3 = vd->insert_point_site(p3);
int v4 = vd->insert_point_site(p4);

vd->insert_line_site(v1, v2);
vd->insert_line_site(v1, v3);
vd->insert_line_site(v1, v4);

Output:

voronoidiagram.cpp:1563: void ovd::VoronoiDiagram::add_edges(ovd::HEFace, ovd::HEFace, ovd::HEFace, std::pair<void*, void*>): Assertion `(new_count % 2) == 0' failed.

Almost any set of coordinates resembling these also fails, but with
another problem:

ovd::Point p1(0.002, 0.030);
ovd::Point p2(-0.473, 0.099);
ovd::Point p3(0.571, 0.008);
ovd::Point p4(0.100, 0.524);

int v1 = vd->insert_point_site(p1);
int v2 = vd->insert_point_site(p2);
int v3 = vd->insert_point_site(p3);
int v4 = vd->insert_point_site(p4);

vd->insert_line_site(v1, v2);
vd->insert_line_site(v1, v3);
vd->insert_line_site(v1, v4);

gives:

voronoidiagram.cpp:1216: void* ovd::VoronoiDiagram::find_seed_vertex(ovd::HEFace, ovd::Site*): Assertion `minPred < 0' failed.


Reply to this email directly or view it on GitHub
#25.

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