bprocessor-commit Mailing List for B-processor (Page 159)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Jesper P. <je...@us...> - 2005-09-23 06:53:18
|
Update of /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel/notification In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20606/src/net/sourceforge/bprocessor/kernel/notification Modified Files: Notifier.java Log Message: Added support for both async (default) and sync notifications Index: Notifier.java =================================================================== RCS file: /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel/notification/Notifier.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Notifier.java 17 Aug 2005 10:08:08 -0000 1.3 --- Notifier.java 23 Sep 2005 06:53:10 -0000 1.4 *************** *** 7,13 **** --- 7,15 ---- package net.sourceforge.bprocessor.kernel.notification; + import java.io.FileInputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; + import java.util.Properties; import org.apache.log4j.Logger; *************** *** 23,26 **** --- 25,31 ---- private static Notifier instance; + /** Use async communication */ + private boolean async; + /** The listeners */ private List listeners; *************** *** 31,34 **** --- 36,56 ---- private Notifier() { listeners = new ArrayList(); + async = true; + try { + Properties prop = new Properties(); + prop.load(new FileInputStream("bprocessor.properties")); + + String asyncStr = prop.getProperty("notification.async"); + if (asyncStr != null && asyncStr.trim().equals("0")) { + async = false; + } + } catch (Exception e) { + // Use default value + } + if (async) { + log.info("Using async notifications"); + } else { + log.info("Using sync notifications"); + } } *************** *** 77,81 **** while (it.hasNext()) { NotificationListener l = (NotificationListener)it.next(); ! new NotificationThread(l, n).start(); } } --- 99,107 ---- while (it.hasNext()) { NotificationListener l = (NotificationListener)it.next(); ! if (async) { ! new NotificationThread(l, n).start(); ! } else { ! l.handleNotification(n); ! } } } |
From: rimestad <rim...@us...> - 2005-09-22 23:57:43
|
Update of /cvsroot/bprocessor/build/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9229 Modified Files: README Log Message: Changed the F keys for rendering mode to the correct keys Index: README =================================================================== RCS file: /cvsroot/bprocessor/build/doc/README,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** README 21 Sep 2005 09:30:17 -0000 1.4 --- README 22 Sep 2005 23:57:36 -0000 1.5 *************** *** 23,29 **** F4 : rotate the view to YZ view ! F8 : Wireframe ! F9 : Solid ! F0 : Lighting Q : Select --- 23,29 ---- F4 : rotate the view to YZ view ! F5 : Wireframe ! F6 : Solid ! F7 : Lighting Q : Select |
From: rimestad <rim...@us...> - 2005-09-22 23:56:24
|
Update of /cvsroot/bprocessor/build/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9033 Modified Files: Changelog Log Message: added some of the changes Index: Changelog =================================================================== RCS file: /cvsroot/bprocessor/build/doc/Changelog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Changelog 8 Aug 2005 09:50:41 -0000 1.1 --- Changelog 22 Sep 2005 23:56:16 -0000 1.2 *************** *** 5,6 **** --- 5,26 ---- ---------------------- Initial release + + 2005/23/09: Release M1 + ---------------------- + - Added different rendering modes (WIREFRAME, SOLID and LIGHTING/w.o. shadows) + - Added a textfield showing the length/distance of lines, movement and extrusions + - If a number is keyd in while using pencil tool, and Enter is pressed afterwards, the active edge is changed accordingly and ended. The drawing just continues as normal afterwards. + - Escape now cancels drawing and moving if pressed + - If a one-button mouse only are awailable CTRL + MOUSE1 begins rotation + - If SHIFT is held down while selecting multiple objects can be selected + - There are now only one draw tool, that draws in 3D, e.i. it draws on excisting objects (and here the grid is included) + - A selection in the treeview reflects on the view and vice versa. + - All current object types can be selected. + - GL hiding tooltip fixed on LINUX but not MAC + - ... + + Known bugs: + - The gl stops responding if SOLID rendering mode is chosen with F6, until the view is clicked a couple of times with the mouse + - Some concurrency problems with the database on multi-threaded machines + - If many objects are selected during rotation, the program seems slow + - ... |
From: rimestad <rim...@us...> - 2005-09-22 23:32:58
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5341/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrusionTool.java Log Message: A minor domain association fix Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ExtrusionTool.java 21 Sep 2005 14:08:38 -0000 1.14 --- ExtrusionTool.java 22 Sep 2005 23:32:50 -0000 1.15 *************** *** 264,272 **** Surface sur = createSurface(newEdges); newCSpace.addSurface(sur); ! sur.setBackDomain(newCSpace); ! if (outer != null) { ! outer.addSurface(sur); ! sur.setBackDomain(outer); ! } newEdges = new ArrayList(); --- 264,268 ---- Surface sur = createSurface(newEdges); newCSpace.addSurface(sur); ! sur.setFrontDomain(newCSpace); newEdges = new ArrayList(); *************** *** 287,296 **** DomainFacade.getInstance().update(newCSpace); Surface topSurf = createSurface(top); - if (outer != null) { - outer.addSurface(topSurf); - topSurf.setBackDomain(outer); - } newCSpace.addSurface(topSurf); ! topSurf.setBackDomain(newCSpace); Notification n = new Notification(Notification.SURFACE_SELECTED, topSurf.getId()); Notifier.getInstance().sendNotification(n); --- 283,288 ---- DomainFacade.getInstance().update(newCSpace); Surface topSurf = createSurface(top); newCSpace.addSurface(topSurf); ! topSurf.setFrontDomain(newCSpace); Notification n = new Notification(Notification.SURFACE_SELECTED, topSurf.getId()); Notifier.getInstance().sendNotification(n); |
From: Michael L. <he...@us...> - 2005-09-22 14:11:03
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1642/src/net/sourceforge/bprocessor/model Modified Files: Vertex.java Surface.java CoordinateSystem.java Log Message: Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Surface.java 21 Sep 2005 14:04:33 -0000 1.26 --- Surface.java 22 Sep 2005 14:10:47 -0000 1.27 *************** *** 224,227 **** --- 224,253 ---- return null; } + + /** + * Calculate center of gravity + * @return The center of gravity + */ + public Vertex center() { + List vertices = this.getVertices(); + if (vertices.size() > 0) { + double x = 0; + double y = 0; + double z = 0; + Iterator iter = vertices.iterator(); + while (iter.hasNext()) { + Vertex current = (Vertex) iter.next(); + x += current.getX(); + y += current.getY(); + z += current.getZ(); + } + x = x / (double) vertices.size(); + y = y / (double) vertices.size(); + z = z / (double) vertices.size(); + return new Vertex("center of " + getName(), x, y, z); + } else { + return null; + } + } /** * Get the inner surfaces Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Vertex.java 8 Sep 2005 10:42:14 -0000 1.8 --- Vertex.java 22 Sep 2005 14:10:47 -0000 1.9 *************** *** 210,213 **** --- 210,226 ---- return res; } + + /** + * Computes the addition of this Vertex and the given vertex + * @param v The vertex to add to this Vertex + * @return The addition + */ + public Vertex add(Vertex v) { + Vertex res = new Vertex("add"); + res.setX(this.getX() + v.getX()); + res.setY(this.getY() + v.getY()); + res.setZ(this.getZ() + v.getZ()); + return res; + } /** Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CoordinateSystem.java 1 Sep 2005 12:17:16 -0000 1.1 --- CoordinateSystem.java 22 Sep 2005 14:10:47 -0000 1.2 *************** *** 45,48 **** --- 45,73 ---- this.origin = origin; } + + /** + * Return the i vector + * @return The i vector + */ + public Vertex getI() { + return i; + } + + /** + * Return the j vector + * @return The j vector + */ + public Vertex getJ() { + return j; + } + + /** + * Return the n vector + * @return The n vector + */ + public Vertex getN() { + return n; + } + /** |
From: Jesper P. <je...@us...> - 2005-09-22 12:25:42
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9443/src/net/sourceforge/bprocessor/gui/treeview Modified Files: SpacesTreeView.java SurfacesTreeView.java Log Message: Add basic support for DESELECTED notifications from the mouse Index: SurfacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SurfacesTreeView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SurfacesTreeView.java 13 Sep 2005 17:24:22 -0000 1.5 --- SurfacesTreeView.java 22 Sep 2005 12:25:31 -0000 1.6 *************** *** 541,544 **** --- 541,546 ---- */ class MouseAdaptor implements MouseListener { + /** The selected node */ + private GenericNode gn; /** *************** *** 555,561 **** public void mousePressed(MouseEvent e) { int selRow = getRowForLocation(e.getX(), e.getY()); - TreePath selPath = getPathForLocation(e.getX(), e.getY()); if (selRow != -1) { ! GenericNode gn = (GenericNode)selPath.getLastPathComponent(); if (gn.getType() == GenericNode.TYPE_SURFACE) { SurfaceNode sn = (SurfaceNode)gn; --- 557,574 ---- public void mousePressed(MouseEvent e) { int selRow = getRowForLocation(e.getX(), e.getY()); if (selRow != -1) { ! TreePath selPath = getPathForLocation(e.getX(), e.getY()); ! ! if (gn != null) { ! if (gn.getType() == GenericNode.TYPE_SURFACE) { ! SurfaceNode sn = (SurfaceNode)gn; ! ! Notification n = new Notification(Notification.SURFACE_DESELECTED, sn.getId()); ! Notifier.getInstance().sendNotification(n); ! } ! } ! ! gn = (GenericNode)selPath.getLastPathComponent(); ! if (gn.getType() == GenericNode.TYPE_SURFACE) { SurfaceNode sn = (SurfaceNode)gn; Index: SpacesTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpacesTreeView.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** SpacesTreeView.java 13 Sep 2005 17:45:05 -0000 1.5 --- SpacesTreeView.java 22 Sep 2005 12:25:31 -0000 1.6 *************** *** 1515,1518 **** --- 1515,1520 ---- */ class MouseAdaptor implements MouseListener { + /** The selected node */ + private GenericNode gn; /** *************** *** 1529,1535 **** public void mousePressed(MouseEvent e) { int selRow = getRowForLocation(e.getX(), e.getY()); - TreePath selPath = getPathForLocation(e.getX(), e.getY()); if (selRow != -1) { ! GenericNode gn = (GenericNode)selPath.getLastPathComponent(); if (gn.getType() == GenericNode.TYPE_SPACE) { SpaceNode sn = (SpaceNode)gn; --- 1531,1563 ---- public void mousePressed(MouseEvent e) { int selRow = getRowForLocation(e.getX(), e.getY()); if (selRow != -1) { ! TreePath selPath = getPathForLocation(e.getX(), e.getY()); ! ! if (gn != null) { ! if (gn.getType() == GenericNode.TYPE_SPACE) { ! SpaceNode sn = (SpaceNode)gn; ! ! if (sn.isFunctional()) { ! Notification n = ! new Notification(Notification.FUNCTIONAL_SPACE_DESELECTED, sn.getId()); ! Notifier.getInstance().sendNotification(n); ! } else { ! Notification n = ! new Notification(Notification.CONSTRUCTION_SPACE_DESELECTED, sn.getId()); ! Notifier.getInstance().sendNotification(n); ! } ! } else if (gn.getType() == GenericNode.TYPE_ELEMENT) { ! Notification n = new Notification(Notification.ELEMENT_DESELECTED, gn.getId()); ! Notifier.getInstance().sendNotification(n); ! } else if (gn.getType() == GenericNode.TYPE_PART) { ! Notification n = new Notification(Notification.PART_DESELECTED, gn.getId()); ! Notifier.getInstance().sendNotification(n); ! } else if (gn.getType() == GenericNode.TYPE_SURFACE) { ! Notification n = new Notification(Notification.SURFACE_DESELECTED, gn.getId()); ! Notifier.getInstance().sendNotification(n); ! } ! } ! ! gn = (GenericNode)selPath.getLastPathComponent(); if (gn.getType() == GenericNode.TYPE_SPACE) { SpaceNode sn = (SpaceNode)gn; |
From: rimestad <rim...@us...> - 2005-09-21 14:08:49
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29234/tool Modified Files: ExtrusionTool.java Log Message: minor changes Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ExtrusionTool.java 20 Sep 2005 17:28:46 -0000 1.13 --- ExtrusionTool.java 21 Sep 2005 14:08:38 -0000 1.14 *************** *** 22,25 **** --- 22,26 ---- import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Domain; + import net.sourceforge.bprocessor.model.DomainFacade; import net.sourceforge.bprocessor.model.Plane; *************** *** 128,153 **** Vertex normal = s.normal(); List l = Util.traverse(s); ! for (int i = 0; i < l.size(); i++) { ! Vertex v = (Vertex)l.get(i); ! Set edges = v.getEdges(); ! if (edges.size() >= 3) { ! Iterator it = edges.iterator(); ! while (it.hasNext()) { ! Edge e = (Edge)it.next(); ! if (!s.contains(e)) { ! extrusion = e; ! Vertex v1 = e.otherVertex(v); ! Vertex v2 = v1.minus(v); ! Vertex cross = v2.cross(normal); ! if (Math.abs(cross.length()) > 0.0001) { ! return false; } } } - } else { - return false; } } ! return true; } --- 129,157 ---- Vertex normal = s.normal(); List l = Util.traverse(s); ! if (l != null) { ! for (int i = 0; i < l.size(); i++) { ! Vertex v = (Vertex)l.get(i); ! Set edges = v.getEdges(); ! if (edges.size() >= 3) { ! Iterator it = edges.iterator(); ! while (it.hasNext()) { ! Edge e = (Edge)it.next(); ! if (!s.contains(e)) { ! extrusion = e; ! Vertex v1 = e.otherVertex(v); ! Vertex v2 = v1.minus(v); ! Vertex cross = v2.cross(normal); ! if (Math.abs(cross.length()) > 0.0001) { ! return false; ! } } } + } else { + return false; } } + return true; } ! return false; } *************** *** 191,196 **** */ private Surface extendSurface(Surface extendSurf) { ! ConstructionSpace newCSpace = new ConstructionSpace("innerSpace"); ! newCSpace = ConstructionSpaceFacade.getInstance().create(newCSpace); Domain outer = extendSurf.getFrontDomain(); Edge previousEdge = null; --- 195,203 ---- */ private Surface extendSurface(Surface extendSurf) { ! // HAVE TO BE CHANGED IN FUTURE RELEASE ! Domain newCSpace = extendSurf.getBackDomain(); ! if (newCSpace == null) { ! newCSpace = ConstructionSpaceFacade.getInstance().create(new ConstructionSpace("innerSpace")); ! } Domain outer = extendSurf.getFrontDomain(); Edge previousEdge = null; *************** *** 278,283 **** } //moving this line to the top ! //ConstructionSpaceFacade.getInstance().create(newCSpace); ! ConstructionSpaceFacade.getInstance().update(newCSpace); Surface topSurf = createSurface(top); if (outer != null) { --- 285,289 ---- } //moving this line to the top ! DomainFacade.getInstance().update(newCSpace); Surface topSurf = createSurface(top); if (outer != null) { |
From: rimestad <rim...@us...> - 2005-09-21 14:06:53
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28586/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: moved more to initializing of the view Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** AbstractView.java 21 Sep 2005 09:43:23 -0000 1.33 --- AbstractView.java 21 Sep 2005 14:06:37 -0000 1.34 *************** *** 196,200 **** gl.glViewport(0, 0, (int)width, (int)height); ball = glu.gluNewQuadric(); ! } --- 196,215 ---- gl.glViewport(0, 0, (int)width, (int)height); ball = glu.gluNewQuadric(); ! ! gl.glEnable(GL.GL_LIGHT0); ! gl.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, 1); ! gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 1); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[] {0.3f, 0.3f, 0.3f, 1.0f}); ! gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[] {0.7f, 0.7f, 0.7f, 1.0f}); ! ! gl.glEnable(GL.GL_LINE_SMOOTH); ! gl.glEnable(GL.GL_POINT_SMOOTH); ! //gl.glEnable(GL.GL_POLYGON_SMOOTH); ! gl.glEnable(GL.GL_BLEND); ! gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); ! //gl.glDepthMask(true); ! ! gl.glEnable(GL.GL_COLOR_MATERIAL); ! gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE); } *************** *** 222,232 **** picking = 0; - gl.glEnable(GL.GL_LINE_SMOOTH); - gl.glEnable(GL.GL_POINT_SMOOTH); - //gl.glEnable(GL.GL_POLYGON_SMOOTH); - gl.glEnable(GL.GL_BLEND); - gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); - //gl.glDepthMask(true); - // grid and coords are always completely lit gl.glDisable(GL.GL_DEPTH_TEST); --- 237,240 ---- *************** *** 237,241 **** gl.glEnable(GL.GL_DEPTH_TEST); coords(); - gl.glEnable(GL.GL_LIGHTING); // set up lighting for the model --- 245,248 ---- *************** *** 243,255 **** //gl.glShadeModel(GL.GL_SMOOTH); gl.glEnable(GL.GL_LIGHTING); - gl.glEnable(GL.GL_LIGHT0); - gl.glEnable(GL.GL_COLOR_MATERIAL); - gl.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, 1); - gl.glLightModeli(GL.GL_LIGHT_MODEL_LOCAL_VIEWER, 1); - gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT_AND_DIFFUSE); - gl.glLightfv(GL.GL_LIGHT0, GL.GL_AMBIENT, new float[] {0.3f, 0.3f, 0.3f, 1.0f}); - gl.glLightfv(GL.GL_LIGHT0, GL.GL_DIFFUSE, new float[] {0.7f, 0.7f, 0.7f, 1.0f}); } else { - gl.glDisable(GL.GL_COLOR_MATERIAL); gl.glDisable(GL.GL_LIGHTING); } --- 250,254 ---- *************** *** 588,602 **** private void drawContour(Surface surface, GLUtesselator tess) { List vertices = surface.getVertices(); ! Vertex first = (Vertex) vertices.get(0); ! Vertex last = (Vertex) vertices.get(vertices.size() - 1); ! if (first == last) { ! Iterator iter = vertices.iterator(); ! glu.gluTessBeginContour(tess); ! while (iter.hasNext()) { ! Vertex current = (Vertex) iter.next(); ! double[] coords = new double[] {current.getX(), current.getY(), current.getZ()}; ! glu.gluTessVertex(tess, coords, new Point(coords[0], coords[1], coords[2])); } - glu.gluTessEndContour(tess); } } --- 587,603 ---- private void drawContour(Surface surface, GLUtesselator tess) { List vertices = surface.getVertices(); ! if (vertices.size() > 0) { ! Vertex first = (Vertex) vertices.get(0); ! Vertex last = (Vertex) vertices.get(vertices.size() - 1); ! if (first == last) { ! Iterator iter = vertices.iterator(); ! glu.gluTessBeginContour(tess); ! while (iter.hasNext()) { ! Vertex current = (Vertex) iter.next(); ! double[] coords = new double[] {current.getX(), current.getY(), current.getZ()}; ! glu.gluTessVertex(tess, coords, new Point(coords[0], coords[1], coords[2])); ! } ! glu.gluTessEndContour(tess); } } } |
From: rimestad <rim...@us...> - 2005-09-21 14:06:07
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28381/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectTool.java Log Message: repaired deselect Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** SelectTool.java 21 Sep 2005 09:35:29 -0000 1.23 --- SelectTool.java 21 Sep 2005 14:05:55 -0000 1.24 *************** *** 34,37 **** --- 34,38 ---- //import java.util.ArrayList; import java.util.Set; + import java.util.HashSet; import org.apache.log4j.Logger; *************** *** 111,115 **** findTarget(e); if (target == null) { ! Iterator it = selection.iterator(); while (it.hasNext()) { deselect(it.next()); --- 112,116 ---- findTarget(e); if (target == null) { ! Iterator it = new HashSet(selection).iterator(); while (it.hasNext()) { deselect(it.next()); *************** *** 125,129 **** } else { if (!selection.contains(target)) { ! Iterator it = selection.iterator(); while (it.hasNext()) { deselect(it.next()); --- 126,130 ---- } else { if (!selection.contains(target)) { ! Iterator it = new HashSet(selection).iterator(); while (it.hasNext()) { deselect(it.next()); |
From: rimestad <rim...@us...> - 2005-09-21 14:04:44
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28016/src/net/sourceforge/bprocessor/model Modified Files: Domain.java DomainFacade.java Surface.java SurfaceFacade.java Log Message: added som updates on facades to make setFronDomain and setBackDomain Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Surface.java 21 Sep 2005 07:29:30 -0000 1.25 --- Surface.java 21 Sep 2005 14:04:33 -0000 1.26 *************** *** 474,478 **** public Space getFrontSpace() { Set set = FunctionalSpaceFacade.getInstance().findBySurface(this); ! log.info("spaces found " + set.size()); if (set != null) { Iterator it = set.iterator(); --- 474,478 ---- public Space getFrontSpace() { Set set = FunctionalSpaceFacade.getInstance().findBySurface(this); ! //log.info("spaces found " + set.size()); if (set != null) { Iterator it = set.iterator(); *************** *** 526,529 **** --- 526,532 ---- */ public void setBackDomain(Domain back) { + if (backDomain != null) { + backDomain.removeSurface(this); + } backDomain = back; } *************** *** 544,547 **** --- 547,553 ---- */ public void setFrontDomain(Domain front) { + if (frontDomain != null) { + frontDomain.removeSurface(this); + } frontDomain = front; } Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SurfaceFacade.java 21 Sep 2005 08:57:07 -0000 1.10 --- SurfaceFacade.java 21 Sep 2005 14:04:33 -0000 1.11 *************** *** 113,121 **** Domain back = s.getBackDomain(); if (back != null) { ! back.removeSurface(s); } Domain front = s.getFrontDomain(); if (front != null) { ! front.removeSurface(s); } --- 113,127 ---- Domain back = s.getBackDomain(); if (back != null) { ! if (back.removeSurface(s)) { ! DomainFacade.getInstance().update(back); ! } ! s.setBackDomain(null); } Domain front = s.getFrontDomain(); if (front != null) { ! if (front.removeSurface(s)) { ! DomainFacade.getInstance().update(front); ! } ! s.setFrontDomain(null); } Index: Domain.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Domain.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Domain.java 12 Sep 2005 18:23:30 -0000 1.7 --- Domain.java 21 Sep 2005 14:04:33 -0000 1.8 *************** *** 140,152 **** /** ! *Remove a surface from this domain ! *@param surface The surface to remove */ ! public void removeSurface(Surface surface) { Set s = getSurfaces(); ! if (s != null) { ! //Maybe this should be done by a setSurfaces call? s.remove(surface); } } --- 140,154 ---- /** ! * Remove a surface from this domain ! * @param surface The surface to remove ! * @return True if the Domain contained the surface otherwise false */ ! public boolean removeSurface(Surface surface) { Set s = getSurfaces(); ! if (s != null && s.contains(surface)) { s.remove(surface); + return true; } + return false; } Index: DomainFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DomainFacade.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** DomainFacade.java 21 Sep 2005 07:59:39 -0000 1.3 --- DomainFacade.java 21 Sep 2005 14:04:33 -0000 1.4 *************** *** 45,48 **** --- 45,66 ---- /** + * Update the Domain + * @param domain The domain to update + */ + public synchronized void update(Domain domain) { + if (domain instanceof ConstructionSpace) { + ConstructionSpaceFacade.getInstance().update((ConstructionSpace)domain); + } else if (domain instanceof FunctionalSpace) { + FunctionalSpaceFacade.getInstance().update((FunctionalSpace)domain); + } else if (domain instanceof Element) { + ElementFacade.getInstance().update((Element)domain); + } else if (domain instanceof Part) { + PartFacade.getInstance().update((Part)domain); + } else { + log.error("Unsupported type: " + domain.getClass().getName()); + } + } + + /** * Find all domains * @return the set of all domains |
From: rimestad <rim...@us...> - 2005-09-21 09:43:33
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2915 Modified Files: AbstractView.java Log Message: minor fix Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** AbstractView.java 21 Sep 2005 09:36:30 -0000 1.32 --- AbstractView.java 21 Sep 2005 09:43:23 -0000 1.33 *************** *** 366,370 **** */ void decorateSelection() { ! List selection = glv.getTool().getSelection(); Iterator iter = selection.iterator(); while (iter.hasNext()) { --- 366,370 ---- */ void decorateSelection() { ! Collection selection = glv.getTool().getSelection(); Iterator iter = selection.iterator(); while (iter.hasNext()) { |
From: rimestad <rim...@us...> - 2005-09-21 09:36:37
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1772/gl/view Modified Files: AbstractView.java Log Message: changed list to hashset behind a collection to make it easy changeable Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** AbstractView.java 21 Sep 2005 07:29:51 -0000 1.31 --- AbstractView.java 21 Sep 2005 09:36:30 -0000 1.32 *************** *** 21,24 **** --- 21,25 ---- import java.util.Iterator; import java.util.List; + import java.util.Collection; import java.util.Set; *************** *** 384,388 **** Set edges = EdgeFacade.getInstance().findAll(); Set vertices = VertexFacade.getInstance().findAll(); ! List selection = glv.getTool().getSelection(); int[] mode = new int[1]; --- 385,389 ---- Set edges = EdgeFacade.getInstance().findAll(); Set vertices = VertexFacade.getInstance().findAll(); ! Collection selection = glv.getTool().getSelection(); int[] mode = new int[1]; |
From: rimestad <rim...@us...> - 2005-09-21 09:35:41
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1632/gl/tool Modified Files: SelectTool.java MoveTool.java Tool.java Log Message: changed list to hashset behind a collection to make it easy changeable Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** SelectTool.java 21 Sep 2005 07:58:53 -0000 1.22 --- SelectTool.java 21 Sep 2005 09:35:29 -0000 1.23 *************** *** 32,36 **** import java.util.Iterator; ! import java.util.ArrayList; import java.util.Set; --- 32,36 ---- import java.util.Iterator; ! //import java.util.ArrayList; import java.util.Set; *************** *** 74,78 **** */ protected void moved(MouseEvent e) { ! findTarget(e); } --- 74,78 ---- */ protected void moved(MouseEvent e) { ! //findTarget(e); } *************** *** 111,115 **** findTarget(e); if (target == null) { ! selection = new ArrayList(); } else if ((e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) == InputEvent.SHIFT_DOWN_MASK) { --- 111,119 ---- findTarget(e); if (target == null) { ! Iterator it = selection.iterator(); ! while (it.hasNext()) { ! deselect(it.next()); ! } ! selection.clear(); } else if ((e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) == InputEvent.SHIFT_DOWN_MASK) { *************** *** 121,125 **** } else { if (!selection.contains(target)) { ! selection = new ArrayList(); select(target); } --- 125,133 ---- } else { if (!selection.contains(target)) { ! Iterator it = selection.iterator(); ! while (it.hasNext()) { ! deselect(it.next()); ! } ! selection.clear(); select(target); } *************** *** 149,153 **** } ! /** * Sends the notification for deselect * @param obj The selected object --- 157,161 ---- } ! /** * Sends the notification for deselect * @param obj The selected object Index: MoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** MoveTool.java 20 Sep 2005 17:25:26 -0000 1.13 --- MoveTool.java 21 Sep 2005 09:35:29 -0000 1.14 *************** *** 19,23 **** import java.awt.event.KeyEvent; ! import java.util.List; import java.util.Iterator; --- 19,23 ---- import java.awt.event.KeyEvent; ! import java.util.Collection; import java.util.Iterator; *************** *** 167,174 **** /** * Move the entire selection ! * @param sel The selection list * @param delta The movement */ ! private void move(List sel, Vertex delta) { Iterator it = sel.iterator(); while (it.hasNext()) { --- 167,174 ---- /** * Move the entire selection ! * @param sel The selection collection * @param delta The movement */ ! private void move(Collection sel, Vertex delta) { Iterator it = sel.iterator(); while (it.hasNext()) { Index: Tool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Tool.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Tool.java 14 Sep 2005 14:10:43 -0000 1.7 --- Tool.java 21 Sep 2005 09:35:29 -0000 1.8 *************** *** 11,15 **** import java.awt.event.MouseMotionListener; ! import java.util.List; /** * The tool interface --- 11,15 ---- import java.awt.event.MouseMotionListener; ! import java.util.Collection; /** * The tool interface *************** *** 27,32 **** /** * Return the current selection ! * @return The list of selected objects */ ! public List getSelection(); } --- 27,32 ---- /** * Return the current selection ! * @return The collection of selected objects */ ! public Collection getSelection(); } |
From: rimestad <rim...@us...> - 2005-09-21 09:33:42
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1403/gl/tool Modified Files: AbstractTool.java Log Message: Changed alle number shortcutkeys fo F# keys Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AbstractTool.java 14 Sep 2005 07:02:56 -0000 1.17 --- AbstractTool.java 21 Sep 2005 09:33:31 -0000 1.18 *************** *** 22,28 **** import java.util.List; - import java.util.ArrayList; import java.util.Iterator; import java.util.Set; import javax.swing.Timer; --- 22,29 ---- import java.util.List; import java.util.Iterator; import java.util.Set; + import java.util.Collection; + import java.util.HashSet; import javax.swing.Timer; *************** *** 64,68 **** /** The selected objects */ ! protected static List selection; /** The carmera move timer */ --- 65,69 ---- /** The selected objects */ ! protected static Collection selection; /** The carmera move timer */ *************** *** 74,78 **** static { timer = new Timer(40, null); ! selection = new ArrayList(); } --- 75,79 ---- static { timer = new Timer(40, null); ! selection = new HashSet(); } *************** *** 114,130 **** } else if (e.getKeyCode() == KeyEvent.VK_R) { glv.changeTool(Tool.EXTRUSION_TOOL); ! } else if (e.getKeyChar() == KeyEvent.VK_1) { glv.changeView(View.VIEW_3D); ! } else if (e.getKeyChar() == KeyEvent.VK_2) { glv.changeView(View.VIEW_XZ); ! } else if (e.getKeyChar() == KeyEvent.VK_3) { glv.changeView(View.VIEW_XY); ! } else if (e.getKeyChar() == KeyEvent.VK_4) { glv.changeView(View.VIEW_YZ); ! } else if (e.getKeyChar() == KeyEvent.VK_8) { glv.getView().changeDrawMode(View.WIREFRAME_MODE); ! } else if (e.getKeyChar() == KeyEvent.VK_9) { glv.getView().changeDrawMode(View.SOLID_MODE); ! } else if (e.getKeyChar() == KeyEvent.VK_0) { glv.getView().changeDrawMode(View.LIGHTING_MODE); } --- 115,131 ---- } else if (e.getKeyCode() == KeyEvent.VK_R) { glv.changeTool(Tool.EXTRUSION_TOOL); ! } else if (e.getKeyCode() == KeyEvent.VK_F1) { glv.changeView(View.VIEW_3D); ! } else if (e.getKeyCode() == KeyEvent.VK_F2) { glv.changeView(View.VIEW_XZ); ! } else if (e.getKeyCode() == KeyEvent.VK_F3) { glv.changeView(View.VIEW_XY); ! } else if (e.getKeyCode() == KeyEvent.VK_F4) { glv.changeView(View.VIEW_YZ); ! } else if (e.getKeyCode() == KeyEvent.VK_F5) { glv.getView().changeDrawMode(View.WIREFRAME_MODE); ! } else if (e.getKeyCode() == KeyEvent.VK_F6) { glv.getView().changeDrawMode(View.SOLID_MODE); ! } else if (e.getKeyCode() == KeyEvent.VK_F7) { glv.getView().changeDrawMode(View.LIGHTING_MODE); } *************** *** 438,444 **** /** * Return the current selection ! * @return The list of selected objects */ ! public List getSelection() { return selection; } --- 439,445 ---- /** * Return the current selection ! * @return The collection of selected objects */ ! public Collection getSelection() { return selection; } |
From: rimestad <rim...@us...> - 2005-09-21 09:30:26
|
Update of /cvsroot/bprocessor/build/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv994 Modified Files: README Log Message: Made up to date Index: README =================================================================== RCS file: /cvsroot/bprocessor/build/doc/README,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** README 23 Aug 2005 11:53:29 -0000 1.3 --- README 21 Sep 2005 09:30:17 -0000 1.4 *************** *** 18,28 **** ----- ! 1 : 3D view ! 2 : XZ view ! 3 : XY view ! 4 : YZ view Q : Select ! W : Draw E : Move R : Extrude --- 18,32 ---- ----- ! F1 : rotate the 3D view to default location ! F2 : rotate the view to XZ view ! F3 : rotate the view to XY view ! F4 : rotate the view to YZ view ! ! F8 : Wireframe ! F9 : Solid ! F0 : Lighting Q : Select ! W : Pencil E : Move R : Extrude *************** *** 36,48 **** COMMA : Zoom out ! DELETE : Delete the selected object. ! When using the move tool in 3D view: ! A : XY movement mode ! S : XZ movement mode ! Z : Decrease movement speed ! X : Increase movement speed Homepage: --------- --- 40,59 ---- COMMA : Zoom out ! DELETE OR BACKSPACE : Delete the selected object. ! ESCAPE : undo most of the operations (Move and Draw) ! <-- MOVE TOOL --> ! A : movement in the plane of the surface (or XY plane if it is a vertex or edge) ! S : movement perpendicular on the A plane and viewingangle. + <-- PENCIL TOOL --> + 0...9 : Change the wanted length on the active edge (direction have to be chosen with the mouse) + BACKSPACE : Delete a digit in the specified length + Enter : Make the active edge the specified length and continue the drawing. + + <-- SELECTION --> + SHIFT (held down) : ability for miltiple selection + Homepage: --------- |
From: Jesper P. <je...@us...> - 2005-09-21 08:57:14
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25561/src/net/sourceforge/bprocessor/model Modified Files: ConstructionSpaceFacade.java EdgeFacade.java ElementFacade.java FunctionalSpaceFacade.java PartFacade.java SurfaceFacade.java VertexFacade.java Log Message: Synchronized access to all methods for now Index: ConstructionSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ConstructionSpaceFacade.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ConstructionSpaceFacade.java 20 Sep 2005 12:56:45 -0000 1.8 --- ConstructionSpaceFacade.java 21 Sep 2005 08:57:07 -0000 1.9 *************** *** 156,160 **** * @return The construction spaces */ ! public Set findAll() { Set result = new HashSet(); --- 156,160 ---- * @return The construction spaces */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 219,223 **** * @return The construction space */ ! public ConstructionSpace findByName(String name) { ConstructionSpace result = null; --- 219,223 ---- * @return The construction space */ ! public synchronized ConstructionSpace findByName(String name) { ConstructionSpace result = null; *************** *** 254,258 **** * @return The space the given surface is conected with */ ! public Set findBySurface(Surface surface) { Set result = new HashSet(); --- 254,258 ---- * @return The space the given surface is conected with */ ! public synchronized Set findBySurface(Surface surface) { Set result = new HashSet(); Index: ElementFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ElementFacade.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ElementFacade.java 20 Sep 2005 12:56:45 -0000 1.5 --- ElementFacade.java 21 Sep 2005 08:57:07 -0000 1.6 *************** *** 135,139 **** * @return The elements */ ! public Set findAll() { Set result = new HashSet(); --- 135,139 ---- * @return The elements */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 198,202 **** * @return The element */ ! public Element findByName(String name) { Element result = null; --- 198,202 ---- * @return The element */ ! public synchronized Element findByName(String name) { Element result = null; Index: SurfaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceFacade.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SurfaceFacade.java 20 Sep 2005 12:56:45 -0000 1.9 --- SurfaceFacade.java 21 Sep 2005 08:57:07 -0000 1.10 *************** *** 146,150 **** * @return The surfaces */ ! public Set findAll() { Set result = new HashSet(); --- 146,150 ---- * @return The surfaces */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 209,213 **** * @return The surface */ ! public Surface findByName(String name) { Surface result = null; --- 209,213 ---- * @return The surface */ ! public synchronized Surface findByName(String name) { Surface result = null; *************** *** 244,248 **** * @return The surfaces */ ! public Set findByEdge(Edge e) { Set result = new HashSet(); --- 244,248 ---- * @return The surfaces */ ! public synchronized Set findByEdge(Edge e) { Set result = new HashSet(); Index: VertexFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/VertexFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** VertexFacade.java 20 Sep 2005 12:56:45 -0000 1.6 --- VertexFacade.java 21 Sep 2005 08:57:07 -0000 1.7 *************** *** 135,139 **** * @return The vertexs */ ! public Set findAll() { Set result = new HashSet(); --- 135,139 ---- * @return The vertexs */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 198,202 **** * @return The vertex */ ! public Vertex findByName(String name) { Vertex result = null; --- 198,202 ---- * @return The vertex */ ! public synchronized Vertex findByName(String name) { Vertex result = null; *************** *** 236,240 **** * @return The vertexs */ ! public Set findByLocation(double x, double y, double z, double delta) { Set result = new HashSet(); --- 236,240 ---- * @return The vertexs */ ! public synchronized Set findByLocation(double x, double y, double z, double delta) { Set result = new HashSet(); Index: EdgeFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EdgeFacade.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** EdgeFacade.java 20 Sep 2005 12:56:45 -0000 1.6 --- EdgeFacade.java 21 Sep 2005 08:57:07 -0000 1.7 *************** *** 135,139 **** * @return The edges */ ! public Set findAll() { Set result = new HashSet(); --- 135,139 ---- * @return The edges */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 198,202 **** * @return The edge */ ! public Edge findByName(String name) { Edge result = null; --- 198,202 ---- * @return The edge */ ! public synchronized Edge findByName(String name) { Edge result = null; *************** *** 233,237 **** * @return The edges */ ! public Set findByVertex(Vertex v) { Set result = new HashSet(); --- 233,237 ---- * @return The edges */ ! public synchronized Set findByVertex(Vertex v) { Set result = new HashSet(); Index: PartFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/PartFacade.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PartFacade.java 20 Sep 2005 12:56:45 -0000 1.5 --- PartFacade.java 21 Sep 2005 08:57:07 -0000 1.6 *************** *** 135,139 **** * @return The parts */ ! public Set findAll() { Set result = new HashSet(); --- 135,139 ---- * @return The parts */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 198,202 **** * @return The part */ ! public Part findByName(String name) { Part result = null; --- 198,202 ---- * @return The part */ ! public synchronized Part findByName(String name) { Part result = null; Index: FunctionalSpaceFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/FunctionalSpaceFacade.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** FunctionalSpaceFacade.java 20 Sep 2005 12:56:45 -0000 1.8 --- FunctionalSpaceFacade.java 21 Sep 2005 08:57:07 -0000 1.9 *************** *** 156,160 **** * @return The functional spaces */ ! public Set findAll() { Set result = new HashSet(); --- 156,160 ---- * @return The functional spaces */ ! public synchronized Set findAll() { Set result = new HashSet(); *************** *** 219,223 **** * @return The functional space */ ! public FunctionalSpace findByName(String name) { FunctionalSpace result = null; --- 219,223 ---- * @return The functional space */ ! public synchronized FunctionalSpace findByName(String name) { FunctionalSpace result = null; *************** *** 254,258 **** * @return The space the given surface is conected with */ ! public Set findBySurface(Surface surface) { Set result = new HashSet(); --- 254,258 ---- * @return The space the given surface is conected with */ ! public synchronized Set findBySurface(Surface surface) { Set result = new HashSet(); |
From: Jesper P. <je...@us...> - 2005-09-21 08:22:02
|
Update of /cvsroot/bprocessor/kernel/src/etc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18347/src/etc Modified Files: log4j.properties Log Message: Show how to enable DEBUG for a package Index: log4j.properties =================================================================== RCS file: /cvsroot/bprocessor/kernel/src/etc/log4j.properties,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** log4j.properties 27 Jun 2005 09:12:30 -0000 1.1.1.1 --- log4j.properties 21 Sep 2005 08:21:54 -0000 1.2 *************** *** 2,5 **** --- 2,8 ---- log4j.rootCategory=INFO, Console + #log4j.category.net.sourceforge.bprocessor=INFO + #log4j.category.net.sourceforge.bprocessor.gl=DEBUG + ### The server.log file appender *************** *** 15,19 **** # Console log4j.appender.Console=org.apache.log4j.ConsoleAppender ! log4j.appender.Console.Threshold=INFO log4j.appender.Console.layout=org.apache.log4j.PatternLayout --- 18,22 ---- # Console log4j.appender.Console=org.apache.log4j.ConsoleAppender ! log4j.appender.Console.Threshold=DEBUG log4j.appender.Console.layout=org.apache.log4j.PatternLayout |
From: Jesper P. <je...@us...> - 2005-09-21 07:59:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13718/src/net/sourceforge/bprocessor/model Modified Files: DomainFacade.java Log Message: Correct the query in findBySurface() Index: DomainFacade.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/DomainFacade.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DomainFacade.java 20 Sep 2005 12:56:45 -0000 1.2 --- DomainFacade.java 21 Sep 2005 07:59:39 -0000 1.3 *************** *** 111,115 **** * @return the set of domains */ ! public Set findBySurface(Surface surface) { Set result = new HashSet(); --- 111,115 ---- * @return the set of domains */ ! public synchronized Set findBySurface(Surface surface) { Set result = new HashSet(); *************** *** 120,127 **** tx = session.beginTransaction(); - //this query is wrong Query q = session.createQuery("SELECT d FROM Domain AS d " + "JOIN d.surfaces AS surfaces " + ! "WHERE surfaces.id = :id AND d.id = f.id"); q.setLong("id", surface.getId().longValue()); --- 120,126 ---- tx = session.beginTransaction(); Query q = session.createQuery("SELECT d FROM Domain AS d " + "JOIN d.surfaces AS surfaces " + ! "WHERE surfaces.id = :id"); q.setLong("id", surface.getId().longValue()); |
From: Jesper P. <je...@us...> - 2005-09-21 07:59:01
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13605/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectTool.java Log Message: Use DomainFacade::findBySurface() when double clicking Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** SelectTool.java 20 Sep 2005 17:26:08 -0000 1.21 --- SelectTool.java 21 Sep 2005 07:58:53 -0000 1.22 *************** *** 14,17 **** --- 14,19 ---- import net.sourceforge.bprocessor.kernel.notification.Notifier; + import net.sourceforge.bprocessor.model.Domain; + import net.sourceforge.bprocessor.model.DomainFacade; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.EdgeFacade; *************** *** 90,101 **** if (e.getButton() == MouseEvent.BUTTON1) { if (e.getClickCount() >= 2 && target instanceof Surface) { ! ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = (ConstructionSpace)(csf.findBySurface((Surface)target)); ! Set s = cs.getSurfaces(); ! Iterator it = s.iterator(); ! while (it.hasNext()) { ! Surface surface = (Surface)it.next(); ! if (!selection.contains(surface)) { ! selection.add(surface); } } --- 92,109 ---- if (e.getButton() == MouseEvent.BUTTON1) { if (e.getClickCount() >= 2 && target instanceof Surface) { ! DomainFacade df = DomainFacade.getInstance(); ! Set ds = df.findBySurface((Surface)target); ! if (!ds.isEmpty()) { ! Iterator dit = ds.iterator(); ! while (dit.hasNext()) { ! Domain d = (Domain)dit.next(); ! Set s = d.getSurfaces(); ! Iterator it = s.iterator(); ! while (it.hasNext()) { ! Surface surface = (Surface)it.next(); ! if (!selection.contains(surface)) { ! selection.add(surface); ! } ! } } } |
From: Michael L. <he...@us...> - 2005-09-21 07:30:00
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9225/src/net/sourceforge/bprocessor/gl/view Modified Files: AbstractView.java Log Message: Index: AbstractView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/AbstractView.java,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** AbstractView.java 20 Sep 2005 13:14:09 -0000 1.30 --- AbstractView.java 21 Sep 2005 07:29:51 -0000 1.31 *************** *** 8,11 **** --- 8,12 ---- import net.sourceforge.bprocessor.gl.GLView; + import net.sourceforge.bprocessor.gl.tool.SelectTool; import net.sourceforge.bprocessor.model.Plane; *************** *** 264,268 **** //drawTextBox(200, 200, "Space 1"); ! gl.glGetIntegerv(GL.GL_RENDER_MODE, mode); --- 265,271 ---- //drawTextBox(200, 200, "Space 1"); ! if (glv.getTool() instanceof SelectTool) { ! decorateSelection(); ! } gl.glGetIntegerv(GL.GL_RENDER_MODE, mode); *************** *** 340,343 **** --- 343,378 ---- } + + /** + * Decorate Surface + * @param surface The Surface to decorate + */ + void decorateSurface(Surface surface) { + Vertex from = surface.getFirtVertex(); + Vertex to = surface.normal(); + to.scale(1 / to.length()); + to.setX(from.getX() + to.getX()); + to.setY(from.getY() + to.getY()); + to.setZ(from.getZ() + to.getZ()); + Edge edge = new Edge("", from, to); + gl.glColor3d(0.0, 1.0, 0.0); + drawEdge(edge); + } + + /** + * Draw special decoration on selection + * + */ + void decorateSelection() { + List selection = glv.getTool().getSelection(); + Iterator iter = selection.iterator(); + while (iter.hasNext()) { + Object current = iter.next(); + if (current instanceof Surface) { + decorateSurface((Surface) current); + } + } + } + /** * Draw all the existing elements *************** *** 574,578 **** Vertex to = e.getTo(); Vertex from = e.getFrom(); - int name = e.getId().intValue(); if (to != null && from != null) { gl.glBegin(GL.GL_LINE_STRIP); --- 609,612 ---- |
From: Michael L. <he...@us...> - 2005-09-21 07:29:39
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9197/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Added Files: Project.java Log Message: Project definition Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Surface.java 20 Sep 2005 18:22:49 -0000 1.24 --- Surface.java 21 Sep 2005 07:29:30 -0000 1.25 *************** *** 197,200 **** --- 197,227 ---- return vertices; } + + /** + * Return the first vertex, which is the vertex from + * first edge that is NOT shared between first and + * second edge. + * @return The first vertex + */ + public Vertex getFirtVertex() { + List edges = getEdges(); + if (edges.size() == 0) { + return null; + } else if (edges.size() == 1) { + Edge e0 = (Edge) edges.get(0); + return e0.getFrom(); + } else { + Edge e0 = (Edge) edges.get(0); + Edge e1 = (Edge) edges.get(1); + Vertex current = null; + if (!e1.contains(e0.getFrom())) { + return e0.getFrom(); + } + if (!e1.contains(e0.getTo())) { + return e0.getTo(); + } + } + return null; + } /** * Get the inner surfaces --- NEW FILE: Project.java --- //--------------------------------------------------------------------------------- // $Id: Project.java,v 1.1 2005/09/21 07:29:30 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import java.util.HashSet; import java.util.Set; import org.apache.log4j.Logger; /** * The Project * * Interface to access objects in the system. * Wraps the database functions. * */ public class Project { /** The logger */ private static Logger log = Logger.getLogger(Project.class); /** The instance */ private static Project instance; /** * Create a vertex * @param v The Vertex */ void create(Vertex v) { } /** * Update a vertex * @param v The vertex */ public synchronized void update(Vertex v) { } /** * Remove a vertex * @param v The vertex */ public synchronized void remove(Vertex v) { } /** * Find all vertexs * @return The vertexs */ public Set findAll() { Set result = new HashSet(); return result; } /** * Find a vertex by id * @param id The id * @return The vertex */ public synchronized Vertex findById(Long id) { Vertex result = null; return result; } /** * Find a vertex by name * @param name The name * @return The vertex */ public Vertex findByName(String name) { Vertex result = null; return result; } /** * Find vertex based upon location and delta * @param x The x coordinate * @param y The y coordinate * @param z The z coordinate * @param delta The delta value * @return The vertexs */ public Set findByLocation(double x, double y, double z, double delta) { Set result = new HashSet(); return result; } } |
From: Nordholt <nor...@us...> - 2005-09-20 18:22:57
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21843 Modified Files: Surface.java Log Message: fixed stackoverflow i move method Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Surface.java 20 Sep 2005 12:34:52 -0000 1.23 --- Surface.java 20 Sep 2005 18:22:49 -0000 1.24 *************** *** 249,253 **** */ public void move(double dx, double dy, double dz) { ! { List vertices = getVertices(); Vertex v0 = (Vertex) vertices.get(0); --- 249,253 ---- */ public void move(double dx, double dy, double dz) { ! { List vertices = getVertices(); Vertex v0 = (Vertex) vertices.get(0); *************** *** 261,265 **** } } ! { if (getInnerSurfaces() != null) { Iterator iter = getInnerSurfaces().iterator(); --- 261,265 ---- } } ! { if (getInnerSurfaces() != null) { Iterator iter = getInnerSurfaces().iterator(); *************** *** 283,287 **** if (innerSurf.equals(this)) { if (!containedCheck(this, surf)) { ! this.move(-dx, -dy, -dz); } } --- 283,309 ---- if (innerSurf.equals(this)) { if (!containedCheck(this, surf)) { ! //The inner surface has been moved out of its outer surface ! //this can not happen so here we move the inner surface back ! { ! List vertices = getVertices(); ! Vertex v0 = (Vertex) vertices.get(0); ! v0.move(-dx, -dy, -dz); ! Iterator iter = vertices.iterator(); ! while (iter.hasNext()) { ! Vertex vertex = (Vertex) iter.next(); ! if (vertex != v0) { ! vertex.move(-dx, -dy, -dz); ! } ! } ! } ! { ! if (getInnerSurfaces() != null) { ! Iterator iter = getInnerSurfaces().iterator(); ! while (iter.hasNext()) { ! Surface surface = (Surface) iter.next(); ! surface.move(-dx, -dy, -dz); ! } ! } ! } } } *************** *** 306,309 **** --- 328,332 ---- *at a time. */ + //log.info("contained check"); List holeEdges = hole.getEdges(); Iterator holeIt = holeEdges.iterator(); *************** *** 333,336 **** --- 356,360 ---- */ private boolean crossingNumbers(Edge edge, Surface surf) { + //log.info("crossing numbers"); List surfEdges = surf.getEdges(); Iterator surfIt = surfEdges.iterator(); *************** *** 358,362 **** --- 382,395 ---- double tHole = holeDet / denominator; double epsilon = 0.00001; + //log.info("1st ineq: " + (Math.abs((surfOr.getX() + surfDir.getX() * tSurf) - + // (holeOr.getX() + holeDir.getX() * tHole)))); + //log.info("2st ineq: " + (Math.abs((surfOr.getY() + surfDir.getY() * tSurf) - + //(holeOr.getY() + holeDir.getY() * tHole)))); + //log.info("3st ineq: " + (Math.abs((surfOr.getZ() + surfDir.getZ() * tSurf) - + // (holeOr.getZ() + holeDir.getZ() * tHole)))); //checking if there is an intersection and if it is within the line segments + //log.info("X: " + surfOr.getX() + "::" + holeOr.getX()); + //log.info("Y: " + surfOr.getY() + "::" + holeOr.getY()); + //log.info("Z: " + surfOr.getZ() + "::" + holeOr.getZ()); if ((tSurf > 0) && (tHole > 0) && (Math.abs((surfOr.getX() + surfDir.getX() * tSurf) - *************** *** 370,373 **** --- 403,407 ---- < epsilon)) { //the parameters for the "from" point on the edges + //log.info("Intersection"); double tSurfFrom = 0; double tHoleFrom = 0; *************** *** 390,396 **** log.warn("inner surface edge has a zero vector direction vector"); } ! if (tHoleFrom > tHole) { contained = false; } else if (tSurfFrom >= tSurf) { crossings++; } --- 424,432 ---- log.warn("inner surface edge has a zero vector direction vector"); } ! if (tHoleFrom > tHole && tSurfFrom >= tSurf) { ! //log.info("not count base"); contained = false; } else if (tSurfFrom >= tSurf) { + //log.info("Count: " + crossings); crossings++; } *************** *** 399,402 **** --- 435,439 ---- } if (crossings % 2 == 0) { + //log.info("count based"); contained = false; } |
From: rimestad <rim...@us...> - 2005-09-20 17:28:54
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10444 Modified Files: ExtrusionTool.java Log Message: Corrected the calculation of a ray so that it now drags correct Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ExtrusionTool.java 20 Sep 2005 12:23:59 -0000 1.12 --- ExtrusionTool.java 20 Sep 2005 17:28:46 -0000 1.13 *************** *** 9,12 **** --- 9,13 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.gl.view.AbstractView; import net.sourceforge.bprocessor.gl.view.Transformation; *************** *** 45,52 **** /*** the previous x-coordinate */ ! private int prevX; /** the previous y-coordinate */ ! private int prevY; /** The extrusion edge */ --- 46,53 ---- /*** the previous x-coordinate */ ! private double prevX; /** the previous y-coordinate */ ! private double prevY; /** The extrusion edge */ *************** *** 164,169 **** View view = glv.getView(); Transformation trans = view.transformation(); ! int x = prevX; ! int y = prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); --- 165,170 ---- View view = glv.getView(); Transformation trans = view.transformation(); ! double x = prevX; ! double y = AbstractView.getHeight() - prevY; Vertex near = new Vertex("near", x, y, 0.0); Vertex far = new Vertex("far", x, y, 1.0); |
From: rimestad <rim...@us...> - 2005-09-20 17:27:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10172 Modified Files: PencilTool.java Log Message: minor change in the reaction when ENTER is hit Index: PencilTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/PencilTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** PencilTool.java 20 Sep 2005 13:15:05 -0000 1.20 --- PencilTool.java 20 Sep 2005 17:27:47 -0000 1.21 *************** *** 130,136 **** */ void onVertex(Vertex vertex) { - if (log.isDebugEnabled()) { - log.debug(vertex); - } setAlignVertex(vertex); number = ""; --- 130,133 ---- *************** *** 154,157 **** --- 151,155 ---- } if (vertex.getId() == null) { + //log.info("ID was null on " + vertex); intern(vertex); active.setTo(vertex); *************** *** 188,192 **** FunctionalSpaceFacade.getInstance().update((FunctionalSpace)sp); } else { ! log.warn("No space was found"); } } --- 186,190 ---- FunctionalSpaceFacade.getInstance().update((FunctionalSpace)sp); } else { ! //log.warn("No space was found"); } } *************** *** 246,250 **** /** * Set current vertex to an appropriate vertex ! * @param event Tne MouseEvent * @return if the vertex is legal */ --- 244,248 ---- /** * Set current vertex to an appropriate vertex ! * @param event The MouseEvent * @return if the vertex is legal */ *************** *** 379,429 **** number += "1"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_2) { number += "2"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_3) { number += "3"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_4) { number += "4"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_5) { number += "5"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_6) { number += "6"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_7) { number += "7"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_8) { number += "8"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_9) { number += "9"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_0) { number += "0"; changed = true; - log.info(number); } else if (e.getKeyCode() == KeyEvent.VK_ENTER) { try { if (active != null) { double d = Double.parseDouble(number); ! active.setLength(d); ! current.setX(to.getX()); ! current.setY(to.getY()); ! current.setZ(to.getZ()); ! onVertex(current); ! glv.repaint(); } } catch (NumberFormatException exp) { --- 377,423 ---- number += "1"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_2) { number += "2"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_3) { number += "3"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_4) { number += "4"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_5) { number += "5"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_6) { number += "6"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_7) { number += "7"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_8) { number += "8"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_9) { number += "9"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_0) { number += "0"; changed = true; } else if (e.getKeyCode() == KeyEvent.VK_ENTER) { try { if (active != null) { double d = Double.parseDouble(number); ! if (current != null) { ! Vertex temp = new Vertex("temp", to.getX(), to.getY(), to.getZ()); ! active.setLength(d); ! current.setX(to.getX()); ! current.setY(to.getY()); ! current.setZ(to.getZ()); ! onVertex(current); ! active.setTo(temp); ! to = temp; ! current = temp; ! glv.repaint(); ! } } } catch (NumberFormatException exp) { |
From: rimestad <rim...@us...> - 2005-09-20 17:26:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9767 Modified Files: SelectTool.java Log Message: removed dead code Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** SelectTool.java 14 Sep 2005 14:09:06 -0000 1.20 --- SelectTool.java 20 Sep 2005 17:26:08 -0000 1.21 *************** *** 91,95 **** if (e.getClickCount() >= 2 && target instanceof Surface) { ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = (ConstructionSpace)csf.findBySurface((Surface)target); Set s = cs.getSurfaces(); Iterator it = s.iterator(); --- 91,95 ---- if (e.getClickCount() >= 2 && target instanceof Surface) { ConstructionSpaceFacade csf = ConstructionSpaceFacade.getInstance(); ! ConstructionSpace cs = (ConstructionSpace)(csf.findBySurface((Surface)target)); Set s = cs.getSurfaces(); Iterator it = s.iterator(); *************** *** 167,200 **** protected void released(MouseEvent e) { //findTarget(e); ! } ! ! /** ! * Check if this cordinate collide with another vertex ! * @param coord The cordinate to check for collision at ! * @return The excisting vertex at coord, null if there ain't any ! */ ! protected Vertex vertexCollide(double[] coord) { ! Set vertexes = VertexFacade.getInstance().findByLocation(coord[0], ! coord[1], ! coord[2], ! EPSILON); ! Iterator it = vertexes.iterator(); ! while (it.hasNext()) { ! Vertex v = (Vertex)it.next(); ! return v; ! } ! return null; ! } ! ! /** ! * Check if a and b is as close as EPSILON ! * @param a The target ! * @param b The value ! * @return true if |a - b| < EPSILON false otherwise ! */ ! protected boolean collide(double a, double b) { ! return Math.abs(a - b) < EPSILON; ! } ! /** --- 167,171 ---- protected void released(MouseEvent e) { //findTarget(e); ! } /** |