Update of /cvsroot/bprocessor//facade/src/net/sourceforge/bprocessor/facade/modellor
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12553/src/net/sourceforge/bprocessor/facade/modellor
Modified Files:
NetFacadeModellor.java
Log Message:
refactored angle from facade to Geometry
Index: NetFacadeModellor.java
===================================================================
RCS file: /cvsroot/bprocessor//facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** NetFacadeModellor.java 18 May 2007 19:07:27 -0000 1.32
--- NetFacadeModellor.java 20 May 2007 10:19:36 -0000 1.33
***************
*** 805,809 ****
private static Collection<Surface> makeExtrusion(Edge e1, Edge e2,
List<Edge> cutEdges) {
! double angle = angle(e1, e2);
Vertex shared = Edge.commonVertex(e1, e2);
Vertex i = e2.otherVertex(shared).minus(shared);
--- 805,809 ----
private static Collection<Surface> makeExtrusion(Edge e1, Edge e2,
List<Edge> cutEdges) {
! double angle = Geometry.angle(e1, e2);
Vertex shared = Edge.commonVertex(e1, e2);
Vertex i = e2.otherVertex(shared).minus(shared);
***************
*** 877,885 ****
Iterator<Edge> it = contour.iterator();
Edge current = it.next();
! double bottomAngle = angle(prev, current);
double topAngle;
while (it.hasNext()) {
next = (Edge)it.next();
! topAngle = angle(current, next);
Vertex origin = Edge.commonVertex(current, prev);
Vertex n = current.otherVertex(origin).minus(origin);
--- 877,885 ----
Iterator<Edge> it = contour.iterator();
Edge current = it.next();
! double bottomAngle = Geometry.angle(prev, current);
double topAngle;
while (it.hasNext()) {
next = (Edge)it.next();
! topAngle = Geometry.angle(current, next);
Vertex origin = Edge.commonVertex(current, prev);
Vertex n = current.otherVertex(origin).minus(origin);
***************
*** 896,900 ****
}
next = contour.get(0);
! topAngle = angle(current, next);
Vertex origin = Edge.commonVertex(current, prev);
Vertex n = current.otherVertex(origin).minus(origin);
--- 896,900 ----
}
next = contour.get(0);
! topAngle = Geometry.angle(current, next);
Vertex origin = Edge.commonVertex(current, prev);
Vertex n = current.otherVertex(origin).minus(origin);
***************
*** 1000,1014 ****
}
- private static double angle(Edge e1, Edge e2) {
- double angle = Double.NaN;
- Vertex common = Edge.commonVertex(e1, e2);
- if (common != null) {
- Vertex dir1 = e1.otherVertex(common).minus(common);
- Vertex dir2 = e2.otherVertex(common).minus(common);
- angle = dir1.angle(dir2);
- }
- return angle;
- }
-
/**
* Test if a surface is right hand turned around a vector
--- 1000,1003 ----
|