Comments (8)
crash data
Original comment by buckyballreaction
on 24 Oct 2013 at 11:02
Attachments:
from poly2tri.
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.
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.
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.
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.
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.
Original comment by [email protected]
on 21 Nov 2013 at 9:21
- Changed state: Invalid
from poly2tri.
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)
- Java source unbuildable in 1.7+
- Build failed when compliling with -we4715
- Java findbugs - nullcheck of value previously dereferenced HOT 1
- [java] Tessellation with hole error HOT 4
- Polygon with hole HOT 10
- [java] Missing triangle in non-constrained delaunay HOT 3
- Problem building library
- the EPSILON value is not exported in the python/cython version HOT 1
- CMake build script
- Inconsistent behavior with holes that share a point HOT 17
- add typedef for "double"
- add typedef for std::vector<Point*>, std::vector<Triangle*> and other containers
- Triangulate crashes in sweep.cc:703 HOT 3
- java version compile error HOT 3
- Polygon.getHoles() missing HOT 5
- poly2tri crashes on a very simple geometry HOT 1
- crash with attached polygon HOT 2
- Crash when triangulating a polygon HOT 1
- crash with square polygon HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poly2tri.