Skip to content

Calling the difference function did not yield the correct result #500

Answered by AngusJohnson
YangQiBoy asked this question in Q&A
Discussion options

You must be logged in to vote

In clipper.engine.cpp @ 1525ff, amend (as shown) the last line of the following method:

inline void ClipperBase::UpdateEdgeIntoAEL(Active* e)
  {
    e->bot = e->top;
    e->vertex_top = NextVertex(*e);
    e->top = e->vertex_top->pt;
    e->curr_x = e->bot.x;
    SetDx(*e);
    if (IsJoined(*e)) Split(*e, e->bot);
    if (IsHorizontal(*e)) return;
    InsertScanline(e->top.y);
    CheckJoinLeft(*e, e->bot);
    CheckJoinRight(*e, e->bot, true); //nb: 3rd param = true!
  }

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@YangQiBoy
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@YangQiBoy
Comment options

Answer selected by YangQiBoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants