Menu

Like edge intersecion in Vatti --how many 4 or 8 ---

Ignorant
2020-02-06
2020-10-18
  • Ignorant

    Ignorant - 2020-02-06
     

    Last edit: Ignorant 2020-10-21
  • Jay Tee

    Jay Tee - 2020-02-06

    No, those kinds if intersections are impossible. That is a direct consequence of the definition of left / right edges: The inner area of the polygon is located to the right of a left edge (and vice versa). If a left edge intersected a left edge of the same polygon type (subject / clip), their definitions of inside / outside would contradict for the area between them.

     
    • Ignorant

      Ignorant - 2020-02-06

      Jay, what about self intersecting polygons ?do they have inside outside
      ?(odd/even winds only).

      On Thu, Feb 6, 2020 at 4:44 PM Jay Tee jay-tee@users.sourceforge.net
      wrote:

      No, those kinds if intersections are impossible. That is a direct
      consequence of the definition of left / right edges: The inner area of the
      polygon is located to the right of a left edge (and vice versa). If a left
      edge intersected a left edge of the same polygon type (subject / clip),
      their definitions of inside / outside would contradict for the area between
      them.


      Like edge intersecion in Vatti --how many 4 or 8 ---
      https://sourceforge.net/p/polyclipping/discussion/1148419/thread/4542a3b35b/?limit=25#5f29


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/polyclipping/discussion/1148419/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
    • Ignorant

      Ignorant - 2020-10-18

      I expectd that but …..
      I decided to put guards in the Boolean op codes I have..
      They fail.!
      What happens when one has multiple input polygons for both subject and Clip?.
      Sent from Mail for Windows 10

      From: Jay Tee
      Sent: 06 February 2020 16:44
      To: [polyclipping:discussion]
      Subject: [polyclipping:discussion] Like edge intersecion in Vatti --how many 4or 8 ---

      No, those kinds if intersections are impossible. That is a direct consequence of the definition of left / right edges: The inner area of the polygon is located to the right of a left edge (and vice versa). If a left edge intersected a left edge of the same polygon type (subject / clip), their definitions of inside / outside would contradict for the area between them.

      Like edge intersecion in Vatti --how many 4 or 8 ---

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/polyclipping/discussion/1148419/
      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

      --
      This email has been checked for viruses by Avast antivirus software.
      https://www.avast.com/antivirus

       
  • Jay Tee

    Jay Tee - 2020-02-06

    Yes, it is completely the same for self-intersecting polygons.

     
  • Ignorant

    Ignorant - 2020-02-07

    ?. What is the relation between Left/right of edge and side of edge ..?.I have a damaged clipper which gives proper output but testing for inequality of sides for ( e1 polygon type ==e2 polygon type) fails.filtering the intersection does NOT help.!

     
  • Jay Tee

    Jay Tee - 2020-02-07

    I'm afraid I don't understand your question. Left / Right are the two possible sides of an edge. That classification indicates if the edge is left or right to the interior of its original polygon (subject or clip).

     
    • Ignorant

      Ignorant - 2020-02-07

      I want to understand HOW we get the L/R labels of a edge.
      For Within Beam intersections sometimes ...
      e1->PolyType==e2->polytype but e1->side != e2->side fails.

       The code is mutated from  Angus clipper ..but works...so...!!??
      

      I confirm by area coverage of filled region in output with anothe on/off parity clipper...

      here is the code fragment :

      // ======Filter   lifted from clipperv2==============
          const bool e1_windcnt_in_01 = e1Wc == 0 || e1Wc == 1;
          const bool e2_windcnt_in_01 = e2Wc == 0 || e2Wc == 1;
          // ---Global Filter---
      

      if ((!e1IsHot && !e1_windcnt_in_01) || (!e2IsHot && !e2_windcnt_in_01))
      return;
      // =================================================
      if(e1->PolyTyp ==e2->PolyTyp)
      { //guard ----------------feb 2020--------------------------
      ///It seems that bound type and side are different attributes.....!@#$...
      if( e1->Side == e2->Side) //LC X LC,LS X LS RC X RC RS X RS should NOT occur ??
      { // within beam ?? Across scan line
      if(XWithinBeam)
      CLipperOut<< "poly sides unexpected"<<std::endl;
      // return;
      }
      }

       
  • Jay Tee

    Jay Tee - 2020-02-07

    Maybe the side attribute indicates (for contributing edges) if they form the left / right bound of their associated output polygon? That classification can differ from the actual bound type of the edge.

    And regarding your question on how to obtain the left / right bound type label: When a new minimum bound is inserted into the AEL, one counts the edges of the same polygon type (left / right) that precede the new bound. If their number is even, the first bound edge is labeled 'left' and the second one 'right'. Otherwise, those labels swap places.

     
  • Ignorant

    Ignorant - 2020-02-07

    Thanks. That will comfort me to switch off the guard at this spot.
    I am trying to get a good description of the edges which lead to vertices being added to output polygons bypassing the edge X edge intersections.[before horizon,after horizon,attopscanbeam..).
    If they are described properly then vattis method can be coded as a simple collection of rendering routines(for odd/even coding,Angus Windings NOT included).

     
  • Ignorant

    Ignorant - 2020-02-11

    What is special about the XOR command.I have a vatti like clipper in which the XOR works as indicated.BUT when I do edge budles the XOR bundles somehow deviate to indicate Left Intermediate/RIGht Intermediate (I ignrore both).The areal output covergae is still correct.For the
    other 3 boolean ops no extra commands are generated(within beam intersections).So I was wondering what is special about XOR.?
    Clipper2 has so much internal cleaning that it is (for me) scarry to trace what is happening for XOR within the Murta Quadrants..odd/even parity.