Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions common-tools/clas-jcsg/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
<groupId>java3d</groupId>
<artifactId>vecmath</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,9 @@
import static eu.mihosoft.vrl.v3d.ext.org.poly2tri.TriangulationUtil.smartIncircle;

import java.util.List;
import java.util.logging.Logger;

import eu.mihosoft.vrl.v3d.ext.org.poly2tri.TriangulationMode;
import eu.mihosoft.vrl.v3d.ext.org.poly2tri.TriangulationPoint;
import eu.mihosoft.vrl.v3d.ext.org.poly2tri.TriangulationUtil.Orientation;
import eu.mihosoft.vrl.v3d.ext.org.poly2tri.DelaunayTriangle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* Sweep-line, Constrained Delauney Triangulation (CDT) See: Domiter, V. and
Expand All @@ -86,7 +81,7 @@
*/
class DTSweep {

private final static Logger logger = LoggerFactory.getLogger(DTSweep.class);
private final static Logger logger = Logger.getLogger(DTSweep.class.getName());

private final static double PI_div2 = Math.PI / 2;
private final static double PI_3div4 = 3 * Math.PI / 4;
Expand Down Expand Up @@ -359,7 +354,7 @@ private static void edgeEvent(DTSweepContext tcx,

edgeEvent(tcx, edge.p, edge.q, node.triangle, edge.q);
} catch (PointOnEdgeException e) {
logger.warn("Skipping edge: {}", e.getMessage());
logger.warning(() -> "Skipping edge: "+e.getMessage());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.logging.Logger;

/**
*
Expand All @@ -70,7 +69,7 @@
*/
class DTSweepConstraint extends TriangulationConstraint
{
private final static Logger logger = LoggerFactory.getLogger( DTSweepConstraint.class );
private final static Logger logger = Logger.getLogger( DTSweepConstraint.class.getName() );

public TriangulationPoint p;
public TriangulationPoint q;
Expand Down Expand Up @@ -101,7 +100,7 @@ else if( p1.getY() == p2.getY() )
}
else if( p1.getX() == p2.getX() )
{
logger.info( "Failed to create constraint {}={}", p1, p2 );
logger.info(() -> "Failed to create constraint "+p1+"="+p2);
// throw new DuplicatePointException( p1 + "=" + p2 );
// return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,20 +60,16 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/


import java.util.ArrayDeque;
import java.util.Collections;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import java.util.logging.Logger;

/**
* @author Thomas ??? (thahlen@gmail.com)
*/
class DTSweepContext extends TriangulationContext<DTSweepDebugContext>
{
private final static Logger logger = LoggerFactory.getLogger( DTSweepContext.class );
private final static Logger logger = Logger.getLogger( DTSweepContext.class.getName() );

// Inital triangle factor, seed triangle will extend 30% of
// PointSet width to both left and right.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
import java.util.ArrayList;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.logging.Logger;

class DelaunayTriangle
{
private final static Logger logger = LoggerFactory.getLogger( DelaunayTriangle.class );
private final static Logger logger = Logger.getLogger( DelaunayTriangle.class.getName() );

/** Neighbor pointers */
public final DelaunayTriangle[] neighbors = new DelaunayTriangle[3];
Expand Down Expand Up @@ -160,7 +157,7 @@ else if( ( p1 == points[0] && p2 == points[1] ) || ( p1 == points[1] && p2 == po
}
else
{
logger.error( "Neighbor error, please report!" );
logger.severe( "Neighbor error, please report!" );
// throw new Exception("Neighbor error, please report!");
}
}
Expand All @@ -185,7 +182,7 @@ else if( t.contains( points[0], points[1] ) )
}
else
{
logger.error( "markNeighbor failed" );
logger.severe( "markNeighbor failed" );
}
}

Expand Down Expand Up @@ -295,7 +292,7 @@ else if( point == points[2] )
{
return points[0];
}
logger.error( "point location error" );
logger.severe( "point location error" );
throw new RuntimeException("[FIXME] point location error");
}

Expand All @@ -314,7 +311,7 @@ else if( point == points[2] )
{
return points[1];
}
logger.error( "point location error" );
logger.severe( "point location error" );
throw new RuntimeException("[FIXME] point location error");
}

Expand All @@ -341,7 +338,7 @@ else if( oPoint == points[2] )
}
else
{
logger.error( "legalization error" );
logger.severe( "legalization error" );
throw new RuntimeException("legalization bug");
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.logging.Logger;

class Poly2Tri
{
private final static Logger logger = LoggerFactory.getLogger( Poly2Tri.class );
private final static Logger logger = Logger.getLogger( Poly2Tri.class.getName() );

private static final TriangulationAlgorithm _defaultAlgorithm = TriangulationAlgorithm.DTSweep;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,11 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.logging.Logger;

class Polygon implements Triangulatable
{
private final static Logger logger = LoggerFactory.getLogger( Polygon.class );
private final static Logger logger = Logger.getLogger( Polygon.class.getName() );

protected ArrayList<TriangulationPoint> _points = new ArrayList<TriangulationPoint>();
protected ArrayList<TriangulationPoint> _steinerPoints;
Expand Down Expand Up @@ -110,7 +108,7 @@ public Polygon( List<PolygonPoint> points )
// Its something that often happen when importing polygon data from other formats
if( points.get(0).equals( points.get(points.size()-1) ) )
{
logger.warn( "Removed duplicate point");
logger.warning( "Removed duplicate point");
points.remove( points.size()-1 );
}
_points.addAll( points );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,7 @@
import java.lang.Thread.State;
import java.util.ArrayList;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;



import java.util.logging.Logger;

/**
*
Expand All @@ -75,7 +71,7 @@
*/
class TriangulationProcess implements Runnable
{
private final static Logger logger = LoggerFactory.getLogger( TriangulationProcess.class );
private final static Logger logger = Logger.getLogger(TriangulationProcess.class.getName());

private final TriangulationAlgorithm _algorithm;

Expand Down Expand Up @@ -261,15 +257,15 @@ public void run()
Poly2Tri.triangulate( _tcx );
}
_triangulationTime = ( System.nanoTime() - time ) / 1e6;
logger.info( "Triangulation of {} points [{}ms]", _pointCount, _triangulationTime );
logger.info(() -> "Triangulation of "+_pointCount+" points ["+_triangulationTime+"ms]");
sendEvent( TriangulationProcessEvent.Done );
}
catch( RuntimeException e )
{
if( _awaitingTermination )
{
_awaitingTermination = false;
logger.info( "Thread[{}] : {}", _thread.getName(), e.getMessage() );
logger.info(() -> "Thread["+_thread.getName()+")] : "+e.getMessage() );
sendEvent( TriangulationProcessEvent.Aborted );
}
else
Expand All @@ -281,7 +277,7 @@ public void run()
catch( Exception e )
{
e.printStackTrace();
logger.info( "Triangulation exception {}", e.getMessage() );
logger.info(() -> "Triangulation exception "+e.getMessage());
sendEvent( TriangulationProcessEvent.Failed );
}
finally
Expand Down
Loading