bprocessor-commit Mailing List for B-processor (Page 34)
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: Michael L. <he...@us...> - 2007-12-10 10:58:52
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19017/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: fixed bug in Space.insert that affected extrude etc. Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.212 retrieving revision 1.213 diff -C2 -d -r1.212 -r1.213 *** Space.java 9 Dec 2007 11:04:01 -0000 1.212 --- Space.java 10 Dec 2007 10:58:45 -0000 1.213 *************** *** 2504,2507 **** --- 2504,2508 ---- SurfaceAnalysis analysis = new SurfaceAnalysis(); + surfaces.clear(); surfaces.addAll(analysis.surfaceAnalysis(this, edges)); |
From: rimestad <rim...@us...> - 2007-12-10 08:34:40
|
Update of /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29534/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Finally instancemove works Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** FinalMoveTool.java 9 Dec 2007 08:26:34 -0000 1.38 --- FinalMoveTool.java 10 Dec 2007 08:34:25 -0000 1.39 *************** *** 26,30 **** import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Geometry; - import net.sourceforge.bprocessor.model.Matrix; import net.sourceforge.bprocessor.model.Mesh; import net.sourceforge.bprocessor.model.Project; --- 26,29 ---- *************** *** 195,199 **** private CoordinateSystem handle; private CoordinateSystem initialCoordinate; - private Matrix handleTranslation; /** --- 194,197 ---- *************** *** 206,215 **** this.handle = handle; this.initialCoordinate = instance.getInstanceAnchor().copy(); - handleTranslation = new Matrix(new double[]{ - handle.getI().getX(), handle.getI().getY(), handle.getI().getZ(), 0, - handle.getJ().getX(), handle.getJ().getY(), handle.getJ().getZ(), 0, - handle.getN().getX(), handle.getN().getY(), handle.getN().getZ(), 0, - handle.getOrigin().getX(), handle.getOrigin().getY(), handle.getOrigin().getZ(), 1, - }).invert(); } --- 204,207 ---- *************** *** 228,250 **** } CoordinateSystem cs = CoordinateSystem.systemFor(current.vertex(), n); ! CoordinateSystem anchor = instance.getInstanceAnchor(); ! Vertex handleOffset = handle.center().scale(-1); ! ! Vertex i = handleTranslation.multiply(cs.getI(), false); ! Vertex j = handleTranslation.multiply(cs.getJ(), false); ! Vertex k = handleTranslation.multiply(cs.getN(), false); ! anchor.setIJN(i, j, k); ! anchor.setOrigin(current.vertex()); ! anchor.setOrigin(anchor.unTranslate(handleOffset)); ! /* ! Matrix movement = handleTranslation.copy(); ! movement.translate(x, y, z); ! Vertex i = handleTranslation.multiply(cs.getI(), false); ! Vertex j = handleTranslation.multiply(cs.getJ(), false); ! Vertex k = handleTranslation.multiply(cs.getN(), false); ! anchor.setIJN(i, j, k); ! Vertex center = handleTranslation.multiply(cs.center(), false); ! anchor.setOrigin(center); ! */ } else { // change i, j, n of the anchor back to its originals and then just move the delta --- 220,229 ---- } CoordinateSystem cs = CoordinateSystem.systemFor(current.vertex(), n); ! CoordinateSystem anchor = new CoordinateSystem(new Vertex(1, 0, 0), new Vertex(0, 1, 0), ! new Vertex(0, 0, 1), new Vertex(0, 0, 0)); ! CoordinateSystem tmp = handle.translate(anchor); ! tmp = cs.unTranslate(tmp); ! instance.getInstanceAnchor().setOrigin(tmp.center()); ! instance.getInstanceAnchor().setIJN(tmp.getI(), tmp.getJ(), tmp.getN()); } else { // change i, j, n of the anchor back to its originals and then just move the delta |
From: rimestad <rim...@us...> - 2007-12-10 08:34:29
|
Update of /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29525/src/net/sourceforge/bprocessor/model Modified Files: CoordinateSystem.java Log Message: Finally instancemove works Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** CoordinateSystem.java 3 Dec 2007 17:52:59 -0000 1.67 --- CoordinateSystem.java 10 Dec 2007 08:34:21 -0000 1.68 *************** *** 592,595 **** --- 592,662 ---- /** + * Translate one coordinatesystem into this + * @param coordinate The coordinatesystem to translate + * @return The translated coordinatesystem + */ + public CoordinateSystem translate(CoordinateSystem coordinate) { + Vertex newI = coordinate.i; + double x = i.dot(newI); + double y = j.dot(newI); + double z = n.dot(newI); + newI.setX(x); + newI.setY(y); + newI.setZ(z); + Vertex newJ = coordinate.j; + x = i.dot(newJ); + y = j.dot(newJ); + z = n.dot(newJ); + newJ.setX(x); + newJ.setY(y); + newJ.setZ(z); + Vertex newN = coordinate.n; + x = i.dot(newN); + y = j.dot(newN); + z = n.dot(newN); + newN.setX(x); + newN.setY(y); + newN.setZ(z); + Vertex origin = translate(coordinate.origin); + return new CoordinateSystem(newI, newJ, newN, origin); + } + + /** + * Untranslate the given coordinatesystem out of this + * @param coordinate The coordinatesystem to untranslate + * @return The untranslated coordinatesystem + */ + public CoordinateSystem unTranslate(CoordinateSystem coordinate) { + Vertex ii = i.copy(); + Vertex jj = j.copy(); + Vertex nn = n.copy(); + Vertex newI = coordinate.i; + ii.scaleInPlace(newI.getX()); + jj.scaleInPlace(newI.getY()); + nn.scaleInPlace(newI.getZ()); + newI = ii.add(jj).add(nn); + + ii = i.copy(); + jj = j.copy(); + nn = n.copy(); + Vertex newJ = coordinate.j; + ii.scaleInPlace(newJ.getX()); + jj.scaleInPlace(newJ.getY()); + nn.scaleInPlace(newJ.getZ()); + newJ = ii.add(jj).add(nn); + + ii = i.copy(); + jj = j.copy(); + nn = n.copy(); + Vertex newN = coordinate.n; + ii.scaleInPlace(newN.getX()); + jj.scaleInPlace(newN.getY()); + nn.scaleInPlace(newN.getZ()); + newN = ii.add(jj).add(nn); + Vertex origin = unTranslate(coordinate.origin); + return new CoordinateSystem(newI, newJ, newN, origin); + } + + /** * @return String */ |
From: Michael L. <he...@us...> - 2007-12-09 12:10:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23886/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: vertical net intersects with holes Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Command.java 9 Dec 2007 11:04:01 -0000 1.49 --- Command.java 9 Dec 2007 12:10:32 -0000 1.50 *************** *** 10,13 **** --- 10,15 ---- import java.util.ArrayList; import java.util.Collection; + import java.util.Collections; + import java.util.Comparator; import java.util.HashMap; import java.util.HashSet; *************** *** 1643,1647 **** } ! private Space createVerticalNet(Surface surface, double xdistance) { Space net = Space.createNet("Vertical Net"); HashMap map = new HashMap(); --- 1645,1649 ---- } ! private Space createVertical(Surface surface, double dx) { Space net = Space.createNet("Vertical Net"); HashMap map = new HashMap(); *************** *** 1651,1654 **** --- 1653,1661 ---- contour.add((Edge) current.copy(map)); } + for (Surface hole : surface.getHoles()) { + for (Edge current : hole.getEdges()) { + contour.add((Edge) current.copy(map)); + } + } Vertex vertex = surface.getFirstVertex(); *************** *** 1656,1725 **** CoordinateSystem system = CoordinateSystem.systemFor(vertex, normal); double xmin = Double.MAX_VALUE; double xmax = Double.MIN_VALUE; double ymin = Double.MAX_VALUE; double ymax = Double.MIN_VALUE; ! for (Vertex current : Edge.vertices(contour)) { ! Vertex local = system.translate(current); ! if (local.getX() < xmin) { ! xmin = local.getX(); } ! if (local.getX() > xmax) { ! xmax = local.getX(); } ! if (local.getY() < ymin) { ! ymin = local.getY(); } ! if (local.getY() > ymax) { ! ymax = local.getY(); } } ! Vertex min = system.unTranslate(new Vertex(xmin, ymin, 0)); ! Vertex origin = min; List<Edge> verticals = new LinkedList(); ! { ! ! double delta = (xmax - xmin) / xdistance; ! int n = (int) Math.floor(delta); ! double rest = delta - n; ! if (rest < 0.0000001) { ! n--; ! } ! origin = min; ! for (int i = 0; i < n; i++) { ! origin = origin.add(system.getI().scale(xdistance)); ! Line line = new Line(origin, system.getJ()); ! List<Vertex> intersections = new LinkedList(); ! ! for (Edge edge : contour) { ! Edge e = system.translate(edge); ! Vertex o = system.translate(origin); ! double x0 = Math.min(e.from.x, e.to.x); ! double x1 = Math.max(e.from.x, e.to.x); ! if (x0 <= o.x && o.x < x1) { ! Edge intersect = edge.intersection(line.edge(ymax - ymin)); ! if (intersect != null) { ! if (intersect.getLength() < 0.0000001) { ! intersections.add(intersect.getFrom()); ! } } } } ! if (intersections.size() > 0) { ! for (int j = 0; j < (intersections.size() / 2); j++) { ! Iterator<Vertex> iter = intersections.iterator(); ! Vertex from = iter.next(); ! Vertex to = iter.next(); ! verticals.add(new Edge(from, to)); } } } } Geometry.insertEdges(net, contour); Geometry.insertEdges(net, verticals); - return net; } --- 1663,1765 ---- CoordinateSystem system = CoordinateSystem.systemFor(vertex, normal); + List<Vertex> vertices = new LinkedList(Edge.vertices(contour)); + List<Vertex> locals = system.translate(vertices); + for (int i = 0; i < vertices.size(); i++) { + Vertex current = vertices.get(i); + Vertex local = locals.get(i); + current.set(local); + } + double xmin = Double.MAX_VALUE; double xmax = Double.MIN_VALUE; double ymin = Double.MAX_VALUE; double ymax = Double.MIN_VALUE; ! for (Vertex current : locals) { ! if (current.getX() < xmin) { ! xmin = current.getX(); } ! if (current.getX() > xmax) { ! xmax = current.getX(); } ! if (current.getY() < ymin) { ! ymin = current.getY(); } ! if (current.getY() > ymax) { ! ymax = current.getY(); } } ! ! double width = xmax - xmin; ! ! int n = round(width / dx); List<Edge> verticals = new LinkedList(); ! for (int i = 0; i < n; i++) { ! double x = xmin + (i + 1) * dx; ! Vertex from = new Vertex(x, ymin, 0); ! Vertex to = new Vertex(x, ymax, 0); ! Edge edge = new Edge(from, to); ! List<Vertex> intersections = new LinkedList(); ! for (Edge current : contour) { ! double x0 = current.from.x; ! double x1 = current.to.x; ! if (x0 > x1) { ! double tmp = x1; ! x1 = x0; ! x0 = tmp; ! } ! if (x0 <= x && x < x1) { ! Edge intersect = current.intersection(edge); ! if (intersect != null) { ! if (intersect.getLength() < 0.0000001) { ! intersections.add(intersect.from); } } } ! } ! final Comparator<Vertex> comparator = new Comparator<Vertex>() { ! public int compare(Vertex v1, Vertex v2) { ! if (v1.y == v2.y) { ! return 0; ! } else if (v1.y < v2.y) { ! return -1; ! } else { ! return 1; } } + }; + + if (intersections.size() > 0) { + Collections.sort(intersections, comparator); + Iterator<Vertex> iter = intersections.iterator(); + for (int j = 0; j < (intersections.size() / 2); j++) { + Vertex f = iter.next(); + Vertex t = iter.next(); + verticals.add(new Edge(f, t)); + } } } + { + List<Vertex> verts = new ArrayList(Edge.vertices(verticals)); + List<Vertex> globals = system.unTranslate(verts); + for (int i = 0; i < verts.size(); i++) { + Vertex current = verts.get(i); + Vertex global = globals.get(i); + current.set(global); + } + } + { + List<Vertex> verts = new ArrayList(Edge.vertices(contour)); + List<Vertex> globals = system.unTranslate(verts); + for (int i = 0; i < verts.size(); i++) { + Vertex current = verts.get(i); + Vertex global = globals.get(i); + current.set(global); + } + } Geometry.insertEdges(net, contour); Geometry.insertEdges(net, verticals); return net; } *************** *** 1852,1856 **** net = createGrid(surface, xdistance, ydistance); } else { ! net = createVerticalNet(surface, xdistance); } Space owner = surface.getOwner(); --- 1892,1896 ---- net = createGrid(surface, xdistance, ydistance); } else { ! net = createVertical(surface, xdistance); } Space owner = surface.getOwner(); |
From: Michael L. <he...@us...> - 2007-12-09 11:04:00
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30367/src/net/sourceforge/bprocessor/model Modified Files: Command.java SurfaceAnalysis.java Space.java Log Message: Removed holeAnalysis from surfaceAnalysis to improve performance. SurfaceAnalysis is linear and holeAnalysis is quadratic Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.211 retrieving revision 1.212 diff -C2 -d -r1.211 -r1.212 *** Space.java 7 Dec 2007 13:19:54 -0000 1.211 --- Space.java 9 Dec 2007 11:04:01 -0000 1.212 *************** *** 2505,2508 **** --- 2505,2512 ---- SurfaceAnalysis analysis = new SurfaceAnalysis(); surfaces.addAll(analysis.surfaceAnalysis(this, edges)); + + for (Surface current : surfaces) { + Geometry.holeAnalysis(current); + } return new Mesh(surfaces, edges, vertices); } Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** Command.java 7 Dec 2007 11:00:22 -0000 1.48 --- Command.java 9 Dec 2007 11:04:01 -0000 1.49 *************** *** 1775,1778 **** --- 1775,1780 ---- int m = round(height / dy); + + Vertex[][] grid = new Vertex[n][m]; { *************** *** 1811,1814 **** --- 1813,1817 ---- List<Edge> all = new LinkedList(); + all.addAll(verticals); all.addAll(horizontals); *************** *** 1823,1829 **** } } - Geometry.insertEdges(net, all); - return net; } --- 1826,1842 ---- } } + { + + Collection<Vertex> points = Edge.vertices(all); + for (Vertex current : points) { + net.add(current); + } + for (Edge current : all) { + net.add(current); + } + SurfaceAnalysis analysis = new SurfaceAnalysis(); + analysis.surfaceAnalysis(net, all); + } return net; } Index: SurfaceAnalysis.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/SurfaceAnalysis.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SurfaceAnalysis.java 28 Sep 2007 14:07:32 -0000 1.12 --- SurfaceAnalysis.java 9 Dec 2007 11:04:01 -0000 1.13 *************** *** 249,264 **** Set<Surface> added = new HashSet(); Set<Surface> removed = new HashSet(); - { - for (Edge current : start) { - if (emap.containsKey(current)) { - //EdgeNode node = emap.get(current); - //node.left = null; - //node.right = null; - } - } - } for (Edge current : start) { if (emap.containsKey(current)) { ! EdgeNode node = (EdgeNode) emap.get(current); surfaceAnalysis(node, system, added, removed); } --- 249,255 ---- Set<Surface> added = new HashSet(); Set<Surface> removed = new HashSet(); for (Edge current : start) { if (emap.containsKey(current)) { ! EdgeNode node = emap.get(current); surfaceAnalysis(node, system, added, removed); } *************** *** 270,276 **** space.add(current); } - for (Surface current : added) { - Geometry.holeAnalysis(current); - } return added; } --- 261,264 ---- |
From: Michael L. <he...@us...> - 2007-12-09 08:26:46
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2929/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: removed unused modellors Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** AttributeView.java 7 Dec 2007 12:48:37 -0000 1.42 --- AttributeView.java 9 Dec 2007 08:26:44 -0000 1.43 *************** *** 50,54 **** super(new BorderLayout()); setMinimumSize(new Dimension(140, 240)); ! setPreferredSize(new Dimension(280, 450)); Selection.primary().addObserver(this); Project.getInstance().addStaticObserver(this); --- 50,54 ---- super(new BorderLayout()); setMinimumSize(new Dimension(140, 240)); ! setPreferredSize(new Dimension(275, 448)); Selection.primary().addObserver(this); Project.getInstance().addStaticObserver(this); |
From: Michael L. <he...@us...> - 2007-12-09 08:26:42
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2914/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: removed unused modellors Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.146 retrieving revision 1.147 diff -C2 -d -r1.146 -r1.147 *** Project.java 2 Dec 2007 12:02:14 -0000 1.146 --- Project.java 9 Dec 2007 08:26:38 -0000 1.147 *************** *** 20,30 **** import java.util.StringTokenizer; - import net.sourceforge.bprocessor.model.modellor.Cylinder; import net.sourceforge.bprocessor.model.modellor.InnerWallModellor; - import net.sourceforge.bprocessor.model.modellor.LayerModellor; import net.sourceforge.bprocessor.model.modellor.ModelBathModellor2; import net.sourceforge.bprocessor.model.modellor.Modellor; import net.sourceforge.bprocessor.model.modellor.TileModellor; - import net.sourceforge.bprocessor.model.modellor.WindowModellor; import net.sourceforge.bprocessor.model.xml.Bmodel; --- 20,27 ---- *************** *** 182,190 **** globals.putDouble("brick", 0.12); globals.putDouble("roof", 0.07); - Modellor.registerModellor(new LayerModellor()); Modellor.registerModellor(new TileModellor(null)); Modellor.registerModellor(new InnerWallModellor()); - Modellor.registerModellor(new Cylinder()); - Modellor.registerModellor(new WindowModellor()); Modellor.registerModellor(new ModelBathModellor2()); makeClean(); --- 179,184 ---- |
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2914/src/net/sourceforge/bprocessor/model/modellor Removed Files: WindowModellor.java Cylinder.java ModelBathModellor.java Frame.java Box.java LayerModellor.java Log Message: removed unused modellors --- Frame.java DELETED --- --- ModelBathModellor.java DELETED --- --- WindowModellor.java DELETED --- --- Box.java DELETED --- --- LayerModellor.java DELETED --- --- Cylinder.java DELETED --- |
From: Michael L. <he...@us...> - 2007-12-09 08:26:40
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2929/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: removed unused modellors Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** GUI.java 7 Dec 2007 12:48:37 -0000 1.84 --- GUI.java 9 Dec 2007 08:26:44 -0000 1.85 *************** *** 699,703 **** tree.addTab("DBK", new JScrollPane (new DBKTreeView())); tree.setMinimumSize(new Dimension(140, 240)); ! tree.setPreferredSize(new Dimension(280, 240)); registerPanel(tree, SPLIT_LEFT); } --- 699,703 ---- tree.addTab("DBK", new JScrollPane (new DBKTreeView())); tree.setMinimumSize(new Dimension(140, 240)); ! tree.setPreferredSize(new Dimension(275, 240)); registerPanel(tree, SPLIT_LEFT); } |
From: Michael L. <he...@us...> - 2007-12-09 08:26:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2896/src/net/sourceforge/bprocessor/gl Modified Files: Editor.java Log Message: removed unused modellors Index: Editor.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/Editor.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Editor.java 7 Dec 2007 12:48:31 -0000 1.8 --- Editor.java 9 Dec 2007 08:26:34 -0000 1.9 *************** *** 229,233 **** jp.add(glc, BorderLayout.CENTER); jp.setMinimumSize(new Dimension(320, 240)); ! jp.setPreferredSize(new Dimension(450, 450)); } --- 229,233 ---- jp.add(glc, BorderLayout.CENTER); jp.setMinimumSize(new Dimension(320, 240)); ! jp.setPreferredSize(new Dimension(448, 448)); } |
From: Michael L. <he...@us...> - 2007-12-09 08:26:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2896/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: removed unused modellors Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** FinalMoveTool.java 26 Nov 2007 18:15:07 -0000 1.37 --- FinalMoveTool.java 9 Dec 2007 08:26:34 -0000 1.38 *************** *** 614,618 **** */ public String initialTip() { ! return "Pick an object to move or use select tool to select object(s)" + " to move."; } --- 614,618 ---- */ public String initialTip() { ! return "Pick an object to move or use select tool to choose objects" + " to move."; } *************** *** 623,629 **** */ private String secondClickTip() { ! return "Pick a point to move to." + ! " Use \"length\" to type a specific distance to move." + ! " Press Escape to cancel move."; } } --- 623,628 ---- */ private String secondClickTip() { ! return "Set point to move to or type length." + ! " Escape cancels."; } } |
From: rimestad <rim...@us...> - 2007-12-07 14:38:57
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4879/src/net/sourceforge/bprocessor/gl/model Added Files: SelectionPath.java Log Message: changed instance displaying and selection --- NEW FILE: SelectionPath.java --- //--------------------------------------------------------------------------------- // $Id: SelectionPath.java,v 1.1 2007/12/07 14:38:54 rimestad Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gl.model; import java.util.List; import java.util.LinkedList; import net.sourceforge.bprocessor.model.Geometric; /** * A class for a selection path */ public class SelectionPath { private List<Geometric> path = null; /** * Create a selection path */ public SelectionPath() { path = new LinkedList<Geometric>(); } /** * Contstructor for a complete path * @param geometrics The geometric path */ public SelectionPath(Geometric ...geometrics) { this(); for (int i = 0; i < geometrics.length; i++) { this.addGeometricToPath(geometrics[i]); } } /** * Return last object in selection path * @return The object */ public Geometric getLastInPath() { return path.get(path.size() - 1); } /** * Add a geometric object to the path * @param geom The object */ public void addGeometricToPath(Geometric geom) { path.add(geom); } /** * Getter for the first geometric object in the selection path * @return The geometric obj */ public Geometric getFirstInPath() { if (path.isEmpty()) { return null; } return path.get(0); } /** {@inheritDoc} */ public String toString() { String res = "["; for (Geometric current : path) { res += current.getName() + ":"; } res += "]"; return res; } /** * Return the length of the path * @return The length */ public int getPathLength() { return path.size(); } } |
From: rimestad <rim...@us...> - 2007-12-07 14:38:50
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4879/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: changed instance displaying and selection Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Display.java 7 Dec 2007 11:00:15 -0000 1.63 --- Display.java 7 Dec 2007 14:38:53 -0000 1.64 *************** *** 849,852 **** --- 849,855 ---- private static void drawInstance(Space space, boolean inside) { gl.glPushMatrix(); + if (space == active) { + paint(space.getInstanceAnchor()); + } translateToCoordinatesystem(space); if (USEDL && inside) { *************** *** 863,884 **** } } ! boolean selActivated = false; ! Space oldActive = active; if (selecting()) { ! push(space); ! selActivated = true; ! if (space == active) { ! selecting = true; ! active = space.getProto(); } } - if (space == active) { - paint(space.getInstanceAnchor()); - } drawSpace(space.getProto(), inside || space == active); ! if (selActivated) { ! selecting = true; ! active = oldActive; ! pop(); } --- 866,893 ---- } } ! boolean activeSet = false; if (selecting()) { ! if (intersecting) { ! push(space); ! } else { ! if (space == active) { ! activeSet = true; ! active = space.getProto(); ! } else { ! push(space); ! } } } drawSpace(space.getProto(), inside || space == active); ! if (selecting()) { ! if (intersecting) { ! pop(); ! } else { ! if (activeSet) { ! active = space; ! } else { ! pop(); ! } ! } } Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.267 retrieving revision 1.268 diff -C2 -d -r1.267 -r1.268 *** View.java 3 Dec 2007 17:52:55 -0000 1.267 --- View.java 7 Dec 2007 14:38:53 -0000 1.268 *************** *** 14,17 **** --- 14,18 ---- import net.sourceforge.bprocessor.gl.model.Intersection; import net.sourceforge.bprocessor.gl.model.Label; + import net.sourceforge.bprocessor.gl.model.SelectionPath; import net.sourceforge.bprocessor.gl.model.SpaceBox; import net.sourceforge.bprocessor.gl.model.Widget; *************** *** 1238,1242 **** objectTable = null; } ! /** * Process Selection --- 1239,1243 ---- objectTable = null; } ! /** * Process Selection *************** *** 1262,1289 **** * @return Selection */ ! private Object processSelect(Collection unWantedEntities, ! boolean intersections, Plane xy) { int bufferOffset = 0; int names = 0; long zMax = 0xFFFFFFFFL; double nearestSurface = 1.0; ! Surface surface = null; ! double nearestVertex = 1.0; ! Vertex vertex = null; ! double nearestEdge = 1.0; ! Edge edge = null; ! double nearestGLO = 1.0; GlObject glo = null; - double nearest = 1.0; Object object = null; - Collection<Edge> edges = new HashSet<Edge>(); - Space instance = null; - for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); --- 1263,1282 ---- * @return Selection */ ! private Object processSelect(Collection unWantedEntities, boolean intersections, Plane xy) { int bufferOffset = 0; int names = 0; long zMax = 0xFFFFFFFFL; double nearestSurface = 1.0; ! SelectionPath surface = null; double nearestVertex = 1.0; ! SelectionPath vertex = null; double nearestEdge = 1.0; ! SelectionPath edge = null; double nearestGLO = 1.0; GlObject glo = null; double nearest = 1.0; Object object = null; Collection<Edge> edges = new HashSet<Edge>(); for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); *************** *** 1293,1314 **** double near = (double) z1 / (double) zMax; double far = (double) z2 / (double) zMax; - near = (near + far) / 2; - bufferOffset += 2; ! if (names > 1) { ! instance = (Space)getObject(selectBuffer.get(bufferOffset + names - 1)); } int id = selectBuffer.get(bufferOffset + names); - bufferOffset += names + 1; Object current = getObject(id); - if (!unWantedEntities.contains(current)) { if (current instanceof Surface) { if (near < nearestSurface) { nearestSurface = near; ! surface = (Surface) current; if (near < nearest) { object = null; --- 1286,1308 ---- double near = (double) z1 / (double) zMax; double far = (double) z2 / (double) zMax; near = (near + far) / 2; bufferOffset += 2; ! SelectionPath currentPath = new SelectionPath(); if (names > 1) { ! Space instance = (Space)getObject(selectBuffer.get(bufferOffset + names - 1)); ! if (unWantedEntities.contains(instance)) { ! continue; ! } ! currentPath.addGeometricToPath(instance); } int id = selectBuffer.get(bufferOffset + names); bufferOffset += names + 1; Object current = getObject(id); if (!unWantedEntities.contains(current)) { if (current instanceof Surface) { if (near < nearestSurface) { nearestSurface = near; ! currentPath.addGeometricToPath((Surface) current); ! surface = currentPath; if (near < nearest) { object = null; *************** *** 1318,1322 **** if (near < nearestVertex) { nearestVertex = near; ! vertex = (Vertex) current; if (near < nearest) { object = null; --- 1312,1317 ---- if (near < nearestVertex) { nearestVertex = near; ! currentPath.addGeometricToPath((Vertex) current); ! vertex = currentPath; if (near < nearest) { object = null; *************** *** 1327,1331 **** if (near < nearestEdge) { nearestEdge = near; ! edge = (Edge) current; if (near < nearest) { object = null; --- 1322,1327 ---- if (near < nearestEdge) { nearestEdge = near; ! currentPath.addGeometricToPath((Edge)current); ! edge = currentPath; if (near < nearest) { object = null; *************** *** 1354,1358 **** } if (surface != null) { ! if (unWantedEntities.contains(surface)) { surface = null; } --- 1350,1354 ---- } if (surface != null) { ! if (unWantedEntities.contains(surface.getLastInPath())) { surface = null; } *************** *** 1360,1367 **** if (surface != null) { // Test vertex and edge against surface ! Plane plane = surface.plane(); if (vertex != null) { if (nearestSurface < nearestVertex) { ! if (plane != null && !plane.contains(vertex)) { vertex = null; } --- 1356,1363 ---- if (surface != null) { // Test vertex and edge against surface ! Plane plane = ((Surface)surface.getLastInPath()).plane(); if (vertex != null) { if (nearestSurface < nearestVertex) { ! if (plane != null && !plane.contains((Vertex)vertex.getLastInPath())) { vertex = null; } *************** *** 1370,1374 **** if (edge != null) { if (nearestSurface < nearestEdge) { ! if (plane != null && !plane.contains(edge)) { edge = null; } --- 1366,1370 ---- if (edge != null) { if (nearestSurface < nearestEdge) { ! if (plane != null && !plane.contains((Edge)edge.getLastInPath())) { edge = null; } *************** *** 1376,1384 **** } } - if (edge != null && vertex != null) { // Test edge and vertex against each other if (nearestEdge < nearestVertex) { ! if (!edge.intersects(vertex)) { vertex = null; } else { --- 1372,1379 ---- } } if (edge != null && vertex != null) { // Test edge and vertex against each other if (nearestEdge < nearestVertex) { ! if (!((Edge)edge.getLastInPath()).intersects((Vertex)vertex.getLastInPath())) { vertex = null; } else { *************** *** 1387,1409 **** } } - if (object == null && vertex == null && edge == null) { ! setLastSurface(surface); } ! ! if (lastSurface == null) { ! setLastSurface(surface); } - if (edge != null) { edges.remove(edge); ! if (edge.getStrippled()) { Iterator iter = edges.iterator(); - while (iter.hasNext()) { Edge current = (Edge) iter.next(); if (!current.getStrippled()) { ! if (edge.intersects(current.getFrom()) && edge.intersects(current.getTo())) { ! edge = current; break; } --- 1382,1419 ---- } } if (object == null && vertex == null && edge == null) { ! if (surface == null) { ! setLastSurface(null); ! } else { ! if (surface.getPathLength() > 1) { ! Space space = (Space)surface.getFirstInPath(); ! Surface theSurface = ! space.getInstanceAnchor().unTranslate((Surface)surface.getLastInPath()); ! setLastSurface(theSurface); ! } else { ! setLastSurface((Surface)surface.getLastInPath()); ! } ! } } ! if (lastSurface == null && surface != null) { ! if (surface.getPathLength() > 1) { ! Space space = (Space)surface.getFirstInPath(); ! Surface theSurface = ! space.getInstanceAnchor().unTranslate((Surface)surface.getLastInPath()); ! setLastSurface(theSurface); ! } else { ! setLastSurface((Surface)surface.getLastInPath()); ! } } if (edge != null) { edges.remove(edge); ! if (((Edge)edge.getLastInPath()).getStrippled()) { Iterator iter = edges.iterator(); while (iter.hasNext()) { Edge current = (Edge) iter.next(); if (!current.getStrippled()) { ! if (((Edge)edge.getLastInPath()).intersects(current.getFrom()) && ! ((Edge)edge.getLastInPath()).intersects(current.getTo())) { ! edge = new SelectionPath(current); break; } *************** *** 1412,1420 **** } } ! ! if (glo != null && object == null && ! nearestGLO < nearestVertex && ! nearestGLO < nearestEdge && ! nearestGLO < nearestSurface) { surface = null; edge = null; --- 1422,1427 ---- } } ! if (glo != null && object == null && nearestGLO < nearestVertex && ! nearestGLO < nearestEdge && nearestGLO < nearestSurface) { surface = null; edge = null; *************** *** 1428,1444 **** ray = transformation.unProject(ray); if (vertex != null) { ! if (instance != null) { ! vertex = instance.getInstanceAnchor().unTranslate(vertex); } ! return new Intersection(vertex, Intersection.VERTEX, vertex); } else { if (glo != null) { return glo.intersection(ray); } else if (edge != null) { ! if (instance != null) { ! edge = instance.getInstanceAnchor().unTranslate(edge); } ! if (!edge.getStrippled()) { ! Vertex m = edge.getFrom().add(edge.getTo()); m.scaleInPlace(0.5); Vertex projected = transformation.project(m); --- 1435,1455 ---- ray = transformation.unProject(ray); if (vertex != null) { ! Vertex intersection = (Vertex)vertex.getLastInPath(); ! if (vertex.getPathLength() > 1) { ! Space instance = (Space)vertex.getFirstInPath(); ! Vertex cur = (Vertex)vertex.getLastInPath(); ! intersection = instance.getInstanceAnchor().unTranslate(cur); } ! return new Intersection(intersection, Intersection.VERTEX, intersection); } else { if (glo != null) { return glo.intersection(ray); } else if (edge != null) { ! Edge current = (Edge)edge.getLastInPath(); ! if (edge.getPathLength() > 1) { ! current = ((Space)edge.getFirstInPath()).getInstanceAnchor().unTranslate(current); } ! if (!current.getStrippled()) { ! Vertex m = current.getFrom().add(current.getTo()); m.scaleInPlace(0.5); Vertex projected = transformation.project(m); *************** *** 1447,1459 **** double distance = Math.sqrt(dx * dx + dy * dy); if (distance < 5) { ! return new Intersection(m, Intersection.EDGE_MIDPOINT, edge); } } ! ! Edge e1 = edge; Vertex v1 = e1.getTo().minus(e1.getFrom()); - Iterator iter = edges.iterator(); - while (iter.hasNext()) { Edge e2 = (Edge) iter.next(); --- 1458,1467 ---- double distance = Math.sqrt(dx * dx + dy * dy); if (distance < 5) { ! return new Intersection(m, Intersection.EDGE_MIDPOINT, current); } } ! Edge e1 = current; Vertex v1 = e1.getTo().minus(e1.getFrom()); Iterator iter = edges.iterator(); while (iter.hasNext()) { Edge e2 = (Edge) iter.next(); *************** *** 1470,1474 **** double distance = Math.sqrt(dx * dx + dy * dy); if (distance < 5) { ! return new Intersection(i, Intersection.EDGE_INTERSECTION, edge); } } --- 1478,1482 ---- double distance = Math.sqrt(dx * dx + dy * dy); if (distance < 5) { ! return new Intersection(i, Intersection.EDGE_INTERSECTION, current); } } *************** *** 1476,1490 **** } } - - - { if (lastSurface != null) { - if (instance != null) { - lastSurface = instance.getInstanceAnchor().unTranslate(lastSurface); - } if (!unWantedEntities.contains(lastSurface)) { Plane plane = lastSurface.plane(); ! Vertex intersection = plane.intersection(edge); if (intersection != null) { Vertex projected = transformation.project(intersection); --- 1484,1492 ---- } } { if (lastSurface != null) { if (!unWantedEntities.contains(lastSurface)) { Plane plane = lastSurface.plane(); ! Vertex intersection = plane.intersection(current); if (intersection != null) { Vertex projected = transformation.project(intersection); *************** *** 1500,1515 **** } } - { ! Edge intersect = edge.intersection(ray); Vertex intersection = intersect.getFrom(); ! return new Intersection(intersection, Intersection.EDGE, edge); } } else { if (surface != null) { ! if (instance != null) { ! surface = instance.getInstanceAnchor().unTranslate(surface); } ! Plane plane = surface.plane(); for (Edge current : (Collection<Edge>) edges) { Vertex intersection = plane.intersection(current); --- 1502,1518 ---- } } { ! Edge intersect = current.intersection(ray); Vertex intersection = intersect.getFrom(); ! return new Intersection(intersection, Intersection.EDGE, current); } } else { if (surface != null) { ! Surface theSurface = (Surface)surface.getLastInPath(); ! if (surface.getPathLength() > 1) { ! Space instance = (Space)surface.getFirstInPath(); ! theSurface = instance.getInstanceAnchor().unTranslate(theSurface); } ! Plane plane = theSurface.plane(); for (Edge current : (Collection<Edge>) edges) { Vertex intersection = plane.intersection(current); *************** *** 1521,1530 **** if (distance < 5) { return new Intersection(intersection, ! Intersection.SURFACE_INTERSECTION, surface); } } } Vertex intersection = plane.intersection(ray); ! return new Intersection(intersection, Intersection.SURFACE, surface); } else if (object instanceof ClippingPlane) { // find out what is intersected --- 1524,1533 ---- if (distance < 5) { return new Intersection(intersection, ! Intersection.SURFACE_INTERSECTION, theSurface); } } } Vertex intersection = plane.intersection(ray); ! return new Intersection(intersection, Intersection.SURFACE, theSurface); } else if (object instanceof ClippingPlane) { // find out what is intersected *************** *** 1543,1556 **** } } else { ! if (instance != null && instance != Project.getInstance().getActiveSpace()) { ! return instance; ! } else if (object != null) { return object; } else if (vertex != null) { ! return vertex; } else if (edge != null) { ! return edge; } else if (surface != null) { ! return surface; } else if (glo != null) { return glo; --- 1546,1557 ---- } } else { ! if (object != null) { return object; } else if (vertex != null) { ! return vertex.getFirstInPath(); } else if (edge != null) { ! return edge.getFirstInPath(); } else if (surface != null) { ! return surface.getFirstInPath(); } else if (glo != null) { return glo; *************** *** 1560,1565 **** } - - /** * Gets Entity under a point. For use in selection. --- 1561,1564 ---- *************** *** 1623,1628 **** * @return All geometry in the selection */ ! private List getAllGeometryInSelection() { ! List selection = new ArrayList(); int bufferOffset = 0; int names = 0; --- 1622,1627 ---- * @return All geometry in the selection */ ! private Set getAllGeometryInSelection() { ! Set selection = new HashSet(); int bufferOffset = 0; int names = 0; *************** *** 1649,1653 **** * @return The objects in the area */ ! public List getObjectInArea(double x1, double y1, double x2, double y2) { double x = (x1 - x2); double y = (y1 - y2); --- 1648,1652 ---- * @return The objects in the area */ ! public Set getObjectInArea(double x1, double y1, double x2, double y2) { double x = (x1 - x2); double y = (y1 - y2); *************** *** 1665,1669 **** selectionLength = 2056; editor.repaint(true); ! List selection = getAllGeometryInSelection(); selectionLength = lengthTemp; //restore default selection box --- 1664,1668 ---- selectionLength = 2056; editor.repaint(true); ! Set selection = getAllGeometryInSelection(); selectionLength = lengthTemp; //restore default selection box |
From: rimestad <rim...@us...> - 2007-12-07 14:38:50
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4879/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectStrategy.java Log Message: changed instance displaying and selection Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** SelectStrategy.java 18 Nov 2007 21:30:17 -0000 1.22 --- SelectStrategy.java 7 Dec 2007 14:38:53 -0000 1.23 *************** *** 140,145 **** } int newX = e.getX(); ! Set l = new HashSet(editor.getView().getObjectInArea(x, y, ! e.getX(), e.getY())); l.removeAll(box); l.remove(Project.getInstance().getActiveCoordinateSystem()); --- 140,145 ---- } int newX = e.getX(); ! Set l = editor.getView().getObjectInArea(x, y, ! e.getX(), e.getY()); l.removeAll(box); l.remove(Project.getInstance().getActiveCoordinateSystem()); |
From: rimestad <rim...@us...> - 2007-12-07 14:37:29
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4484/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Dont make instance owner for component when instanciating Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** GenericTreeView.java 19 Nov 2007 10:51:38 -0000 1.125 --- GenericTreeView.java 7 Dec 2007 14:37:32 -0000 1.126 *************** *** 1203,1207 **** proj.addCalalogObject(lo); instance.setProto(space); - space.setOwner(instance); world.add(instance); } --- 1203,1206 ---- |
From: rimestad <rim...@us...> - 2007-12-07 14:37:05
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4227/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: clear selction when making component Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** PopupMenu.java 4 Dec 2007 13:54:38 -0000 1.84 --- PopupMenu.java 7 Dec 2007 14:37:03 -0000 1.85 *************** *** 352,355 **** --- 352,356 ---- space.getOwner().remove(space); Project.getInstance().addCalalogObject(component); + Selection.primary().clear(); Project.getInstance().changed(Project.getInstance()); Project.getInstance().checkpoint(); |
From: Michael L. <he...@us...> - 2007-12-07 13:19:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6006/src/net/sourceforge/bprocessor/model Modified Files: Space.java Persistence.java Log Message: fixed persistence of instanses Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Persistence.java 2 Dec 2007 12:02:14 -0000 1.63 --- Persistence.java 7 Dec 2007 13:19:54 -0000 1.64 *************** *** 386,390 **** } else { if (xml.getAnchor() != null) { ! space.setInstanceAnchor(internalizeCoordinateSystem(xml.getAnchor(), mapper, xmls)); } } --- 386,392 ---- } else { if (xml.getAnchor() != null) { ! CoordinateSystem anchor; ! anchor = internalizeCoordinateSystem(xml.getAnchor(), mapper, xmls); ! space.setInstanceAnchor(anchor); } } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.210 retrieving revision 1.211 diff -C2 -d -r1.210 -r1.211 *** Space.java 7 Dec 2007 11:00:22 -0000 1.210 --- Space.java 7 Dec 2007 13:19:54 -0000 1.211 *************** *** 269,273 **** this.proto = space; if (proto != null) { ! this.anchor = Project.getInstance().getActiveCoordinateSystem().copy(); } else { this.anchor = null; --- 269,275 ---- this.proto = space; if (proto != null) { ! if (anchor == null) { ! this.anchor = Project.getInstance().getActiveCoordinateSystem().copy(); ! } } else { this.anchor = null; *************** *** 2832,2838 **** */ public void setInstanceAnchor(CoordinateSystem cs) { ! if (isInstance()) { ! anchor = cs; ! } } --- 2834,2838 ---- */ public void setInstanceAnchor(CoordinateSystem cs) { ! anchor = cs; } |
From: Michael L. <he...@us...> - 2007-12-07 12:48:40
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26318/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java Log Message: Adjusted initial sizes of view and changed tips to prepare for demo Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** AttributeView.java 17 Oct 2007 17:27:44 -0000 1.41 --- AttributeView.java 7 Dec 2007 12:48:37 -0000 1.42 *************** *** 50,54 **** super(new BorderLayout()); setMinimumSize(new Dimension(140, 240)); ! setPreferredSize(new Dimension(140, 240)); Selection.primary().addObserver(this); Project.getInstance().addStaticObserver(this); --- 50,54 ---- super(new BorderLayout()); setMinimumSize(new Dimension(140, 240)); ! setPreferredSize(new Dimension(280, 450)); Selection.primary().addObserver(this); Project.getInstance().addStaticObserver(this); |
From: Michael L. <he...@us...> - 2007-12-07 12:48:37
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26296/src/net/sourceforge/bprocessor/gl/tool Modified Files: OffsetTool.java ExtrusionTool.java ConstructorTool.java ArcTool.java RectTool.java Pencil.java EraserTool.java TapeMeasure.java ExtendTool.java Log Message: Adjusted initial sizes of view and changed tips to prepare for demo Index: ExtendTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtendTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ExtendTool.java 3 Dec 2007 17:29:48 -0000 1.1 --- ExtendTool.java 7 Dec 2007 12:48:31 -0000 1.2 *************** *** 303,307 **** @Override public String initialTip() { ! return "Press a surface and drag it to push/pull it"; } } --- 303,307 ---- @Override public String initialTip() { ! return "Pick a surface to push/pull."; } } Index: OffsetTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** OffsetTool.java 18 Nov 2007 21:30:17 -0000 1.25 --- OffsetTool.java 7 Dec 2007 12:48:31 -0000 1.26 *************** *** 343,347 **** public String initialTip() { return "Pick a surface to offset or use select tool to choose" + ! " specific edges of a surface to offset"; } --- 343,347 ---- public String initialTip() { return "Pick a surface to offset or use select tool to choose" + ! " edges to offset."; } *************** *** 351,357 **** */ private String secondClickTip() { ! return "Place the offset." + ! " Use \"length\" to type a specific distance to offset." + ! " Press Escape to cancel offset"; } --- 351,356 ---- */ private String secondClickTip() { ! return "Set offset distance or type length." + ! " Escape cancels."; } Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** ExtrusionTool.java 18 Nov 2007 21:30:17 -0000 1.72 --- ExtrusionTool.java 7 Dec 2007 12:48:31 -0000 1.73 *************** *** 505,510 **** */ public String initialTip() { ! return "Pick a surface to extrude or use select tool to select edges to extrude." + ! " Double-click a surface to extrude same distance as previous extrusion."; } --- 505,509 ---- */ public String initialTip() { ! return "Pick a surface to extrude or use select tool to choose edges to extrude."; } *************** *** 514,520 **** */ private String secondClickTip() { ! return "Place the extrusion." + ! " Use \"length\" to type a specific distance to extrude." + ! " Press Escape to cancel extrusion."; } } --- 513,518 ---- */ private String secondClickTip() { ! return "Set extrusion distance or type length." + ! " Escape cancels."; } } Index: TapeMeasure.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/TapeMeasure.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** TapeMeasure.java 6 Dec 2007 14:05:38 -0000 1.9 --- TapeMeasure.java 7 Dec 2007 12:48:31 -0000 1.10 *************** *** 194,199 **** */ public String initialTip() { ! return "Pick a point for a new construction line" + ! " or pick an edge to make a parrallel constructor"; } --- 194,199 ---- */ public String initialTip() { ! return "Set a point for new construction line" + ! " or pick an edge to make a parallel construction line"; } *************** *** 203,208 **** */ private String secondClickTip() { ! return "Set a direction for a constructor line. " + ! " Press Escape to cancel drawing the constructor."; } --- 203,208 ---- */ private String secondClickTip() { ! return "Set direction of construction line. " + ! " Escape cancels."; } *************** *** 212,218 **** */ private String secondClickParaTip() { ! return "Place a parrallel constructor line." + ! "Use \"length\" to type a specific distance to the parrallel edge." + ! " Press Escape to cancel drawing the constructor."; } } --- 212,217 ---- */ private String secondClickParaTip() { ! return "Set offset distance or type length." + ! " Escape cancels."; } } Index: ArcTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ArcTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** ArcTool.java 18 Nov 2007 21:30:17 -0000 1.22 --- ArcTool.java 7 Dec 2007 12:48:31 -0000 1.23 *************** *** 256,260 **** */ public String initialTip() { ! return "Set first endpoint of the arc"; } --- 256,260 ---- */ public String initialTip() { ! return "Set start point of the arc"; } *************** *** 264,270 **** */ private String secondClickTip() { ! return "Set the second endpoint of the arc." + ! " Use \"length\" to type a specific distance to endpoint." + ! " Press Escape to cancel drawing"; } --- 264,269 ---- */ private String secondClickTip() { ! return "Set end point or type length." + ! " Escape cancels."; } *************** *** 274,280 **** */ private String thirdClickTip() { ! return "Set the radius of the arc." + ! "Use \"length\" to type a specific radius." + ! " Press Escape to cancel drawing"; } } --- 273,278 ---- */ private String thirdClickTip() { ! return "Set the radius or type length." + ! " Escape cancels."; } } Index: EraserTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/EraserTool.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** EraserTool.java 18 Nov 2007 21:30:17 -0000 1.12 --- EraserTool.java 7 Dec 2007 12:48:31 -0000 1.13 *************** *** 93,97 **** */ public String initialTip() { ! return "Pick an edge or a vertex to erase"; } } --- 93,97 ---- */ public String initialTip() { ! return "Pick an edge to erase."; } } Index: Pencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Pencil.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Pencil.java 18 Nov 2007 21:30:17 -0000 1.22 --- Pencil.java 7 Dec 2007 12:48:31 -0000 1.23 *************** *** 127,136 **** */ public String initialTip() { ! return "Click set start point of a new edge."; } private String secondClickTip() { ! return "Click to set end point of the current edge or type length." + ! " Double-click or press Escape to stop drawing"; } } --- 127,136 ---- */ public String initialTip() { ! return "Set start point of the edge."; } private String secondClickTip() { ! return "Set end point or type length." + ! " Escape cancels."; } } Index: ConstructorTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ConstructorTool.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ConstructorTool.java 18 Nov 2007 21:30:17 -0000 1.17 --- ConstructorTool.java 7 Dec 2007 12:48:31 -0000 1.18 *************** *** 192,197 **** */ public String initialTip() { ! return "Set origin of a constructor." + ! " Double-click to make a B-point constructor."; } --- 192,197 ---- */ public String initialTip() { ! return "Set origin of new constructor." + ! " Double-click to make a B-point."; } *************** *** 201,207 **** */ private String secondClickTip() { ! return "Set direction for the first vector of a constructor." + ! " Double-click to make a B-line constructor." + ! " Press Escape to cancel constructor."; } --- 201,207 ---- */ private String secondClickTip() { ! return "Set direction of first vector." + ! " Double-click to make a B-line." + ! " Escape cancels."; } *************** *** 211,216 **** */ private String thirdClickTip() { ! return "Set direction of second vector of a B-plane." + ! " Press Escape to cancel constructor."; } } --- 211,216 ---- */ private String thirdClickTip() { ! return "Set direction of second vector." + ! " Escape cancels."; } } Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** RectTool.java 18 Nov 2007 21:30:17 -0000 1.27 --- RectTool.java 7 Dec 2007 12:48:31 -0000 1.28 *************** *** 222,226 **** */ public String initialTip() { ! return "Set first corner of the rectangle"; } --- 222,226 ---- */ public String initialTip() { ! return "Set first corner of the rectangle."; } *************** *** 230,236 **** */ private String secondClickTip() { ! return "Set the height and direction of the rectangle." + ! " Use \"length\" to type a specific height." + ! " Press Escape to cancel drawing"; } --- 230,235 ---- */ private String secondClickTip() { ! return "Set the height or type length." + ! " Escape cancels."; } *************** *** 240,246 **** */ private String thirdClickTip() { ! return "Set the width of the rectangle." + ! "Use \"length\" to type a specific width." + ! " Press Escape to cancel drawing"; } --- 239,244 ---- */ private String thirdClickTip() { ! return "Set the width or type length." + ! " Escape cancels"; } |
From: Michael L. <he...@us...> - 2007-12-07 12:48:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26318/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Adjusted initial sizes of view and changed tips to prepare for demo Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** GUI.java 4 Dec 2007 19:15:21 -0000 1.83 --- GUI.java 7 Dec 2007 12:48:37 -0000 1.84 *************** *** 698,703 **** tree.addTab("Library", new JScrollPane (new LibraryTreeView())); tree.addTab("DBK", new JScrollPane (new DBKTreeView())); ! tree.setMinimumSize(new Dimension(180, 240)); ! tree.setPreferredSize(new Dimension(240, 240)); registerPanel(tree, SPLIT_LEFT); } --- 698,703 ---- tree.addTab("Library", new JScrollPane (new LibraryTreeView())); tree.addTab("DBK", new JScrollPane (new DBKTreeView())); ! tree.setMinimumSize(new Dimension(140, 240)); ! tree.setPreferredSize(new Dimension(280, 240)); registerPanel(tree, SPLIT_LEFT); } |
From: Michael L. <he...@us...> - 2007-12-07 12:48:30
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26296/src/net/sourceforge/bprocessor/gl Modified Files: Editor.java Log Message: Adjusted initial sizes of view and changed tips to prepare for demo Index: Editor.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/Editor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Editor.java 22 Nov 2007 10:46:22 -0000 1.7 --- Editor.java 7 Dec 2007 12:48:31 -0000 1.8 *************** *** 229,233 **** jp.add(glc, BorderLayout.CENTER); jp.setMinimumSize(new Dimension(320, 240)); ! jp.setPreferredSize(new Dimension(640, 480)); } --- 229,233 ---- jp.add(glc, BorderLayout.CENTER); jp.setMinimumSize(new Dimension(320, 240)); ! jp.setPreferredSize(new Dimension(450, 450)); } |
From: Michael L. <he...@us...> - 2007-12-07 11:00:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16799/src/net/sourceforge/bprocessor/model Modified Files: Command.java Space.java Log Message: Surfaces with size 4 is drawn as quads Grid generation Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.209 retrieving revision 1.210 diff -C2 -d -r1.209 -r1.210 *** Space.java 2 Dec 2007 12:02:14 -0000 1.209 --- Space.java 7 Dec 2007 11:00:22 -0000 1.210 *************** *** 1408,1412 **** } if (isInstance()) { ! result.add(anchor.center()); } if (container) { --- 1408,1412 ---- } if (isInstance()) { ! result.addAll(anchor.collect()); } if (container) { Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** Command.java 3 Dec 2007 22:02:24 -0000 1.47 --- Command.java 7 Dec 2007 11:00:22 -0000 1.48 *************** *** 1640,1652 **** parameters.put("surface", surface); parameters.put("x distance", 0.5); } ! /** {@inheritDoc} */ ! @Override ! public void evaluate() { ! Surface surface = (Surface) parameters.get("surface"); ! double xdistance = parameters.getDouble("x distance"); ! Space owner = surface.getOwner(); ! ! Space net = Space.createNet(""); HashMap map = new HashMap(); --- 1640,1648 ---- parameters.put("surface", surface); parameters.put("x distance", 0.5); + parameters.put("y distance", 0.5); } ! ! private Space createVerticalNet(Surface surface, double xdistance) { ! Space net = Space.createNet("Vertical Net"); HashMap map = new HashMap(); *************** *** 1656,1661 **** } - - Vertex vertex = surface.getFirstVertex(); Vertex normal = surface.normal(); --- 1652,1655 ---- *************** *** 1682,1686 **** } Vertex min = system.unTranslate(new Vertex(xmin, ymin, 0)); - Vertex max = system.unTranslate(new Vertex(xmax, xmax, 0)); Vertex origin = min; --- 1676,1679 ---- *************** *** 1716,1720 **** } if (intersections.size() > 0) { ! for (int j = 0; j < (int) (intersections.size() / 2); j++) { Iterator<Vertex> iter = intersections.iterator(); Vertex from = iter.next(); --- 1709,1713 ---- } if (intersections.size() > 0) { ! for (int j = 0; j < (intersections.size() / 2); j++) { Iterator<Vertex> iter = intersections.iterator(); Vertex from = iter.next(); *************** *** 1728,1731 **** --- 1721,1845 ---- Geometry.insertEdges(net, contour); Geometry.insertEdges(net, verticals); + + return net; + } + + private static int round(double value) { + int n = (int) Math.floor(value); + double rest = value - n; + if (rest < 0.0000001) { + n--; + } + return n; + } + + private Space createGrid(Surface surface, double dx, double dy) { + Space net = Space.createNet("Grid Net"); + HashMap map = new HashMap(); + + List<Edge> contour = new LinkedList(); + for (Edge current : surface.getEdges()) { + contour.add((Edge) current.copy(map)); + } + + Vertex vertex = surface.getFirstVertex(); + Vertex normal = surface.normal(); + CoordinateSystem system = CoordinateSystem.systemFor(vertex, normal); + + List<Vertex> vertices = Offset.vertices(contour); + List<Vertex> locals = system.translate(vertices); + + double xmin = Double.MAX_VALUE; + double xmax = Double.MIN_VALUE; + double ymin = Double.MAX_VALUE; + double ymax = Double.MIN_VALUE; + for (Vertex current : locals) { + if (current.getX() < xmin) { + xmin = current.getX(); + } + if (current.getX() > xmax) { + xmax = current.getX(); + } + if (current.getY() < ymin) { + ymin = current.getY(); + } + if (current.getY() > ymax) { + ymax = current.getY(); + } + } + + double width = xmax - xmin; + double height = ymax - ymin; + + int n = round(width / dx); + int m = round(height / dy); + + Vertex[][] grid = new Vertex[n][m]; + { + double x = xmin; + for (int i = 0; i < n; i++) { + x = x + dx; + double y = ymin; + for (int j = 0; j < m; j++) { + y = y + dy; + grid[i][j] = new Vertex(x, y, 0); + } + } + } + + List<Edge> verticals = new LinkedList(); + { + for (int i = 0; i < n; i++) { + for (int j = 0; j < m - 1; j++) { + Vertex from = grid[i][j]; + Vertex to = grid[i][j + 1]; + verticals.add(new Edge(from, to)); + } + } + } + + List<Edge> horizontals = new LinkedList(); + { + for (int j = 0; j < m; j++) { + for (int i = 0; i < n - 1; i++) { + Vertex from = grid[i][j]; + Vertex to = grid[i + 1][j]; + horizontals.add(new Edge(from, to)); + } + } + } + + List<Edge> all = new LinkedList(); + all.addAll(verticals); + all.addAll(horizontals); + + { + for (int i = 0; i < n; i++) { + for (int j = 0; j < m; j++) { + Vertex current = grid[i][j]; + Vertex global = system.unTranslate(current); + current.set(global); + } + } + } + Geometry.insertEdges(net, all); + + + return net; + } + + /** {@inheritDoc} */ + @Override + public void evaluate() { + Surface surface = (Surface) parameters.get("surface"); + double xdistance = parameters.getDouble("x distance"); + double ydistance = parameters.getDouble("y distance"); + Space net; + if (xdistance > 0.0000001 && ydistance > 0.00001) { + net = createGrid(surface, xdistance, ydistance); + } else { + net = createVerticalNet(surface, xdistance); + } + Space owner = surface.getOwner(); owner.add(net); } |
From: Michael L. <he...@us...> - 2007-12-07 11:00:12
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16588/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Surfaces with size 4 is drawn as quads Grid generation Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Display.java 3 Dec 2007 17:54:29 -0000 1.62 --- Display.java 7 Dec 2007 11:00:15 -0000 1.63 *************** *** 13,16 **** --- 13,17 ---- import java.util.HashMap; import java.util.HashSet; + import java.util.Iterator; import java.util.LinkedList; import java.util.List; *************** *** 540,552 **** } private static void draw(Surface surface, boolean reverse) { ! glu.gluTessBeginPolygon(tesselator, null); ! drawContour(surface, reverse); ! for (Surface current : surface.getHoles()) { ! if (surface.getOwner() == current.getOwner()) { ! drawContour(current, reverse); } } - glu.gluTessEndPolygon(tesselator); } --- 541,581 ---- } + private static void drawQuad(Surface surface, boolean reverse) { + List<Vertex> vertices = surface.getVertices(); + Iterator<Vertex> iter = vertices.iterator(); + Vertex v0 = iter.next(); + Vertex v1 = iter.next(); + Vertex v2 = iter.next(); + Vertex v3 = iter.next(); + if (reverse) { + gl.glBegin(GL.GL_QUADS); + gl.glVertex3d(v3.getX(), v3.getY(), v3.getZ()); + gl.glVertex3d(v2.getX(), v2.getY(), v2.getZ()); + gl.glVertex3d(v1.getX(), v1.getY(), v1.getZ()); + gl.glVertex3d(v0.getX(), v0.getY(), v0.getZ()); + gl.glEnd(); + } else { + gl.glBegin(GL.GL_QUADS); + gl.glVertex3d(v0.getX(), v0.getY(), v0.getZ()); + gl.glVertex3d(v1.getX(), v1.getY(), v1.getZ()); + gl.glVertex3d(v2.getX(), v2.getY(), v2.getZ()); + gl.glVertex3d(v3.getX(), v3.getY(), v3.getZ()); + gl.glEnd(); + } + } + private static void draw(Surface surface, boolean reverse) { ! if (surface.getEdges().size() == 4 && surface.getHoles().size() == 0) { ! drawQuad(surface, reverse); ! } else { ! glu.gluTessBeginPolygon(tesselator, null); ! drawContour(surface, reverse); ! for (Surface current : surface.getHoles()) { ! if (surface.getOwner() == current.getOwner()) { ! drawContour(current, reverse); ! } } + glu.gluTessEndPolygon(tesselator); } } *************** *** 891,894 **** --- 920,929 ---- } + long t0 = System.currentTimeMillis(); + long tc0 = System.currentTimeMillis(); + long ts0 = 0; + long ts1 = 0; + long te0 = 0; + long te1 = 0; { // Geometry collection *************** *** 987,990 **** --- 1022,1028 ---- } + long tc1 = System.currentTimeMillis(); + + if (interior) { // Geometry rendering *************** *** 1009,1013 **** --- 1047,1053 ---- paintSurfaces(surfaces, alice); } else if (mode == View.LIGHTING_MODE) { + ts0 = System.currentTimeMillis(); paintSurfaces(surfaces, transparency); + ts1 = System.currentTimeMillis(); } else if (mode == View.WIREFRAME_MODE) { // do not paint surfaces *************** *** 1046,1050 **** --- 1086,1094 ---- color = grey; } + + te0 = System.currentTimeMillis(); paintEdges(normal, color, size); + te1 = System.currentTimeMillis(); + paintEdges(smooth, grey, 1.0f); paintStippled(stippled, middleblue, size); *************** *** 1067,1070 **** --- 1111,1124 ---- } } + long t1 = System.currentTimeMillis(); + + long overall = t1 - t0; + long ctime = tc1 - tc0; + long stime = ts1 - ts0; + long etime = te1 - te0; + if (overall > 1000) { + System.out.println(space + " all: " + overall); + System.out.println("c: " + ctime + " s: " + stime + " e: " + etime); + } for (Space current : elements) { draw(current, inside || (current == active)); |
From: Michael L. <he...@us...> - 2007-12-06 14:05:41
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10941/src/net/sourceforge/bprocessor/gl/tool Modified Files: TapeMeasure.java Log Message: Fixed problem in tape-measure Index: TapeMeasure.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/TapeMeasure.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** TapeMeasure.java 23 Nov 2007 12:58:46 -0000 1.8 --- TapeMeasure.java 6 Dec 2007 14:05:38 -0000 1.9 *************** *** 52,56 **** List edges = new LinkedList(); if (originalEdge != null) { ! Line line = new Line(current.vertex(), originalEdge.getDirection(), true, false); edges.add(line); Vertex normal = originalEdge.getDirection(); --- 52,58 ---- List edges = new LinkedList(); if (originalEdge != null) { ! Vertex v = originalEdge.getDirection(); ! v.normalize(); ! Line line = new Line(current.vertex(), v, true, false); edges.add(line); Vertex normal = originalEdge.getDirection(); *************** *** 124,132 **** } else { if (originalEdge != null) { ! Line line = new Line(current.vertex(), originalEdge.getDirection(), true, false); insert(line); } else { if (lengthEdge != null) { ! Line line = new Line(start.vertex(), lengthEdge.getDirection(), true, false); insert(line); } --- 126,138 ---- } else { if (originalEdge != null) { ! Vertex v = originalEdge.getDirection(); ! v.normalize(); ! Line line = new Line(current.vertex(), v, true, false); insert(line); } else { if (lengthEdge != null) { ! Vertex v = lengthEdge.getDirection(); ! v.normalize(); ! Line line = new Line(start.vertex(), v, true, false); insert(line); } |
From: Michael L. <he...@us...> - 2007-12-05 10:25:38
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21747/src/net/sourceforge/bprocessor/model Modified Files: Vertex.java Log Message: no foo Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** Vertex.java 5 Dec 2007 10:24:02 -0000 1.72 --- Vertex.java 5 Dec 2007 10:25:34 -0000 1.73 *************** *** 23,28 **** private static Logger log = Logger.getLogger(Vertex.class); - private static int foo; - /** X component in a double-array */ public static final int X = 0; --- 23,26 ---- |