Code Monkey home page Code Monkey logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
crash data

Original comment by buckyballreaction on 24 Oct 2013 at 11:02

Attachments:

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I get this when I run it in my latest codebase for Java.

Skipping edge: Intersecting Constraints : 
[-3882000.0,7191000.0],[-3875026.0,7153693.0] intersects 
[-3883360.0,7168352.0],[-3876543.0,7172961.0]
Skipping edge: Intersecting Constraints : 
[-3846561.0,7193229.0],[-3840166.0,7189498.0] intersects 
[-3882000.0,7191000.0],[3776000.0,7191000.0]

So my guess is that one constraint(edge) from the hole intersects with the 
polygon hull.

This is a dataset that has been processed by clipper?

To detect these issues in the c++ code add a test here:

void Sweep::FlipEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle* t, 
Point& p)
{
  Triangle& ot = t->NeighborAcross(p);
  Point& op = *ot.OppositePoint(*t, p);

// My java code
        if( t.getConstrainedEdgeAcross(p) )
        {
            int index = t.index( p );
            throw new TriangulationException( "Intersecting Constraints : "+ 
                                              p +","+ op
                                              +" intersects "+
                                              t.points[(index+1)%3] 
                                              +","+ 
                                              t.points[(index+2)%3]);            
        }

and you will have to add

    public boolean getConstrainedEdgeAcross( final TriangulationPoint p )
    {
        if( p == points[0] )
        {
            return cEdge[0];
        }
        else if( p == points[1] )
        {
            return cEdge[1];
        }
        return cEdge[2];
    }

to Triangle

Original comment by [email protected] on 25 Oct 2013 at 10:11

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
Just looking at the holes point values I can see that some are outside the 
rectangular polygon hull. So something fishy is going on with the clipping.

Original comment by [email protected] on 25 Oct 2013 at 10:23

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I make an assumption the you wiggled the intersection points? That could 
explain why they end up outside the polygon.

Clipper v6 enforces strictly simple polygons:

http://sourceforge.net/p/polyclipping/discussion/1148419/thread/813a62c8/?limit=
50

Maybe upgrading to it can help?

Original comment by [email protected] on 25 Oct 2013 at 10:32

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
You are absolutely correct.  We had rare-case in the game where a hole could 
have a point outside of the outer hull.  

This was our code problem.  Thank you very much for that code that detected the 
bad points.  Is that standard in the Java version?  Maybe I should use that 
port for debugging...

Thanks again!

Original comment by buckyballreaction on 25 Oct 2013 at 4:42

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I realized that this simple test could be made sometime after the inital 
release of Poly2Tri so don't really know if it has been ported to other 
version. It just handle some invalid input a bit more gentle.

But apart from this there shouldn't be many differences in the Java and other 
code bases in the core triangulation classes.

I always try to help if someone get stuck on some invalid data :)

Original comment by [email protected] on 25 Oct 2013 at 6:05

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024

Original comment by [email protected] on 21 Nov 2013 at 9:21

  • Changed state: Invalid

from poly2tri.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 22, 2024
I added this additional Java check in the JavaScript version

Original comment by [email protected] on 25 Nov 2013 at 10:05

from poly2tri.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.