Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8728/src/net/sourceforge/bprocessor/gl/tool
Modified Files:
AbstractPencil.java
Log Message:
Attempt to fix problem with orthogonal constructor Ð not fixed
Index: AbstractPencil.java
===================================================================
RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** AbstractPencil.java 5 May 2006 14:08:38 -0000 1.29
--- AbstractPencil.java 8 May 2006 08:53:14 -0000 1.30
***************
*** 377,401 ****
glv.getView().changeColor(parrallel, new float[] {255f / 255f, 153f / 255f, 0});
constructors.add(parrallel);
!
! Plane xy = new Plane(0, 0, 1, 0);
! CoordinateSystem system = xy.coordinateSystem();
! Vertex direction = parrallel.getDirection();
! direction = system.translate(direction);
! double x = direction.getX();
! double y = direction.getY();
! direction.setX(-y);
! direction.setY(x);
! system.unTranslate(direction);
! direction.scale(50 / direction.length());
! Edge orthogonal = null;
! if (start != null) {
! orthogonal = new Edge(start.vertex().minus(direction), start.vertex().add(direction));
! } else {
! if (incident != null) {
! orthogonal = new Edge(incident.vertex().minus(direction),
! incident.vertex().add(direction));
! }
}
! if (orthogonal != null) {
orthogonal.setConstructor(true);
glv.getView().changeColor(orthogonal, new float[] {255f / 255f, 153f / 255f, 0});
--- 377,409 ----
glv.getView().changeColor(parrallel, new float[] {255f / 255f, 153f / 255f, 0});
constructors.add(parrallel);
! }
! Plane plane;
!
! if (View.getLastSurface() != null) {
! plane = View.getLastSurface().plane();
! } else {
! plane = new Plane(0, 0, 1, 0);
! }
!
! CoordinateSystem system = plane.coordinateSystem();
! Vertex direction = parrallel.getDirection();
! direction = system.translate(direction);
! double x = direction.getX();
! double y = direction.getY();
! direction.setX(-y);
! direction.setY(x);
! system.unTranslate(direction);
! direction.scale(50 / direction.length());
! Edge orthogonal = null;
! if (start != null) {
! orthogonal = new Edge(start.vertex().minus(direction), start.vertex().add(direction));
! } else {
! if (incident != null) {
! orthogonal = new Edge(incident.vertex().minus(direction),
! incident.vertex().add(direction));
}
! }
! if (orthogonal != null) {
! if (!isAxisAligned(orthogonal)) {
orthogonal.setConstructor(true);
glv.getView().changeColor(orthogonal, new float[] {255f / 255f, 153f / 255f, 0});
|