bprocessor-commit Mailing List for B-processor (Page 35)
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-05 10:24:06
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21012/src/net/sourceforge/bprocessor/model Modified Files: Vertex.java Log Message: foo Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** Vertex.java 22 Nov 2007 10:12:49 -0000 1.71 --- Vertex.java 5 Dec 2007 10:24:02 -0000 1.72 *************** *** 23,26 **** --- 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; |
From: rimestad <rim...@us...> - 2007-12-04 19:15:25
|
Update of /cvsroot/bprocessor//gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6157/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Changed lib and DBK position Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor//gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** GUI.java 19 Nov 2007 17:50:29 -0000 1.82 --- GUI.java 4 Dec 2007 19:15:21 -0000 1.83 *************** *** 696,701 **** tree.addTab("Project", new JScrollPane (new SpaceTreeView())); tree.addTab("Views", new CameraView()); - tree.addTab("DBK", new JScrollPane (new DBKTreeView())); tree.addTab("Library", new JScrollPane (new LibraryTreeView())); tree.setMinimumSize(new Dimension(180, 240)); tree.setPreferredSize(new Dimension(240, 240)); --- 696,701 ---- tree.addTab("Project", new JScrollPane (new SpaceTreeView())); tree.addTab("Views", new CameraView()); 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)); |
From: Michael L. <he...@us...> - 2007-12-04 13:54:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4864/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: CoordinateSystem transformations Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** PopupMenu.java 4 Dec 2007 12:21:11 -0000 1.83 --- PopupMenu.java 4 Dec 2007 13:54:38 -0000 1.84 *************** *** 8,11 **** --- 8,12 ---- import java.awt.event.ActionEvent; + import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; *************** *** 455,481 **** private static CoordinateSystem systemFor(Vertex vertex) { Collection<Edge> edges = vertex.getEdges(); ! double x = 0; ! double y = 0; ! double z = 0; ! for (Edge current : edges) { ! Vertex other = current.otherVertex(vertex); Vertex v = other.minus(vertex); ! x += v.getX(); ! y += v.getY(); ! z += v.getZ(); } - x /= edges.size(); - y /= edges.size(); - z /= edges.size(); - Vertex n = new Vertex(-x, -y, -z); - Edge edge = edges.iterator().next(); - Vertex other = edge.otherVertex(vertex); - - Vertex v = other.minus(vertex); - Vertex i = n.cross(v); - Vertex j = n.cross(i); - - Vertex o = vertex.copy(); - return new CoordinateSystem(i, j, n, o); } --- 456,486 ---- private static CoordinateSystem systemFor(Vertex vertex) { Collection<Edge> edges = vertex.getEdges(); ! if (edges.size() == 0) { ! CoordinateSystem active = Project.getInstance().getActiveCoordinateSystem(); ! return active.copy(vertex.copy()); ! } else { ! double x = 0; ! double y = 0; ! double z = 0; ! for (Edge current : edges) { ! Vertex other = current.otherVertex(vertex); ! Vertex v = other.minus(vertex); ! x += v.getX(); ! y += v.getY(); ! z += v.getZ(); ! } ! x /= edges.size(); ! y /= edges.size(); ! z /= edges.size(); ! Vertex n = new Vertex(-x, -y, -z); ! Edge edge = edges.iterator().next(); ! Vertex other = edge.otherVertex(vertex); ! Vertex v = other.minus(vertex); ! Vertex i = n.cross(v); ! Vertex j = n.cross(i); ! Vertex o = vertex.copy(); ! return new CoordinateSystem(i, j, n, o); } } *************** *** 659,662 **** --- 664,707 ---- menu.add(action); } + { + AbstractAction action = new GeometricMenuAction(arguments, "Transform In") { + public void actionPerformed(ActionEvent event) { + List<Vertex> vertices = new ArrayList(Geometry.collect(entities)); + CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); + List<Vertex> locals = system.unTranslate(vertices); + for (int i = 0; i < locals.size(); i++) { + Vertex v1 = vertices.get(i); + Vertex v2 = locals.get(i); + v1.set(v2); + } + for (Vertex current : vertices) { + current.update(); + } + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); + } + }; + menu.add(action); + } + { + AbstractAction action = new GeometricMenuAction(arguments, "Transform Out") { + public void actionPerformed(ActionEvent event) { + List<Vertex> vertices = new ArrayList(Geometry.collect(entities)); + CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); + List<Vertex> locals = system.translate(vertices); + for (int i = 0; i < locals.size(); i++) { + Vertex v1 = vertices.get(i); + Vertex v2 = locals.get(i); + v1.set(v2); + } + for (Vertex current : vertices) { + current.update(); + } + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); + } + }; + menu.add(action); + } return menu; |
From: Michael L. <he...@us...> - 2007-12-04 12:21:09
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29219/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: Align Axes implemented for more objects Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.82 retrieving revision 1.83 diff -C2 -d -r1.82 -r1.83 *** PopupMenu.java 3 Dec 2007 15:01:42 -0000 1.82 --- PopupMenu.java 4 Dec 2007 12:21:11 -0000 1.83 *************** *** 57,76 **** /** - * make a popup menu for a surface - * @param surface the surface - * @return the popupmenu - */ - public static JPopupMenu getSurfaceMenu(Surface surface) { - Collection c = new LinkedList(); - c.add(surface); - return getSurfaceMenu(c); - } - - /** * Make a popupmenu for a list of surfaces * @param surfaces the list of surfaces * @return the popupmenu */ ! public static JPopupMenu getSurfaceMenu(Collection surfaces) { JPopupMenu menu = getGeometricMenu(surfaces); if (surfaces.size() == 1) { --- 57,65 ---- /** * Make a popupmenu for a list of surfaces * @param surfaces the list of surfaces * @return the popupmenu */ ! private static JPopupMenu getSurfaceMenu(Collection surfaces) { JPopupMenu menu = getGeometricMenu(surfaces); if (surfaces.size() == 1) { *************** *** 156,160 **** * @return Menu for edges */ ! public static JPopupMenu getEdgeMenu(Collection edges) { JPopupMenu menu = getGeometricMenu(edges); { --- 145,149 ---- * @return Menu for edges */ ! private static JPopupMenu getEdgeMenu(Collection edges) { JPopupMenu menu = getGeometricMenu(edges); { *************** *** 194,214 **** * @return Menu for coordinate systems */ ! public static JPopupMenu getCoordinateSystemMenu(Collection systems) { JPopupMenu menu = getGeometricMenu(systems); return menu; } - /** - * A popup generator for a space - * @param space the space - * @return the popup menu - */ - public static JPopupMenu getSpaceMenu(Space space) { - Collection c = new LinkedList(); - c.add(space); - return getSpaceMenu(c); - } - - private abstract static class ModellorAction extends AbstractAction { protected Modellor modellor; --- 183,191 ---- * @return Menu for coordinate systems */ ! private static JPopupMenu getCoordinateSystemMenu(Collection systems) { JPopupMenu menu = getGeometricMenu(systems); return menu; } private abstract static class ModellorAction extends AbstractAction { protected Modellor modellor; *************** *** 227,231 **** * @return the popup menu */ ! public static JPopupMenu getSpaceMenu(Collection s) { JPopupMenu menu = PopupMenu.getGeometricMenu(s); --- 204,208 ---- * @return the popup menu */ ! private static JPopupMenu getSpaceMenu(Collection s) { JPopupMenu menu = PopupMenu.getGeometricMenu(s); *************** *** 462,465 **** --- 439,488 ---- return pm; } + + private static CoordinateSystem systemFor(Geometric geometric) { + if (geometric instanceof Vertex) { + return systemFor((Vertex) geometric); + } else if (geometric instanceof Surface) { + return systemFor((Surface) geometric); + } else if (geometric instanceof CoordinateSystem) { + return (CoordinateSystem) geometric; + } else { + CoordinateSystem active = Project.getInstance().getActiveCoordinateSystem(); + return active.copy(geometric.center()); + } + } + + private static CoordinateSystem systemFor(Vertex vertex) { + Collection<Edge> edges = vertex.getEdges(); + double x = 0; + double y = 0; + double z = 0; + for (Edge current : edges) { + Vertex other = current.otherVertex(vertex); + Vertex v = other.minus(vertex); + x += v.getX(); + y += v.getY(); + z += v.getZ(); + } + x /= edges.size(); + y /= edges.size(); + z /= edges.size(); + Vertex n = new Vertex(-x, -y, -z); + Edge edge = edges.iterator().next(); + Vertex other = edge.otherVertex(vertex); + + Vertex v = other.minus(vertex); + Vertex i = n.cross(v); + Vertex j = n.cross(i); + + Vertex o = vertex.copy(); + return new CoordinateSystem(i, j, n, o); + } + + private static CoordinateSystem systemFor(Surface surface) { + Vertex normal = surface.normal(); + Vertex origin = surface.center(); + return CoordinateSystem.systemFor(origin, normal); + } /** *************** *** 468,472 **** * @return the popupmenu */ ! public static JPopupMenu getGeometricMenu(Collection<Geometric> arguments) { JPopupMenu menu = new JPopupMenu(); AbstractAction delete = new GeometricMenuAction(arguments, "Delete") { --- 491,495 ---- * @return the popupmenu */ ! private static JPopupMenu getGeometricMenu(Collection<Geometric> arguments) { JPopupMenu menu = new JPopupMenu(); AbstractAction delete = new GeometricMenuAction(arguments, "Delete") { *************** *** 535,569 **** if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); ! if (geometric instanceof Vertex) { ! Vertex vertex = (Vertex) geometric; ! Collection<Edge> edges = vertex.getEdges(); ! double x = 0; ! double y = 0; ! double z = 0; ! for (Edge current : edges) { ! Vertex other = current.otherVertex(vertex); ! Vertex v = other.minus(vertex); ! x += v.getX(); ! y += v.getY(); ! z += v.getZ(); ! } ! x /= edges.size(); ! y /= edges.size(); ! z /= edges.size(); ! Vertex n = new Vertex(x, y, z); ! Edge edge = edges.iterator().next(); ! Vertex other = edge.otherVertex(vertex); ! ! Vertex v = other.minus(vertex); ! Vertex i = n.cross(v); ! Vertex j = n.cross(i); ! ! Vertex o = vertex.copy(); ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); ! system.setIJN(i, j, n); ! system.setOrigin(o); ! Project.getInstance().changed(Project.getInstance()); ! Project.getInstance().checkpoint(); ! } } } --- 558,571 ---- if (entities.size() == 1) { Geometric geometric = entities.iterator().next(); ! CoordinateSystem system = systemFor(geometric); ! Vertex i = system.getI(); ! Vertex j = system.getJ(); ! Vertex n = system.getN(); ! Vertex o = system.getOrigin(); ! CoordinateSystem active = Project.getInstance().getActiveCoordinateSystem(); ! active.setIJN(i, j, n); ! active.setOrigin(o); ! Project.getInstance().changed(Project.getInstance()); ! Project.getInstance().checkpoint(); } } *************** *** 749,753 **** * @return JPopupMenu */ ! public JPopupMenu getAnalysisMenu() { JPopupMenu menu = new JPopupMenu(); AbstractAction planeanalysis = new AbstractAction("Plane Analysis") { --- 751,755 ---- * @return JPopupMenu */ ! private JPopupMenu getAnalysisMenu() { JPopupMenu menu = new JPopupMenu(); AbstractAction planeanalysis = new AbstractAction("Plane Analysis") { |
From: Michael L. <he...@us...> - 2007-12-03 22:02:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19419/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: frame creates space Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** Command.java 3 Dec 2007 15:01:37 -0000 1.46 --- Command.java 3 Dec 2007 22:02:24 -0000 1.47 *************** *** 1287,1296 **** public Frame(Space net) { this.net = net; ! parameters.put("outside-frame", 0.2); ! parameters.put("inside-frame", 0.1); ! parameters.put("interior", 0.1); ! parameters.put("depth", 1.0); } /** {@inheritDoc} */ @Override --- 1287,1334 ---- public Frame(Space net) { this.net = net; ! parameters.put("outside-frame", 0.0); ! parameters.put("inside-frame", 0.035); ! parameters.put("interior", 0.035); ! parameters.put("depth", 0.07); ! ! parameters.put("frame name", "Frame"); ! parameters.put("exterior name", "Exterior"); ! parameters.put("hole name", "Hole"); ! } ! ! private List<Edge> simplify(List<Edge> edges) { ! if (edges.size() > 3) { ! List<Edge> result = new LinkedList(); ! List<Vertex> vertices = Offset.vertices(edges); ! LinkedList<Vertex> live = new LinkedList(); ! { ! int n = vertices.size(); ! Vertex previous = vertices.get(n - 1); ! Vertex current = vertices.get(0); ! Vertex next = null; ! for (int i = 0; i < n; i++) { ! next = vertices.get((i + 1) % n); ! Vertex u = current.minus(previous); ! Vertex v = next.minus(current); ! Vertex cross = u.cross(v); ! if (!cross.isZero()) { ! live.add(current); ! } ! previous = current; ! current = next; ! } ! } ! Vertex previous = live.getLast(); ! for (Vertex current : live) { ! result.add(new Edge(previous, current)); ! previous = current; ! } ! return result; ! } else { ! return edges; ! } } + /** {@inheritDoc} */ @Override *************** *** 1300,1304 **** double delta = parameters.getDouble("interior"); double depth = parameters.getDouble("depth"); ! List<Surface> surfaces = new LinkedList(); --- 1338,1344 ---- double delta = parameters.getDouble("interior"); double depth = parameters.getDouble("depth"); ! String frameName = (String) parameters.get("frame name"); ! String exteriorName = (String) parameters.get("exterior name"); ! String holeName = (String) parameters.get("hole name"); List<Surface> surfaces = new LinkedList(); *************** *** 1331,1335 **** List<Edge> offset = Offset.offset(boundary, inside + outside - (delta / 2)); ! Surface exterior = new Surface(offset); inserted.add(exterior); --- 1371,1375 ---- List<Edge> offset = Offset.offset(boundary, inside + outside - (delta / 2)); ! Surface exterior = new Surface(simplify(offset)); inserted.add(exterior); *************** *** 1337,1341 **** List<Surface> interior = new LinkedList(); for (Surface current : surfaces) { ! interior.add(new Surface(Offset.offset(current.getEdges(), -delta / 2))); } inserted.addAll(interior); --- 1377,1382 ---- List<Surface> interior = new LinkedList(); for (Surface current : surfaces) { ! List<Edge> curve = Offset.offset(current.getEdges(), -delta / 2); ! interior.add(new Surface(simplify(curve))); } inserted.addAll(interior); *************** *** 1345,1351 **** } if (depth != 0) { Collection<Surface> sides = new LinkedList(); - Set<Surface> tops = new HashSet(); Surface top = exterior.extrusionall(depth, sides, tops); inserted.addAll(sides); --- 1386,1394 ---- } + + Set<Surface> tops = new HashSet(); + if (depth != 0) { Collection<Surface> sides = new LinkedList(); Surface top = exterior.extrusionall(depth, sides, tops); inserted.addAll(sides); *************** *** 1354,1360 **** } ! for (Surface current : inserted) { ! union.insert(current); } net.getOwner().add(union); } --- 1397,1455 ---- } ! Shape.addTo(union, inserted); ! ! { ! Space ext = new Space(exteriorName, Space.FUNCTIONAL, true); ! Space frame = new Space(frameName, Space.CONSTRUCTION, true); ! if (depth > 0) { ! exterior.assignBack(ext, true); ! exterior.assignFront(frame, true); ! } else { ! exterior.assignFront(ext, true); ! exterior.assignBack(frame, true); ! } ! union.add(ext); ! union.add(frame); ! Vertex n1 = exterior.normal(); ! int i = 0; ! for (Surface current : interior) { ! i++; ! Vertex n2 = current.normal(); ! double sign; ! if (n1.dot(n2) < 0) { ! sign = -depth; ! } else { ! sign = depth; ! } ! Space hole = new Space(holeName + " " + i, Space.FUNCTIONAL, true); ! if (sign > 0) { ! current.assignFront(hole, true); ! current.setBackDomain(ext); ! } else { ! current.assignBack(hole, true); ! current.setFrontDomain(ext); ! } ! for (Surface s : tops) { ! if (s.getBackDomain().isVoid()) { ! s.setBackDomain(ext); ! } ! if (s.getFrontDomain().isVoid()) { ! s.setFrontDomain(ext); ! } ! } ! for (Surface s : hole.getEnvelope()) { ! if (s.getBackDomain().isVoid()) { ! s.setBackDomain(frame); ! } ! if (s.getFrontDomain().isVoid()) { ! s.setFrontDomain(frame); ! } ! } ! ! union.add(hole); ! } } + + net.getOwner().add(union); } |
From: rimestad <rim...@us...> - 2007-12-03 17:54:27
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18461/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: Made selection and visual gl drawing the same for constructors, and moved selection according to active space... Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** Display.java 21 Nov 2007 21:10:41 -0000 1.61 --- Display.java 3 Dec 2007 17:54:29 -0000 1.62 *************** *** 819,822 **** --- 819,823 ---- private static void drawInstance(Space space, boolean inside) { + gl.glPushMatrix(); translateToCoordinatesystem(space); if (USEDL && inside) { *************** *** 834,845 **** } boolean selActivated = false; if (selecting()) { push(space); selActivated = true; ! selecting = false; } ! drawSpace(space.getProto(), inside); if (selActivated) { selecting = true; pop(); } --- 835,854 ---- } 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(); } *************** *** 992,996 **** selectEdges(edges); } ! if (construction()) { selectConstructors(constructors); } --- 1001,1005 ---- selectEdges(edges); } ! if (space == active && construction()) { selectConstructors(constructors); } *************** *** 1005,1009 **** } } ! if (active == space) { if (construction()) { gl.glDepthMask(false); --- 1014,1018 ---- } } ! if (space == active) { if (construction()) { gl.glDepthMask(false); *************** *** 1072,1076 **** Vertex k = cs.getN(); Vertex center = cs.center(); - gl.glPushMatrix(); double[] matrix = new double[]{ i.getX(), i.getY(), i.getZ(), 0, --- 1081,1084 ---- *************** *** 1104,1107 **** --- 1112,1116 ---- Space space = (Space) current; if (space.isInstance()) { + gl.glPushMatrix(); translateToCoordinatesystem(space); } *************** *** 1290,1296 **** geometrics.addAll(Selection.primary()); if (target != null) { ! geometrics.add(target); } hilite(geometrics); } } --- 1299,1316 ---- geometrics.addAll(Selection.primary()); if (target != null) { ! Collection<Geometric> hilite = new HashSet(); ! hilite.add(target); ! hilite(hilite); ! } ! if (active.isInstance()) { ! gl.glPushMatrix(); ! translateToCoordinatesystem(active); } + hilite(geometrics); + + if (active.isInstance()) { + gl.glPopMatrix(); + } } } |
From: rimestad <rim...@us...> - 2007-12-03 17:53:05
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17564/src/net/sourceforge/bprocessor/model Modified Files: CoordinateSystem.java Log Message: Added geometry inference on instances... Do work for selection and such but screws move and others a bit up >:- Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** CoordinateSystem.java 22 Nov 2007 10:26:00 -0000 1.66 --- CoordinateSystem.java 3 Dec 2007 17:52:59 -0000 1.67 *************** *** 540,543 **** --- 540,571 ---- /** + * Untranslate a surface + * @param surface the surface + * @return the untranslated surface + */ + public Surface unTranslate(Surface surface) { + Surface res = (Surface)surface.copy(new HashMap()); + for (Vertex current : res.getVertices()) { + Vertex v = this.unTranslate(current); + current.set(v); + } + return res; + } + + /** + * Translate a surface to this coordinatesystem + * @param surface The surface + * @return The translated surface + */ + public Surface translate(Surface surface) { + Surface res = (Surface)surface.copy(new HashMap()); + for (Vertex current : res.getVertices()) { + Vertex v = this.translate(current); + current.set(v); + } + return res; + } + + /** * Translate an edge * @param edge The edge *************** *** 545,549 **** */ public Edge translate(Edge edge) { ! return new Edge(translate(edge.getFrom()), translate(edge.getTo())); } --- 573,580 ---- */ public Edge translate(Edge edge) { ! Edge res = edge.copy(); ! res.setFrom(translate(edge.getFrom())); ! res.setTo(translate(edge.getTo())); ! return res; } *************** *** 554,558 **** */ public Edge unTranslate(Edge edge) { ! return new Edge(unTranslate(edge.getFrom()), unTranslate(edge.getTo())); } --- 585,592 ---- */ public Edge unTranslate(Edge edge) { ! Edge res = edge.copy(); ! res.setFrom(unTranslate(edge.getFrom())); ! res.setTo(unTranslate(edge.getTo())); ! return res; } |
From: rimestad <rim...@us...> - 2007-12-03 17:52:52
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17546/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Added geometry inference on instances... Do work for selection and such but screws move and others a bit up >:- Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.266 retrieving revision 1.267 diff -C2 -d -r1.266 -r1.267 *** View.java 2 Dec 2007 12:02:04 -0000 1.266 --- View.java 3 Dec 2007 17:52:55 -0000 1.267 *************** *** 1239,1245 **** } - /** * Process Selection * @param unWantedEntities Entities to be ignored * @param intersections Are intersections wanted --- 1239,1260 ---- } /** * Process Selection + * + * --- Selection buffer contains --- + * [0] number of names on names stack = n_0 + * [1] minimum z value + * [2] maximum z value + * [3] top of names stack + * . + * . + * . + * [n_0+2] bottom of names stack + * [n_0+3] number of names on names stack for this record = n_1 + * [n_0+4] minimum z value + * . + * . + * . + * * @param unWantedEntities Entities to be ignored * @param intersections Are intersections wanted *************** *** 1269,1278 **** Collection<Edge> edges = new HashSet<Edge>(); for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); if (names > 0) { ! bufferOffset++; ! long z1 = 0xFFFFFFFFL & selectBuffer.get(bufferOffset); ! long z2 = 0xFFFFFFFFL & selectBuffer.get(bufferOffset + 1); double near = (double) z1 / (double) zMax; double far = (double) z2 / (double) zMax; --- 1284,1294 ---- Collection<Edge> edges = new HashSet<Edge>(); + Space instance = null; + for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); if (names > 0) { ! long z1 = 0xFFFFFFFFL & selectBuffer.get(bufferOffset + 1); ! long z2 = 0xFFFFFFFFL & selectBuffer.get(bufferOffset + 2); double near = (double) z1 / (double) zMax; double far = (double) z2 / (double) zMax; *************** *** 1281,1287 **** bufferOffset += 2; ! int id = selectBuffer.get(bufferOffset); ! bufferOffset += names; Object current = getObject(id); --- 1297,1307 ---- 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); *************** *** 1408,1411 **** --- 1428,1434 ---- ray = transformation.unProject(ray); if (vertex != null) { + if (instance != null) { + vertex = instance.getInstanceAnchor().unTranslate(vertex); + } return new Intersection(vertex, Intersection.VERTEX, vertex); } else { *************** *** 1413,1416 **** --- 1436,1442 ---- 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()); *************** *** 1455,1458 **** --- 1481,1487 ---- { if (lastSurface != null) { + if (instance != null) { + lastSurface = instance.getInstanceAnchor().unTranslate(lastSurface); + } if (!unWantedEntities.contains(lastSurface)) { Plane plane = lastSurface.plane(); *************** *** 1479,1482 **** --- 1508,1514 ---- } else { if (surface != null) { + if (instance != null) { + surface = instance.getInstanceAnchor().unTranslate(surface); + } Plane plane = surface.plane(); for (Edge current : (Collection<Edge>) edges) { *************** *** 1511,1515 **** } } else { ! if (object != null) { return object; } else if (vertex != null) { --- 1543,1549 ---- } } else { ! if (instance != null && instance != Project.getInstance().getActiveSpace()) { ! return instance; ! } else if (object != null) { return object; } else if (vertex != null) { |
From: rimestad <rim...@us...> - 2007-12-03 17:29:55
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8850/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Tool.java Added Files: ExtendTool.java Removed Files: ControlledExtrudeTool.java Log Message: Changed ControlledExtrudeTool to ExtendTool Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** ToolFactory.java 28 Nov 2007 12:46:47 -0000 1.95 --- ToolFactory.java 3 Dec 2007 17:29:48 -0000 1.96 *************** *** 135,139 **** private ZoomTool zoomTool; ! private ControlledExtrudeTool multiExtrude; protected static Cursor errorCursor; --- 135,139 ---- private ZoomTool zoomTool; ! private ExtendTool extendTool; protected static Cursor errorCursor; *************** *** 191,195 **** rotation = new RotationTool(editor, null); extrude = new ExtrusionTool(editor, pencilcursor); ! multiExtrude = new ControlledExtrudeTool(editor, pencilcursor); clipplane = new ClipplaneTool(editor, pencilcursor); tapeMeasure = new TapeMeasure(editor, pencilcursor); --- 191,195 ---- rotation = new RotationTool(editor, null); extrude = new ExtrusionTool(editor, pencilcursor); ! extendTool = new ExtendTool(editor, pencilcursor); clipplane = new ClipplaneTool(editor, pencilcursor); tapeMeasure = new TapeMeasure(editor, pencilcursor); *************** *** 227,231 **** registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); ! registerTool(Tool.MULTI_EXTRUDE_TOOL, multiExtrude, "Biconextrudetool2.gif", "Extend"); --- 227,231 ---- registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); ! registerTool(Tool.EXTEND_TOOL, extendTool, "Biconextrudetool2.gif", "Extend"); --- NEW FILE: ExtendTool.java --- //--------------------------------------------------------------------------------- // $Id: ExtendTool.java,v 1.1 2007/12/03 17:29:48 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.tool; import java.awt.Cursor; import java.awt.event.MouseEvent; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import org.apache.log4j.Logger; import net.sourceforge.bprocessor.gl.Editor; import net.sourceforge.bprocessor.gl.model.Intersection; import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Direction; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Mesh; import net.sourceforge.bprocessor.model.Plane; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; /** * A tool for push/pulling geometry * Should work as follows: * When a surface is pressed all its bound and unbound vertexes are found. * A bound vertex have edges that is not in the plane of the surface * A unbound is the opposite * All unbound vertexes are copied and connected to the copy by a edge, the * bound are moved in the direction of the edge that bounds it, * which should give a push/pull effect */ public class ExtendTool extends AbstractPencil { private static Logger log = Logger.getLogger(ExtendTool.class); private HashSet<Surface> extrusion; private Map<Vertex, Direction> v2dir; private Surface pressedSurface; private Plane dragPlane; private Collection<Surface> affected; private Vertex normal; private double maxExtrude; private double minExtrude; private Surface topSurface; private double length; /** * Tool constructor * @param editor The view to work in * @param cursor The cursor to use */ public ExtendTool(Editor editor, Cursor cursor) { super(editor, cursor); extrusion = new HashSet<Surface>(); affected = new HashSet<Surface>(); v2dir = new HashMap<Vertex, Direction>(); } /** {@inheritDoc} */ @Override public void onVertex() { if (pressedSurface != null) { Plane p = new Plane(normal.getX(), normal.getY(), normal.getZ(), current.vertex()); extrudeTo(p); finishTool(); } } /** {@inheritDoc} */ @Override protected void moved(MouseEvent e) { editor.getView().makeTarget(null); ArrayList<Surface> starter = new ArrayList<Surface>(); if (topSurface != pressedSurface) { starter.add(pressedSurface); } findTarget(e, starter); double x = e.getX(); double y = View.getHeight() - e.getY(); Vertex near = new Vertex(x, y, 0.0); Vertex far = new Vertex(x, y, 1.0); Edge ray = new Edge(near, far); Transformation transformation = editor.getView().transformation(); ray = transformation.unProject(ray); if (pressedSurface == null) { // If the extrusion havn't started yet if (target instanceof Surface) { editor.getView().makeTarget(target); current = new Intersection(((Surface)target).intersection(ray), Intersection.SURFACE, target); } } else { // The extrusion is started Vertex hit = dragPlane.intersection(ray); current = new Intersection(hit.minus(start.vertex()).projectOnto(normal).add(start.vertex()), Intersection.PLANE_INTERSECTION, dragPlane); //Find the plane to extrude to Plane p = null; if (target instanceof Surface) { Surface s = (Surface)target; if (affected.contains(s)) { Plane tmpP = s.plane(); findTarget(e, affected); if (target instanceof Surface) { Surface sur = (Surface)target; double dist = tmpP.distance(sur.getFirstVertex()); if (Math.abs(dist) < 0.001) { p = sur.plane(); } } } else { if (Math.abs((Math.abs(s.normal().angle(normal)) - Math.PI / 2)) >= 0.05) { p = new Plane(normal.projectOnto(s.normal()), s.getFirstVertex()); } } } if (p == null) { p = new Plane(normal.getX(), normal.getY(), normal.getZ(), current.vertex()); } if (v2dir.isEmpty()) { // If the extrusion isn't generated generate it Vertex delta = current.vertex().minus(start.vertex()); length = delta.length(); if (delta.angle(normal) > Math.PI / 2) { length *= -1; } topSurface = pressedSurface.extrusionControlled(length, extrusion, v2dir); if (topSurface != pressedSurface) { extrusion.add(topSurface); } affected.add(pressedSurface); affected.addAll(extrusion); affected.addAll(Edge.surfaces(topSurface.getEdges())); excluded(affected); Project.getInstance().getActiveSpace().addProtected(extrusion); maxExtrude = Double.POSITIVE_INFINITY; minExtrude = Double.NEGATIVE_INFINITY; for (Vertex v : v2dir.keySet()) { Direction d = v2dir.get(v); double scalar = d.getDirection().projectOnto(p.normal()).length(); double maxval = d.upper() * scalar; if (maxval < maxExtrude) { maxExtrude = maxval; } double minVal = d.lower() * scalar; if (minVal > minExtrude) { minExtrude = minVal; } } } else { //the extrusion is generated move it to the correct location extrudeTo(p); } } } private void extrudeTo(Plane p) { double dist = p.distance(start.vertex()) * -1; if (dist < minExtrude) { p.moveDelta(dist - minExtrude); } if (dist > maxExtrude) { p.moveDelta(dist - maxExtrude); } if (dist != 0) { current.vertex().set(p.intersection(start.vertex(), normal, true)); } else { current.vertex().set(start.vertex()); } for (Vertex v : v2dir.keySet()) { Direction d = v2dir.get(v); Vertex intersection = p.intersection(d.getVertex(), d.getDirection(), true); if (intersection != null) { d.getVertex().set(intersection); } } updateLength(); } /** {@inheritDoc} */ @Override protected void pressed(MouseEvent e) { //current = findIntersection(e); if (v2dir.isEmpty() && target != null && target instanceof Surface) { active = true; start = current; pressedSurface = (Surface)target; Transformation transformation = editor.getView().transformation(); double x = e.getX(); double y = View.getHeight() - e.getY(); Vertex near = new Vertex(x, y, 0.0); Vertex far = new Vertex(x, y, 1.0); Edge ray = new Edge(near, far); ray = transformation.unProject(ray); Vertex dir = ray.getDirection(); dir.normalize(); normal = pressedSurface.normal(); Vertex tmp = dir.cross(normal); dir = tmp.cross(normal); dragPlane = new Plane(dir.getX(), dir.getY(), dir.getZ(), pressedSurface.intersection(ray)); } else { finishTool(); } } private void finishTool() { Space owner = Project.getInstance().getActiveSpace(); owner.removeProtected(extrusion); if (pressedSurface != null && !start.vertex().minus(current.vertex()).projectOnto(normal).isZero()) { excluded(new ArrayList()); Mesh m = new Mesh(extrusion); m = owner.insert(m); if (extrusion.isEmpty()) { owner.simplify(); } for (Surface s : m.surfaces()) { if (s.equivalent(pressedSurface)) { pressedSurface = s; } else if (s.equivalent(topSurface)) { topSurface = s; } } if (pressedSurface != null) { if (pressedSurface.getExterior() != null) { if (length > 0) { pressedSurface.assignFront(pressedSurface.getBackDomain(), true); } else { pressedSurface.assignBack(pressedSurface.getFrontDomain(), true); } } else { if (length > 0) { pressedSurface.assignFront(pressedSurface.getFrontDomain(), true); } else { pressedSurface.assignBack(pressedSurface.getBackDomain(), true); } } } if (topSurface != null) { if (topSurface.getExterior() != null) { Surface.mergeSpaceAssign(topSurface, topSurface.getExterior(), topSurface); } } owner.changed(); Project.getInstance().checkpoint(); } cleanUp(); } /** {@inheritDoc} */ @Override public void prepare() { super.prepare(); if (!getSelection().isEmpty()) { Selection.primary().clear(); } } /** {@inheritDoc} */ @Override public void escape() { if (pressedSurface != null) { Project.getInstance().resetState(); } cleanUp(); } /** {@inheritDoc} */ @Override public void cleanUp() { super.cleanUp(); extrusion.clear(); affected.clear(); v2dir.clear(); pressedSurface = null; topSurface = null; dragPlane = null; normal = null; active = false; length = 0; maxExtrude = Double.POSITIVE_INFINITY; minExtrude = Double.NEGATIVE_INFINITY; } /** {@inheritDoc} */ @Override public String initialTip() { return "Press a surface and drag it to push/pull it"; } } Index: Tool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Tool.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Tool.java 28 Nov 2007 10:39:21 -0000 1.40 --- Tool.java 3 Dec 2007 17:29:48 -0000 1.41 *************** *** 54,58 **** public static final int CONSTRUCTOR_TOOL = 14; /** The controlled extrude tool */ ! public static final int MULTI_EXTRUDE_TOOL = 15; /** The Offset tool */ public static final int OFFSET_TOOL = 16; --- 54,58 ---- public static final int CONSTRUCTOR_TOOL = 14; /** The controlled extrude tool */ ! public static final int EXTEND_TOOL = 15; /** The Offset tool */ public static final int OFFSET_TOOL = 16; --- ControlledExtrudeTool.java DELETED --- |
From: Michael L. <he...@us...> - 2007-12-03 15:01:45
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15177/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: command to insert a net based on a surface Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.81 retrieving revision 1.82 diff -C2 -d -r1.81 -r1.82 *** PopupMenu.java 2 Dec 2007 12:02:20 -0000 1.81 --- PopupMenu.java 3 Dec 2007 15:01:42 -0000 1.82 *************** *** 137,140 **** --- 137,150 ---- menu.add(action); } + { + AbstractAction action = new GeometricMenuAction(surfaces, "Insert Net...") { + public void actionPerformed(ActionEvent event) { + Surface surface = (Surface) entities.iterator().next(); + Command command = new Command.InsertNet(surface); + AttributeView.instance().display(command); + } + }; + menu.add(action); + } } return menu; |
From: Michael L. <he...@us...> - 2007-12-03 15:01:42
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15159/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Command.java Log Message: command to insert a net based on a surface Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Command.java 2 Dec 2007 12:02:14 -0000 1.45 --- Command.java 3 Dec 2007 15:01:37 -0000 1.46 *************** *** 12,15 **** --- 12,16 ---- import java.util.HashMap; import java.util.HashSet; + import java.util.Iterator; import java.util.LinkedList; import java.util.List; *************** *** 1532,1534 **** --- 1533,1638 ---- } } + + /** + * + */ + public static class InsertNet extends Command { + /** + * + * @param surface Surface + */ + public InsertNet(Surface surface) { + 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(); + + 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); + + 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 max = system.unTranslate(new Vertex(xmax, xmax, 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 < (int) (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); + owner.add(net); + } + } } Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Geometry.java 13 Nov 2007 12:19:29 -0000 1.65 --- Geometry.java 3 Dec 2007 15:01:37 -0000 1.66 *************** *** 425,435 **** } /** ! * Insert a number edges into the model ! * @param edges List of edges ! * @return List of the surfaces created (empty list if none) */ ! public static List<Surface> insertEdges(List<Edge> edges) { ! Space space = Project.getInstance().getActiveSpace(); List<Surface> result = new LinkedList(); --- 425,436 ---- } + /** ! * Insert a list of edges into the space ! * @param space the space ! * @param edges the list of edges ! * @return list of created surfaces */ ! public static List<Surface> insertEdges(Space space, List<Edge> edges) { List<Surface> result = new LinkedList(); *************** *** 440,443 **** --- 441,454 ---- return result; } + + /** + * Insert a number edges into the model + * @param edges List of edges + * @return List of the surfaces created (empty list if none) + */ + public static List<Surface> insertEdges(List<Edge> edges) { + Space space = Project.getInstance().getActiveSpace(); + return insertEdges(space, edges); + } /** |
From: Michael L. <he...@us...> - 2007-12-03 09:10:59
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8508/src/net/sourceforge/bprocessor/model/modellor Modified Files: InnerWallModellor.java Log Message: Inner Wall Window ID Index: InnerWallModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/InnerWallModellor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** InnerWallModellor.java 13 Nov 2007 12:21:49 -0000 1.12 --- InnerWallModellor.java 3 Dec 2007 09:10:59 -0000 1.13 *************** *** 52,56 **** /** The classification id for a wall */ ! public static final String WALL = "-1.-205.01"; /** The classification id for exterior */ --- 52,56 ---- /** The classification id for a wall */ ! public static final String WALL = "-1.-205.-01"; /** The classification id for exterior */ *************** *** 58,62 **** /** The classification id for a window */ ! public static final String WINDOW = "-1.-205.02"; /** The space of this modellor */ --- 58,62 ---- /** The classification id for a window */ ! public static final String WINDOW = "-1.-205.-02"; /** The space of this modellor */ *************** *** 743,745 **** --- 743,758 ---- return net; } + + /** {@inheritDoc} */ + @Override + public String getName() { + return "Wall Module"; + } + + /** {@inheritDoc} */ + @Override + public String getGeneralName() { + return "Wall Module"; + } + } |
From: Michael L. <he...@us...> - 2007-12-03 09:10:53
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8499/src/gfx Added Files: Biconassigntool.gif Log Message: Inner Wall Window ID --- NEW FILE: Biconassigntool.gif --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-12-02 12:02:23
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15193/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: fixes related to using the facade modellor Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** PopupMenu.java 28 Nov 2007 18:11:11 -0000 1.80 --- PopupMenu.java 2 Dec 2007 12:02:20 -0000 1.81 *************** *** 295,311 **** // Some options do only apply to one space Space sp = (Space)s.iterator().next(); ! if (((Space)s.iterator().next()).getLevel() != Space.PART_LEVEL) { ! AbstractAction edit = new SpaceMenuAction(sp, "Edit") { ! public void actionPerformed(ActionEvent arg0) { ! Selection.primary().clear(); ! Project p = Project.getInstance(); ! space.edit(); ! //FIXME: changed is also called in the edit-method on space ! //It is properly only needed once. ! p.changed(p); ! } ! }; ! menu.add(edit); ! } { --- 295,310 ---- // Some options do only apply to one space Space sp = (Space)s.iterator().next(); ! ! AbstractAction edit = new SpaceMenuAction(sp, "Edit") { ! public void actionPerformed(ActionEvent arg0) { ! Selection.primary().clear(); ! Project p = Project.getInstance(); ! space.edit(); ! //FIXME: changed is also called in the edit-method on space ! //It is properly only needed once. ! p.changed(p); ! } ! }; ! menu.add(edit); { |
From: Michael L. <he...@us...> - 2007-12-02 12:02:19
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15136/src/etc Modified Files: bprocessor.xsd Log Message: fixes related to using the facade modellor Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** bprocessor.xsd 26 Nov 2007 18:22:36 -0000 1.39 --- bprocessor.xsd 2 Dec 2007 12:02:14 -0000 1.40 *************** *** 101,104 **** --- 101,105 ---- <xsd:attribute name="transparent" type="xsd:boolean" use="required"/> <xsd:attribute name="union" type="xsd:boolean" use="optional"/> + <xsd:attribute name="net" type="xsd:boolean" use="optional"/> </xsd:extension> </xsd:complexContent> |
From: Michael L. <he...@us...> - 2007-12-02 12:02:13
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15136/src/net/sourceforge/bprocessor/model Modified Files: Command.java Space.java Project.java Persistence.java Log Message: fixes related to using the facade modellor Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** Persistence.java 26 Nov 2007 18:22:36 -0000 1.62 --- Persistence.java 2 Dec 2007 12:02:14 -0000 1.63 *************** *** 293,296 **** --- 293,297 ---- space.setDescription(xml.getDescription()); space.setUnion(xml.isUnion()); + space.setNet(xml.isNet()); space.setClassification(internalizeClassifaction(xml.getClassification(), type)); ClassificationType classType = internalizeClassificationType(xml.getClassification(), type); *************** *** 947,950 **** --- 948,952 ---- xml.setDescription(space.getDescription().toString()); xml.setUnion(space.isUnion()); + xml.setNet(space.isNet()); if (space.getClassification() != null) { if (space.getClassification().getId().equalsIgnoreCase("-1")) { Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.208 retrieving revision 1.209 diff -C2 -d -r1.208 -r1.209 *** Space.java 13 Nov 2007 12:19:29 -0000 1.208 --- Space.java 2 Dec 2007 12:02:14 -0000 1.209 *************** *** 929,932 **** --- 929,946 ---- /** + * Find element by name + * @param name String + * @return element + */ + public Space find(String name) { + for (Space element : getElements()) { + if (element.getName().equals(name)) { + return element; + } + } + return null; + } + + /** * Get the modellor * @return The modellor Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Command.java 28 Nov 2007 22:37:08 -0000 1.44 --- Command.java 2 Dec 2007 12:02:14 -0000 1.45 *************** *** 141,145 **** --- 141,147 ---- public OffsetNormal(Surface surface) { this.surface = surface; + parameters.put("surface", surface); parameters.put("distance", 1.0); + parameters.put("direction", ""); parameters.put("controlled", true); } *************** *** 155,161 **** @Override public void evaluate() { double distance = parameters.getDouble("distance"); boolean controlled = parameters.getBoolean("controlled"); ! Space owner = surface.getOwner(); HashMap map = new HashMap(); Surface copy = (Surface) surface.copy(map); --- 157,170 ---- @Override public void evaluate() { + Space owner = surface.getOwner(); double distance = parameters.getDouble("distance"); + Space space = owner.find((String)parameters.get("direction")); + if (space != null) { + if (surface.getBackDomain() == space) { + distance = -distance; + } + } boolean controlled = parameters.getBoolean("controlled"); ! HashMap map = new HashMap(); Surface copy = (Surface) surface.copy(map); *************** *** 1372,1391 **** } - private Space find(String name) { - for (Space element : net.getElements()) { - if (element.getName().equals(name)) { - return element; - } - } - return null; - } - /** {@inheritDoc} */ @Override public void evaluate() { ! Space interior = find((String) parameters.get("interior")); ! Space roof = find((String) parameters.get("top")); ! Space floor = find((String) parameters.get("bottom")); ! Space exterior = find((String) parameters.get("side")); double distance = parameters.getDouble("offset"); --- 1381,1391 ---- } /** {@inheritDoc} */ @Override public void evaluate() { ! Space interior = net.find((String) parameters.get("interior")); ! Space roof = net.find((String) parameters.get("top")); ! Space floor = net.find((String) parameters.get("bottom")); ! Space exterior = net.find((String) parameters.get("side")); double distance = parameters.getDouble("offset"); Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.145 retrieving revision 1.146 diff -C2 -d -r1.145 -r1.146 *** Project.java 30 Nov 2007 14:46:57 -0000 1.145 --- Project.java 2 Dec 2007 12:02:14 -0000 1.146 *************** *** 924,928 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; break; --- 924,929 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) ! || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; break; *************** *** 1001,1005 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; break; --- 1002,1007 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) ! || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; break; |
From: Michael L. <he...@us...> - 2007-12-02 12:02:11
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14708/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: fixes related to using the facade modellor Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.265 retrieving revision 1.266 diff -C2 -d -r1.265 -r1.266 *** View.java 30 Nov 2007 15:33:06 -0000 1.265 --- View.java 2 Dec 2007 12:02:04 -0000 1.266 *************** *** 1269,1287 **** Collection<Edge> edges = new HashSet<Edge>(); - /* --- Selection buffer contains --- - * [0] number of names on names stack = n_0 - * [1] minimum z value - * [2] maximum z value - * [3] top of names stack - * . - * . - * . - * [n_0+2] bottom of names stack - * [n_0+3] number of names on names stack for this record = n_1 - * [n_0+4] minimum z value - * . - * . - * . - * */ for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); --- 1269,1272 ---- *************** *** 1383,1409 **** } - // Set the last surface pointed at: - // If pointing at something different than a surface then dont - // change the lastSurface pointed at. - // This makes it possible to find the intersection between an - // edge and a surface even when the edge belongs to some other - // surface. - // Surface may be null in which - // case the lastSurface pointed at will be cleared (happens when pointing - // into empty space. if (object == null && vertex == null && edge == null) { setLastSurface(surface); } ! ! // If lastsurface is null, then use the surface currently under ! // any other object pointed at. Surface may be null in which ! // case the lastSurface pointed at will be cleared (happens when pointing ! // into empty space. if (lastSurface == null) { setLastSurface(surface); } ! ! // If an construction edge is hit, see if there is a real edge ! // coincident with the construction-edge. if (edge != null) { edges.remove(edge); --- 1368,1379 ---- } if (object == null && vertex == null && edge == null) { setLastSurface(surface); } ! if (lastSurface == null) { setLastSurface(surface); } ! if (edge != null) { edges.remove(edge); |
From: rimestad <rim...@us...> - 2007-11-30 15:33:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10942/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: added comment about the selection buffer to the processSelection method Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.264 retrieving revision 1.265 diff -C2 -d -r1.264 -r1.265 *** View.java 28 Nov 2007 10:39:21 -0000 1.264 --- View.java 30 Nov 2007 15:33:06 -0000 1.265 *************** *** 1268,1272 **** Collection<Edge> edges = new HashSet<Edge>(); ! for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); --- 1268,1287 ---- Collection<Edge> edges = new HashSet<Edge>(); ! ! /* --- Selection buffer contains --- ! * [0] number of names on names stack = n_0 ! * [1] minimum z value ! * [2] maximum z value ! * [3] top of names stack ! * . ! * . ! * . ! * [n_0+2] bottom of names stack ! * [n_0+3] number of names on names stack for this record = n_1 ! * [n_0+4] minimum z value ! * . ! * . ! * . ! * */ for (int i = 0; i < hits; i++) { names = selectBuffer.get(bufferOffset); |
From: rimestad <rim...@us...> - 2007-11-30 14:47:04
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25230/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Fixed string to classification method and string to classificationType method Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.144 retrieving revision 1.145 diff -C2 -d -r1.144 -r1.145 *** Project.java 26 Nov 2007 18:11:36 -0000 1.144 --- Project.java 30 Nov 2007 14:46:57 -0000 1.145 *************** *** 924,928 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid)) { cl = current; break; --- 924,928 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; break; *************** *** 1001,1006 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid)) { cl = current; } } --- 1001,1007 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid) || current.getId().endsWith(curid.substring(1, curid.length()))) { cl = current; + break; } } |
From: Michael L. <he...@us...> - 2007-11-29 19:32:01
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3712/src/net/sourceforge/bprocessor/model/modellor Modified Files: ModelBathModellor2.java Log Message: bath module working again (parameterblock initialization) Index: ModelBathModellor2.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/ModelBathModellor2.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** ModelBathModellor2.java 13 Nov 2007 12:19:30 -0000 1.11 --- ModelBathModellor2.java 29 Nov 2007 19:31:57 -0000 1.12 *************** *** 20,23 **** --- 20,24 ---- import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Geometry; + import net.sourceforge.bprocessor.model.ParameterBlock; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selector; *************** *** 631,635 **** --- 632,640 ---- */ private void checkNetProperties() { + for (Edge e : net.getEdges()) { + if (e.getParameters() == null) { + e.setParameters(new ParameterBlock()); + } Map<String, Object> env = e.getParameters().environment(); if (!env.containsKey("Type")) { *************** *** 641,644 **** --- 646,652 ---- for (Vertex v : net.getVertices()) { + if (v.getParameters() == null) { + v.setParameters(new ParameterBlock()); + } Map<String, Object> env = v.getParameters().environment(); if (!env.containsKey("Corner")) { |
From: Michael L. <he...@us...> - 2007-11-28 22:37:05
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29116/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: controlled option added Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Command.java 28 Nov 2007 21:25:41 -0000 1.43 --- Command.java 28 Nov 2007 22:37:08 -0000 1.44 *************** *** 142,145 **** --- 142,146 ---- this.surface = surface; parameters.put("distance", 1.0); + parameters.put("controlled", true); } *************** *** 155,166 **** public void evaluate() { double distance = parameters.getDouble("distance"); Space owner = surface.getOwner(); HashMap map = new HashMap(); Surface copy = (Surface) surface.copy(map); Vertex normal = surface.normal(); ! Vertex direction = normal.scale(distance); ! for (Vertex current : copy.getVertices()) { ! current.set(current.add(direction)); } Geometry.insertEdges(copy.getEdges()); } --- 156,203 ---- public void evaluate() { double distance = parameters.getDouble("distance"); + boolean controlled = parameters.getBoolean("controlled"); Space owner = surface.getOwner(); HashMap map = new HashMap(); Surface copy = (Surface) surface.copy(map); Vertex normal = surface.normal(); ! ! if (controlled) { ! List<Vertex> vertices = surface.getVertices(); ! Map<Vertex, Collection<Edge>> edgemap = owner.edgeMap(vertices); ! Map<Vertex, Vertex> directions = new HashMap(); ! for (Vertex current : vertices) { ! Collection<Edge> edges = edgemap.get(current); ! Collection<Edge> candidates = new LinkedList(); ! for (Edge edge : edges) { ! Vertex other = edge.otherVertex(current); ! Vertex direction = other.minus(current); ! double dot = direction.dot(normal); ! if (Math.abs(dot) > 0.0000001) { ! candidates.add(edge); ! } ! } ! if (candidates.size() == 1) { ! Edge edge = candidates.iterator().next(); ! Vertex other = edge.otherVertex(current); ! Vertex direction = other.minus(current); ! directions.put(current, direction); ! } else { ! directions.put(current, normal); ! } ! } ! for (Vertex original : vertices) { ! Vertex direction = directions.get(original); ! Vertex current = (Vertex) map.get(original); ! double factor = direction.dot(normal); ! double t = distance / factor; ! current.set(current.add(direction.scale(t))); ! } ! } else { ! Vertex direction = normal.scale(distance); ! for (Vertex current : copy.getVertices()) { ! current.set(current.add(direction)); ! } } + Geometry.insertEdges(copy.getEdges()); } |
From: Michael L. <he...@us...> - 2007-11-28 21:25:38
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32589/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: extrude inserts geometry Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** Command.java 28 Nov 2007 18:11:04 -0000 1.42 --- Command.java 28 Nov 2007 21:25:41 -0000 1.43 *************** *** 1485,1493 **** public void evaluate() { double distance = parameters.getDouble("distance"); Surface bottom = (Surface) surface.copy(new HashMap()); Prism prism = extrude(bottom, distance); ! Space union = new Space("Extrusion", Space.CONSTRUCTION, true); ! Shape.addTo(union, prism.surfaces()); ! surface.getOwner().add(union); } } --- 1485,1496 ---- public void evaluate() { double distance = parameters.getDouble("distance"); + Space owner = surface.getOwner(); Surface bottom = (Surface) surface.copy(new HashMap()); Prism prism = extrude(bottom, distance); ! for (Surface current : prism.surfaces()) { ! if (current != surface) { ! owner.insert(current); ! } ! } } } |
From: Michael L. <he...@us...> - 2007-11-28 18:12:19
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22023/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: a normal offset operation on surfaces Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** SpaceTool.java 28 Nov 2007 13:07:21 -0000 1.97 --- SpaceTool.java 28 Nov 2007 18:11:07 -0000 1.98 *************** *** 32,36 **** import net.sourceforge.bprocessor.gl.Editor; - import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.gui.PopupMenu; import net.sourceforge.bprocessor.gui.actions.SpaceMenuAction; --- 32,35 ---- |
From: Michael L. <he...@us...> - 2007-11-28 18:12:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22009/src/net/sourceforge/bprocessor/model Modified Files: Command.java Log Message: a normal offset operation on surfaces Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** Command.java 26 Nov 2007 13:29:59 -0000 1.41 --- Command.java 28 Nov 2007 18:11:04 -0000 1.42 *************** *** 131,134 **** --- 131,172 ---- /** * + */ + public static class OffsetNormal extends Command { + private Surface surface; + + /** + * + * @param surface Surface + */ + public OffsetNormal(Surface surface) { + this.surface = surface; + parameters.put("distance", 1.0); + } + + /** + * {@inheritDoc} + */ + public String getGeneralName() { + return "Offset Normal"; + } + + /** {@inheritDoc} */ + @Override + public void evaluate() { + double distance = parameters.getDouble("distance"); + Space owner = surface.getOwner(); + HashMap map = new HashMap(); + Surface copy = (Surface) surface.copy(map); + Vertex normal = surface.normal(); + Vertex direction = normal.scale(distance); + for (Vertex current : copy.getVertices()) { + current.set(current.add(direction)); + } + Geometry.insertEdges(copy.getEdges()); + } + } + + /** + * * */ |
From: Michael L. <he...@us...> - 2007-11-28 18:12:19
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22035/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: a normal offset operation on surfaces Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** PopupMenu.java 26 Nov 2007 18:08:07 -0000 1.79 --- PopupMenu.java 28 Nov 2007 18:11:11 -0000 1.80 *************** *** 108,112 **** } { ! AbstractAction action = new GeometricMenuAction(surfaces, "Offset...") { public void actionPerformed(ActionEvent event) { Surface surface = (Surface) entities.iterator().next(); --- 108,112 ---- } { ! AbstractAction action = new GeometricMenuAction(surfaces, "Offset Planar...") { public void actionPerformed(ActionEvent event) { Surface surface = (Surface) entities.iterator().next(); *************** *** 118,121 **** --- 118,131 ---- } { + AbstractAction action = new GeometricMenuAction(surfaces, "Offset Normal...") { + public void actionPerformed(ActionEvent event) { + Surface surface = (Surface) entities.iterator().next(); + Command command = new Command.OffsetNormal(surface); + AttributeView.instance().display(command); + } + }; + menu.add(action); + } + { AbstractAction action = new GeometricMenuAction(surfaces, "Extrude...") { public void actionPerformed(ActionEvent event) { |