bprocessor-commit Mailing List for B-processor (Page 55)
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: rimestad <rim...@us...> - 2007-09-19 09:28:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24970/src/net/sourceforge/bprocessor/gui/actions Modified Files: ToolsEnergyActionListener.java Log Message: Made energy calc work, made some minor tests which seems to work Index: ToolsEnergyActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsEnergyActionListener.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ToolsEnergyActionListener.java 29 Mar 2007 22:02:37 -0000 1.7 --- ToolsEnergyActionListener.java 19 Sep 2007 09:28:28 -0000 1.8 *************** *** 35,47 **** */ public void actionPerformed(ActionEvent e) { ! ! Double loss = 0.0; ! if (EnergyCalc.heatedArea() != 0) { ! loss = EnergyCalc.energyLoss() / EnergyCalc.heatedArea(); } JOptionPane.showMessageDialog(null, ! "The total energytransmission loss per year is: " + EnergyCalc.energyLoss() + "kWh" + "\n" + "The total energytransmission loss per year per m2 is: " ! + loss + "kWh/m2"); } --- 35,48 ---- */ public void actionPerformed(ActionEvent e) { ! double lossoverarea = Double.NaN; ! double loss = EnergyCalc.energyLoss(); ! double area = EnergyCalc.heatedArea(); ! if (area != 0) { ! lossoverarea = loss / area; } JOptionPane.showMessageDialog(null, ! "The total energytransmission loss per year is: " + loss + " kWh" + "\n" + "The total energytransmission loss per year per m2 is: " ! + lossoverarea + " kWh/m2"); } |
From: Michael L. <he...@us...> - 2007-09-17 13:58:52
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14296/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Progress on move tool: plane relations are now maintained Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** FinalMoveTool.java 11 Sep 2007 11:00:05 -0000 1.24 --- FinalMoveTool.java 17 Sep 2007 13:58:40 -0000 1.25 *************** *** 80,88 **** * */ ! public class SystemRelation { private CoordinateSystem system; private Collection<Vertex> vertices; /** * Constructor * @param system CoordinateSystem --- 80,101 ---- * */ ! public static class SystemRelation { ! private Vertex original; private CoordinateSystem system; private Collection<Vertex> vertices; /** + * Returns a system relation for the specified surface + * @param surface Surface to create system relation for + * @return a system relation for the specified surface + */ + public static SystemRelation relationFor(Surface surface) { + Collection<Vertex> vertices = surface.collect(); + CoordinateSystem system = surface.coordinateSystem(); + SystemRelation relation = new SystemRelation(system, vertices); + return relation; + } + + /** * Constructor * @param system CoordinateSystem *************** *** 92,95 **** --- 105,148 ---- this.system = system; this.vertices = vertices; + this.original = system.getOrigin().copy(); + } + + /** + * Returns the origin of this relation + * @return the origin + */ + public Vertex origin() { + return system.getOrigin(); + } + + /** + * Returns a collection of the vertices in this system relation + * @return a collection of vertices in this system relation + */ + public Collection<Vertex> collect() { + return vertices; + } + + /** + * Move vertices so the stay on the plane of this system relation + * while sliding on the direction given by the direction map + * @param delta How much to move + * @param directions Direction map + * @param originals Originals positions + */ + public void slide(Vertex delta, Map<Vertex, Direction> directions, + Map<Vertex, Vertex> originals) { + system.setOrigin(original.add(delta)); + for (Vertex current : vertices) { + Direction direction = directions.get(current); + Vertex original = originals.get(current); + Vertex vector = direction.getDirection(); + if (vector == null) { + current.set(original.add(delta)); + } else { + Vertex to = system.slide(original, vector); + current.set(to); + } + } } } *************** *** 141,144 **** --- 194,200 ---- private Map<Vertex, Vertex> originals; private Map<Vertex, Direction> slide; + private Collection<SystemRelation> relations; + private Map<SystemRelation, Vertex> origins; + private Collection<Vertex> free; private void computePlanes(Collection<Vertex> vertices) { *************** *** 159,162 **** --- 215,236 ---- } } + relations = new LinkedList(); + for (Surface current : surfaces) { + SystemRelation relation = SystemRelation.relationFor(current); + relations.add(relation); + } + origins = new HashMap(); + mark.clear(); + for (SystemRelation relation : relations) { + mark.addAll(relation.collect()); + origins.put(relation, relation.origin().copy()); + } + free = new LinkedList(); + for (Vertex current : vertices) { + if (!mark.contains(current)) { + free.add(current); + } + } + System.out.println("free = " + free); } } *************** *** 208,212 **** */ public void move(Vertex delta) { ! for (Vertex current : vertices) { Vertex original = originals.get(current); current.set(original.add(delta)); --- 282,286 ---- */ public void move(Vertex delta) { ! for (Vertex current : free) { Vertex original = originals.get(current); current.set(original.add(delta)); *************** *** 229,232 **** --- 303,309 ---- } } + for (SystemRelation current : relations) { + current.slide(delta, slide, originals); + } } |
From: rimestad <rim...@us...> - 2007-09-14 11:32:38
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8713/src/net/sourceforge/bprocessor/gui/attrview Modified Files: StringAttribute.java Log Message: Removed unused attributeview package and added a saveDBK option in file menu Index: StringAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/StringAttribute.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** StringAttribute.java 8 May 2007 07:19:29 -0000 1.14 --- StringAttribute.java 14 Sep 2007 11:32:38 -0000 1.15 *************** *** 23,26 **** --- 23,27 ---- import javax.swing.JTextField; + import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Attribute; *************** *** 85,89 **** this.add(ext); } ! if (attribute.getName().equalsIgnoreCase("U-value")) { ext = new JLabel(" W/m2K"); ext.setFont(AttributeView.FONT_PLAIN); --- 86,90 ---- this.add(ext); } ! if (attribute.getName().equalsIgnoreCase("uvalue")) { ext = new JLabel(" W/m2K"); ext.setFont(AttributeView.FONT_PLAIN); *************** *** 233,248 **** public void stopEditing() { if (editor != null && attribute.isEditable()) { ! Object val = attribute.getValue(); ! if (val instanceof String) { ! attribute.setValue(editor.getText()); ! } else if (val instanceof Double) { ! attribute.setValue(Double.valueOf(editor.getText()) / 1000); } - component.remove(editor); - editor.removeKeyListener(this); - editor = null; - component.add(createValueLabel(attribute.getValue())); - component.revalidate(); - valueChanged(); } } --- 234,253 ---- public void stopEditing() { if (editor != null && attribute.isEditable()) { ! try { ! Object val = attribute.getValue(); ! if (val instanceof String) { ! attribute.setValue(editor.getText()); ! } else if (val instanceof Double) { ! attribute.setValue(Double.valueOf(editor.getText()) / 1000); ! } ! component.remove(editor); ! editor.removeKeyListener(this); ! editor = null; ! component.add(createValueLabel(attribute.getValue())); ! component.revalidate(); ! valueChanged(); ! } catch (Exception e) { ! GUI.getInstance().alert("Wrong number format: " + e.getMessage()); } } } |
From: rimestad <rim...@us...> - 2007-09-14 11:32:38
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8713/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Removed unused attributeview package and added a saveDBK option in file menu Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** GUI.java 19 Jul 2007 12:23:23 -0000 1.72 --- GUI.java 14 Sep 2007 11:32:38 -0000 1.73 *************** *** 32,35 **** --- 32,36 ---- import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Line; + import net.sourceforge.bprocessor.model.Persistence; import net.sourceforge.bprocessor.model.Point; import net.sourceforge.bprocessor.model.Project; *************** *** 55,58 **** --- 56,60 ---- import java.awt.event.ActionListener; import java.awt.event.KeyEvent; + import java.io.File; import javax.swing.AbstractAction; *************** *** 492,495 **** --- 494,512 ---- file.add(fileSaveAs); + JMenuItem saveDBK = new JMenuItem("Save DBK"); + saveDBK.addActionListener(new AbstractAction() { + public void actionPerformed(ActionEvent e) { + try { + Persistence.saveDBK(Project.getConstructionClas(), + Project.getFunctionalClas(), Project.getClassificationTypes(), + new File("Classification.xml")); + } catch (Exception e1) { + log.error("Error when saving DBK : " + e1.getMessage()); + } + } + }); + saveDBK.setEnabled(true); + file.add(saveDBK); + file.addSeparator(); |
From: rimestad <rim...@us...> - 2007-09-14 11:32:37
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attributesview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8713/src/net/sourceforge/bprocessor/gui/attributesview Removed Files: StringAttributeListener.java AttributeExample.java package.html AttributeView.java StringAttributeView.java AttributesPanel.java Log Message: Removed unused attributeview package and added a saveDBK option in file menu --- StringAttributeView.java DELETED --- --- package.html DELETED --- --- AttributesPanel.java DELETED --- --- AttributeExample.java DELETED --- --- StringAttributeListener.java DELETED --- --- AttributeView.java DELETED --- |
From: rimestad <rim...@us...> - 2007-09-14 10:57:54
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26763/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateFunctionalSpaceActionListener.java CreateConstructionSpaceActionListener.java Log Message: Removed the default name for a space at creation time. Changed the order og name string to name - id - classification Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CreateFunctionalSpaceActionListener.java 14 Apr 2007 14:56:48 -0000 1.13 --- CreateFunctionalSpaceActionListener.java 14 Sep 2007 10:57:55 -0000 1.14 *************** *** 37,41 **** Space owner = Project.getInstance().getActiveSpace(); Space space; ! space = owner.createFunctionalSpace("Functional"); owner.add(space); AttributeView.instance().display(space); --- 37,41 ---- Space owner = Project.getInstance().getActiveSpace(); Space space; ! space = owner.createFunctionalSpace(""); owner.add(space); AttributeView.instance().display(space); Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CreateConstructionSpaceActionListener.java 14 Apr 2007 14:56:48 -0000 1.14 --- CreateConstructionSpaceActionListener.java 14 Sep 2007 10:57:55 -0000 1.15 *************** *** 38,42 **** Space owner = Project.getInstance().getActiveSpace(); Space space; ! space = owner.createConstructionSpace("Construction"); owner.add(space); AttributeView.instance().display(space); --- 38,42 ---- Space owner = Project.getInstance().getActiveSpace(); Space space; ! space = owner.createConstructionSpace(""); owner.add(space); AttributeView.instance().display(space); |
From: rimestad <rim...@us...> - 2007-09-14 10:57:48
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26744/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Removed the default name for a space at creation time. Changed the order og name string to name - id - classification Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.171 retrieving revision 1.172 diff -C2 -d -r1.171 -r1.172 *** Space.java 27 Aug 2007 14:00:31 -0000 1.171 --- Space.java 14 Sep 2007 10:57:43 -0000 1.172 *************** *** 1499,1505 **** String lvl = getLevelName(); if (getClassification() != null) { ! return "(" + getClassification().toString() + " - " + lvl + ")"; } else { ! return "(" + lvl + ")"; } } else { --- 1499,1505 ---- String lvl = getLevelName(); if (getClassification() != null) { ! return " - " + lvl + " - " + getClassification().toString(); } else { ! return " - " + lvl; } } else { |
From: rimestad <rim...@us...> - 2007-09-14 10:57:48
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26754/src/net/sourceforge/bprocessor/gl/tool Modified Files: CreateSpaceActionListener.java Log Message: Removed the default name for a space at creation time. Changed the order og name string to name - id - classification Index: CreateSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CreateSpaceActionListener.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** CreateSpaceActionListener.java 23 Jul 2007 13:57:42 -0000 1.18 --- CreateSpaceActionListener.java 14 Sep 2007 10:57:49 -0000 1.19 *************** *** 69,75 **** Space space; if (functional) { ! space = owner.createFunctionalSpace("Functional"); } else { ! space = owner.createConstructionSpace("Construction"); } owner.add(space); --- 69,75 ---- Space space; if (functional) { ! space = owner.createFunctionalSpace(""); } else { ! space = owner.createConstructionSpace(""); } owner.add(space); |
From: rimestad <rim...@us...> - 2007-09-14 10:11:36
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8855/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Modified the loadClassificationType method to handle functional and constructional classifications and classificationtypes Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** Project.java 10 Aug 2007 09:27:01 -0000 1.133 --- Project.java 14 Sep 2007 10:11:32 -0000 1.134 *************** *** 877,881 **** cl = constructionClas; ! String curid; while (st.hasMoreTokens()) { curid = st.nextToken(); --- 877,881 ---- cl = constructionClas; ! String curid = st.nextToken(); while (st.hasMoreTokens()) { curid = st.nextToken(); *************** *** 901,906 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.endsWith(current.getId())) { cl = current; } } --- 901,907 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid)) { cl = current; + break; } } *************** *** 909,913 **** cl = functionalClas; boolean first = true; ! String curid; while (st.hasMoreTokens()) { if (first) { --- 910,914 ---- cl = functionalClas; boolean first = true; ! String curid = st.nextToken(); while (st.hasMoreTokens()) { if (first) { *************** *** 923,928 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.equalsIgnoreCase(current.getId())) { cl = current; } } --- 924,930 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid)) { cl = current; + break; } } *************** *** 976,980 **** while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (curid.endsWith(current.getId())) { cl = current; } --- 978,982 ---- while (it.hasNext()) { Classification current = (Classification) it.next(); ! if (current.getId().endsWith(curid)) { cl = current; } |
From: Michael L. <he...@us...> - 2007-09-11 11:00:18
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3414/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: New coplanar test on CoordinateSystem Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** FinalMoveTool.java 7 Sep 2007 12:37:45 -0000 1.23 --- FinalMoveTool.java 11 Sep 2007 11:00:05 -0000 1.24 *************** *** 20,23 **** --- 20,24 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Direction; import net.sourceforge.bprocessor.model.Edge; *************** *** 74,77 **** --- 75,98 ---- } + + /** + * System Relation + * + */ + public class SystemRelation { + private CoordinateSystem system; + private Collection<Vertex> vertices; + + /** + * Constructor + * @param system CoordinateSystem + * @param vertices Collection of vertices + */ + public SystemRelation(CoordinateSystem system, Collection<Vertex> vertices) { + this.system = system; + this.vertices = vertices; + } + } + /** * Vector Move |
From: Michael L. <he...@us...> - 2007-09-11 11:00:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3380/src/net/sourceforge/bprocessor/model Modified Files: CoordinateSystem.java Log Message: New coplanar test on CoordinateSystem Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** CoordinateSystem.java 18 Jul 2007 13:35:39 -0000 1.54 --- CoordinateSystem.java 11 Sep 2007 10:59:59 -0000 1.55 *************** *** 743,746 **** --- 743,763 ---- /** + * Returns true if this CoordinateSystem is coplanar with the other + * @param other CoordinateSystem to test + * @return true if this CoordinateSystem is coplanar with the other + */ + public boolean coplanar(CoordinateSystem other) { + if (plane().contains(other.getOrigin())) { + Vertex n1 = this.n; + Vertex n2 = other.n; + Vertex cross = n1.cross(n2); + if (cross.isZero()) { + return true; + } + } + return false; + } + + /** * {@inheritDoc} * |
From: Michael L. <he...@us...> - 2007-09-08 02:12:36
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11810/src/gfx Added Files: Bgrid.gif Log Message: grid on/off button added to toolbar --- NEW FILE: Bgrid.gif --- (This appears to be a binary file; contents omitted.) |
From: rimestad <rim...@us...> - 2007-09-07 13:21:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14232/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Vertex.java Log Message: Added a controlledExtrudeTool and made som refactoring on the way through the code. Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.173 retrieving revision 1.174 diff -C2 -d -r1.173 -r1.174 *** Surface.java 3 Sep 2007 16:06:28 -0000 1.173 --- Surface.java 7 Sep 2007 13:21:14 -0000 1.174 *************** *** 21,25 **** import org.apache.log4j.Logger; - /** * Surface is defined by its list of boundary edges, and are related --- 21,24 ---- *************** *** 883,886 **** --- 882,896 ---- /** + * A method for controlled extrusion (like a push/pull tool) + * @param delta The distance to extrude + * @param sides Pass a list for the created surfaces + * @param v2dir Pass a vertex to direction map for the extrusion + * @return The resulting top surface + */ + public Surface extrusionControlled(double delta, Set sides, Map v2dir) { + return extrudeControlled(delta, sides, new HashMap(), new HashMap(), new HashMap(), v2dir); + } + + /** * Make the new vertices, edges and surfaces for extrusion * @param delta the length of extrusion in meters *************** *** 894,897 **** --- 904,908 ---- public Surface extrudeControlled(double delta, Set sides, Map e2e, Map v2e, Map e2s, Map v2dir) { Vertex normal = normal(); + normal.scale(delta); boolean makeNewTop = true; List vertices = getVertices(); *************** *** 916,920 **** for (int i = 0; i < n; i++) { ! if (isFree(v[i])) { if (v2dir.containsKey(v[i])) { Direction d = (Direction)v2dir.get(v[i]); --- 927,931 ---- for (int i = 0; i < n; i++) { ! if (isVertexBounded(v[i])) { if (v2dir.containsKey(v[i])) { Direction d = (Direction)v2dir.get(v[i]); *************** *** 941,944 **** --- 952,960 ---- for (int i = 0; i < n; i++) { + //move points delta + vmap[i].setX(vmap[i].getX() + normal.getX()); + vmap[i].setY(vmap[i].getY() + normal.getY()); + vmap[i].setZ(vmap[i].getZ() + normal.getZ()); + //make edges if (e2e.containsKey(e[i])) { topmap[i] = (Edge)e2e.get(e[i]); *************** *** 1097,1123 **** /** ! * Check if the given vertex is free, that is ! * 1) it is only part of the parent surface (this) ! * 2) if it is part of more surfaces two of these have to be coplanar (this have to be one) * @param vertex The vertex to check * @return True if the vertex is bounded and false otherwise */ ! private boolean isFree(Vertex vertex) { ! Set sur = vertex.getSurfaces(); ! if (sur.size() > 1) { ! // we have to do further checks ! Iterator iter = sur.iterator(); ! while (iter.hasNext()) { ! Surface cur = (Surface)iter.next(); ! log.info(vertex + " Saw " + cur); ! if (cur != this && this.plane().contains(cur)) { return true; } } - // if the while loop does not return then return false return false; ! } else { ! return true; } } --- 1113,1146 ---- /** ! * Check if the given vertex is free (do not have a edge to follow in move og pull), that is ! * 1) it is only part of the parent surface (this) or ! * 2) it is only connected to one edge not in this surface, which is not in ! * the plane of the surface * @param vertex The vertex to check * @return True if the vertex is bounded and false otherwise */ ! public boolean isVertexBounded(Vertex vertex) { ! Set<Edge> connected = vertex.getEdges(); ! switch (connected.size()) { ! case 3: ! //If the third connected edge is not in the plane of the surface ! //it is not free otherwise it is ! Plane plane = this.plane(); ! for (Edge e : connected) { ! if (!this.contains(e) && plane.contains(e)) { return true; } } return false; ! case 2: ! // look at the surfaces ! for (Surface s : vertex.getSurfaces()) { ! if (this != s) { ! return false; ! } ! } ! break; } + return true; } Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Vertex.java 18 Jul 2007 14:03:37 -0000 1.63 --- Vertex.java 7 Sep 2007 13:21:14 -0000 1.64 *************** *** 205,210 **** * @return The connected surfaces */ ! public Set getSurfaces() { ! Set result = new HashSet(); Set edges = getEdges(); Iterator iter = edges.iterator(); --- 205,210 ---- * @return The connected surfaces */ ! public Set<Surface> getSurfaces() { ! Set<Surface> result = new HashSet<Surface>(); Set edges = getEdges(); Iterator iter = edges.iterator(); |
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14216/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java ExtrusionTool.java AbstractTool.java Tool.java RectTool.java Added Files: ControlledExtrudeTool.java Log Message: Added a controlledExtrudeTool and made som refactoring on the way through the code. Index: Tool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Tool.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Tool.java 3 Sep 2007 13:36:52 -0000 1.36 --- Tool.java 7 Sep 2007 13:21:10 -0000 1.37 *************** *** 71,75 **** public static final int FINAL_MOVE_TOOL = 24; /** the drag tool */ ! public static final int DRAG_TOOL = 25; /** the zoom tool */ public static final int ZOOM_TOOL = 26; --- 71,75 ---- public static final int FINAL_MOVE_TOOL = 24; /** the drag tool */ ! public static final int PAN_TOOL = 25; /** the zoom tool */ public static final int ZOOM_TOOL = 26; Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.83 retrieving revision 1.84 diff -C2 -d -r1.83 -r1.84 *** ToolFactory.java 3 Sep 2007 16:00:13 -0000 1.83 --- ToolFactory.java 7 Sep 2007 13:21:10 -0000 1.84 *************** *** 130,172 **** private ZoomTool zoomTool; - - /** The selection button */ - private JToggleButton selBut; - - /** The pencil button */ - private JToggleButton pencilBut; - - /** The eraser button */ - private JToggleButton eraserBut; - - /** The move button */ - private JToggleButton moveBut; - - /** The move button */ - private JToggleButton rotationBut; - - /** The extrude button */ - private JToggleButton extrudeBut; - - /** The clipplane button */ - private JToggleButton clipBut; - - /** The tapemeasure button */ - private JToggleButton tmBut; ! /** The camera rotation button */ ! private JToggleButton cRotBut; ! ! /** The camera flymode button */ ! private JToggleButton flyBut; ! ! /** The camera walkmode button */ ! private JToggleButton walkBut; ! ! /** The offset tool button */ ! private JToggleButton offBut; ! ! /** The alternative rect tool button */ ! private JToggleButton altRectBut; protected static Cursor errorCursor; --- 130,135 ---- private ZoomTool zoomTool; ! private ControlledExtrudeTool multiExtrude; protected static Cursor errorCursor; *************** *** 197,201 **** Cursor rotationCursor = Toolkit.getDefaultToolkit().createCustomCursor(rotationImage, new Point(7, 8), "Rotation"); ! url = cl.getResource("Biconfly.gif"); Image flyImage = Toolkit.getDefaultToolkit().getImage(url); Cursor flyCursor = --- 160,164 ---- Cursor rotationCursor = Toolkit.getDefaultToolkit().createCustomCursor(rotationImage, new Point(7, 8), "Rotation"); ! /*url = cl.getResource("Biconfly.gif"); Image flyImage = Toolkit.getDefaultToolkit().getImage(url); Cursor flyCursor = *************** *** 205,209 **** Cursor walkCursor = Toolkit.getDefaultToolkit().createCustomCursor(walkImage, new Point(7, 8), "Walk"); ! url = cl.getResource("Bcursoradd.gif"); Image arrowAddImage = Toolkit.getDefaultToolkit().getImage(url); Cursor arrowAddCursor = --- 168,172 ---- Cursor walkCursor = Toolkit.getDefaultToolkit().createCustomCursor(walkImage, new Point(7, 8), "Walk"); ! url = cl.getResource("Bcursoradd.gif");*/ Image arrowAddImage = Toolkit.getDefaultToolkit().getImage(url); Cursor arrowAddCursor = *************** *** 222,249 **** eraser = new EraserTool(glv, pencilcursor); arc = new ArcTool(glv, pencilcursor); ! alternate = new VectorMoveTool(glv, pencilcursor); ! controlled = new ControlledMoveTool(glv, pencilcursor); rotation = new RotationTool(glv, null); extrude = new ExtrusionTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasure(glv, pencilcursor); relation = new RelationTool(glv, arrowAddCursor); camera = new CameraTool(glv, rotationCursor); ! fly = new CameraFlyTool(glv, flyCursor); ! walk = new CameraWalkTool(glv, walkCursor); constructor = new ConstructorTool(glv, pencilcursor); offset = new OffsetTool(glv, pencilcursor); altRect = new RectTool(glv, pencilcursor); focusTool = new FocusTool(glv, null); ! altMoveTool = new AltMoveTool(glv, pencilcursor); finalMoveTool = new FinalMoveTool(glv, pencilcursor); ! edgeMoveTool = new EdgeMoveTool(glv, pencilcursor); panTool = new PanTool(glv, panCursor); zoomTool = new ZoomTool(glv, zoomCursor); Toolbar tb = Toolbar.getInstance(); ! selBut = this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); selBut.setMnemonic(KeyEvent.VK_Q); ! pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); pencilBut.setMnemonic(KeyEvent.VK_W); this.registerTool(Tool.ALT_PENCIL_TOOL, penciltool, "Biconpentool2.gif", "Pencil"); --- 185,215 ---- eraser = new EraserTool(glv, pencilcursor); arc = new ArcTool(glv, pencilcursor); ! // alternate = new VectorMoveTool(glv, pencilcursor); ! // controlled = new ControlledMoveTool(glv, pencilcursor); rotation = new RotationTool(glv, null); extrude = new ExtrusionTool(glv, pencilcursor); + multiExtrude = new ControlledExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasure(glv, pencilcursor); relation = new RelationTool(glv, arrowAddCursor); camera = new CameraTool(glv, rotationCursor); ! /*fly = new CameraFlyTool(glv, flyCursor); ! walk = new CameraWalkTool(glv, walkCursor);*/ constructor = new ConstructorTool(glv, pencilcursor); offset = new OffsetTool(glv, pencilcursor); altRect = new RectTool(glv, pencilcursor); focusTool = new FocusTool(glv, null); ! // altMoveTool = new AltMoveTool(glv, pencilcursor); finalMoveTool = new FinalMoveTool(glv, pencilcursor); ! // edgeMoveTool = new EdgeMoveTool(glv, pencilcursor); panTool = new PanTool(glv, panCursor); zoomTool = new ZoomTool(glv, zoomCursor); Toolbar tb = Toolbar.getInstance(); ! JToggleButton selBut = ! this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); selBut.setMnemonic(KeyEvent.VK_Q); ! JToggleButton pencilBut = ! this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); pencilBut.setMnemonic(KeyEvent.VK_W); this.registerTool(Tool.ALT_PENCIL_TOOL, penciltool, "Biconpentool2.gif", "Pencil"); *************** *** 253,271 **** JToggleButton arcb = this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); arcb.setMnemonic(KeyEvent.VK_Z); ! offBut = this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); ! eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); eraserBut.setMnemonic(KeyEvent.VK_A); tb.addSeparator(3); ! extrudeBut = registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); ! moveBut = this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); moveBut.setMnemonic(KeyEvent.VK_M); ! registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); ! registerTool(Tool.ALT_MOVE_TOOL, altMoveTool, "Biconmovetool.gif", "Alternative Moving"); ! registerTool(Tool.EDGE_MOVE_TOOL, edgeMoveTool, "Biconmovetool.gif", "Edge moving"); ! registerTool(Tool.FINAL_MOVE_TOOL, finalMoveTool, "Bmovetool.gif", "Final Move"); ! rotationBut = this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotaxe.gif", "Rotate"); tb.addSeparator(3); ! tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); --- 219,244 ---- JToggleButton arcb = this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); arcb.setMnemonic(KeyEvent.VK_Z); ! JToggleButton offBut = ! this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); ! JToggleButton eraserBut = ! this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); eraserBut.setMnemonic(KeyEvent.VK_A); tb.addSeparator(3); ! JToggleButton extrudeBut = ! registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); extrudeBut.setMnemonic(KeyEvent.VK_V); ! registerTool(Tool.MULTI_EXTRUDE_TOOL, multiExtrude, ! "Biconextrudetool2.gif", "Controlled extrude"); ! //this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); ! //registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); ! //registerTool(Tool.ALT_MOVE_TOOL, altMoveTool, "Biconmovetool.gif", "Alternative Moving"); ! //registerTool(Tool.EDGE_MOVE_TOOL, edgeMoveTool, "Biconmovetool.gif", "Edge moving"); ! JToggleButton moveBut = ! registerTool(Tool.FINAL_MOVE_TOOL, finalMoveTool, "Bmovetool.gif", "Final Move"); moveBut.setMnemonic(KeyEvent.VK_M); ! JToggleButton rotationBut = ! this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotaxe.gif", "Rotate"); tb.addSeparator(3); ! JToggleButton tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); this.registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); *************** *** 273,278 **** tb.addSeparator(3); ! cRotBut = this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.gif", "Orbit (Space)"); ! this.registerTool(Tool.DRAG_TOOL, panTool, "Bicondrag.gif", "Drag (Space)"); this.registerTool(Tool.ZOOM_TOOL, zoomTool, "Biconzomeinout.gif", "Zoom in/out"); //flyBut = this.registerTool(Tool.FLY_TOOL, fly, "Biconfly.gif", "Fly"); --- 246,252 ---- tb.addSeparator(3); ! JToggleButton cRotBut = ! this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.gif", "Orbit (Space)"); ! this.registerTool(Tool.PAN_TOOL, panTool, "Bicondrag.gif", "Pan"); this.registerTool(Tool.ZOOM_TOOL, zoomTool, "Biconzomeinout.gif", "Zoom in/out"); //flyBut = this.registerTool(Tool.FLY_TOOL, fly, "Biconfly.gif", "Fly"); *************** *** 297,301 **** tb.addSeparator(10); ! clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, "Bclip.gif", "Clipping"); Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { --- 271,275 ---- tb.addSeparator(10); ! JToggleButton clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, "Bclip.gif", "Clipping"); Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { --- NEW FILE: ControlledExtrudeTool.java --- //--------------------------------------------------------------------------------- // $Id: ControlledExtrudeTool.java,v 1.1 2007/09/07 13:21:10 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.HashMap; import java.util.HashSet; import java.util.Map; import org.apache.log4j.Logger; import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Direction; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; 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 ControlledExtrudeTool extends AbstractPencil { private static Logger log = Logger.getLogger(ControlledExtrudeTool.class); private HashSet<Surface> extrusion; private Map<Vertex, Direction> v2dir; /** * Tool constructor * @param glv The view to work in * @param cursor The cursor to use */ public ControlledExtrudeTool(GLView glv, Cursor cursor) { super(glv, cursor); extrusion = new HashSet<Surface>(); v2dir = new HashMap<Vertex, Direction>(); } /** {@inheritDoc} */ @Override public void onVertex() { //TODO finish the extrusion } /** {@inheritDoc} */ @Override protected void moved(MouseEvent e) { if (extrusion.isEmpty()) { findTarget(e, View.HANDLES); glv.getView().makeTarget(target); } else { current = findIntersection(e); makeTarget(current); } } /** {@inheritDoc} */ @Override protected void pressed(MouseEvent e) { if (target != null && target instanceof Surface) { Surface workingSurface = (Surface)target; Surface top = workingSurface.extrusionControlled(1, extrusion, v2dir); if (top != null) { extrusion.add(top); } log.debug(extrusion.size()); ExtrusionTool.insert(Project.getInstance().getActiveSpace(), extrusion); } } /** {@inheritDoc} */ @Override public void prepare() { super.prepare(); Selection.primary().clear(); } /** {@inheritDoc} */ @Override public void cleanUp() { super.cleanUp(); extrusion.clear(); v2dir.clear(); } /** {@inheritDoc} */ @Override public String initialTip() { return "Press a surface and drag it to push/pull it"; } } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** AbstractTool.java 3 Sep 2007 11:31:34 -0000 1.129 --- AbstractTool.java 7 Sep 2007 13:21:10 -0000 1.130 *************** *** 185,189 **** ToolFactory factory = ToolFactory.getFactory(glv); if (which == AbstractTool.pan) { ! tool = factory.get(Tool.DRAG_TOOL); } else if (which == AbstractTool.orbit) { tool = factory.get(Tool.CAMERA_TOOL); --- 185,189 ---- ToolFactory factory = ToolFactory.getFactory(glv); if (which == AbstractTool.pan) { ! tool = factory.get(Tool.PAN_TOOL); } else if (which == AbstractTool.orbit) { tool = factory.get(Tool.CAMERA_TOOL); Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** ExtrusionTool.java 5 Sep 2007 08:56:51 -0000 1.66 --- ExtrusionTool.java 7 Sep 2007 13:21:10 -0000 1.67 *************** *** 88,92 **** * @param extrusion Collection of surfaces */ ! private void insert(Space space, Collection<Surface> extrusion) { Collection<Edge> edges = Surface.edges(extrusion); Collection<Vertex> vertices = Edge.vertices(edges); --- 88,92 ---- * @param extrusion Collection of surfaces */ ! protected static void insert(Space space, Collection<Surface> extrusion) { Collection<Edge> edges = Surface.edges(extrusion); Collection<Vertex> vertices = Edge.vertices(edges); Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** RectTool.java 19 Jun 2007 16:11:06 -0000 1.19 --- RectTool.java 7 Sep 2007 13:21:10 -0000 1.20 *************** *** 153,156 **** --- 153,159 ---- protected void pressed(MouseEvent e) { if (start == null) { + if (current == null) { + current = findIntersection(e); + } start = current; lastCurrent = start.vertex(); |
From: Michael L. <he...@us...> - 2007-09-07 12:37:43
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29277/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Introduced Vector Move Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** FinalMoveTool.java 7 Sep 2007 10:52:23 -0000 1.22 --- FinalMoveTool.java 7 Sep 2007 12:37:45 -0000 1.23 *************** *** 45,49 **** private Collection<Vertex> vertices; ! private MoveHandle handle; --- 45,49 ---- private Collection<Vertex> vertices; ! private Mover mover; *************** *** 58,65 **** /** * Move Handle * */ ! public class MoveHandle { private Collection<Vertex> vertices; private Map<Vertex, Vertex> originals; --- 58,120 ---- /** + * Mover interface + * + */ + public interface Mover { + /** + * Move + * @param delta distance + */ + public void move(Vertex delta); + + /** + * Revert + */ + public void revert(); + } + + /** + * Vector Move + * + */ + public class VectorMove implements Mover { + private Collection<Vertex> vertices; + private Map<Vertex, Vertex> originals; + + /** + * VectorMove + * @param vertices Collection of vertices to move + */ + public VectorMove(Collection<Vertex> vertices) { + this.vertices = vertices; + originals = new HashMap(); + for (Vertex current : vertices) { + originals.put(current, current.copy()); + } + } + + /** {@inheritDoc} */ + public void move(Vertex delta) { + for (Vertex current : vertices) { + Vertex original = originals.get(current); + current.set(original.add(delta)); + } + } + + /** {@inheritDoc} */ + public void revert() { + for (Vertex current : vertices) { + Vertex original = originals.get(current); + current.set(original); + } + } + + } + + /** * Move Handle * */ ! public class SlidingMove implements Mover { private Collection<Vertex> vertices; private Map<Vertex, Vertex> originals; *************** *** 119,123 **** * @param vertices Collection of vertices to move */ ! public MoveHandle(Collection<Vertex> vertices) { this.vertices = vertices; originals = new HashMap(); --- 174,178 ---- * @param vertices Collection of vertices to move */ ! public SlidingMove(Collection<Vertex> vertices) { this.vertices = vertices; originals = new HashMap(); *************** *** 129,134 **** } /** ! * Move ! * @param delta Vector distance to move */ public void move(Vertex delta) { --- 184,188 ---- } /** ! * {@inheritDoc} */ public void move(Vertex delta) { *************** *** 157,161 **** /** ! * Revert to original position */ public void revert() { --- 211,215 ---- /** ! * {@inheritDoc} */ public void revert() { *************** *** 191,195 **** private void move(Vertex delta) { ! handle.move(delta); } --- 245,249 ---- private void move(Vertex delta) { ! mover.move(delta); } *************** *** 262,286 **** geometrics = new LinkedList(); if (Selection.primary().isEmpty()) { ! geometrics.add((Geometric) target); } else { geometrics.addAll(Selection.primary()); } ! copy = e.isAltDown(); ! if (copy) { ! mesh = new Mesh(geometrics); ! mesh = mesh.copy(new HashMap()); ! geometrics = mesh.geometrics(); ! Project.getInstance().getActiveSpace().addProtected(geometrics); ! } ! vertices = Geometry.collect(geometrics); ! handle = new MoveHandle(vertices); ! ! affected = getAffected(geometrics); ! current = findIntersection(e); ! start = current.copy(); ! updateFeedback(); ! setTip(secondClickTip()); } else { Geometric geometric = affected.iterator().next(); --- 316,346 ---- geometrics = new LinkedList(); if (Selection.primary().isEmpty()) { ! if (target != null) { ! geometrics.add((Geometric) target); ! } } else { geometrics.addAll(Selection.primary()); } ! if (!geometrics.isEmpty()) { ! copy = e.isAltDown(); ! if (copy) { ! mesh = new Mesh(geometrics); ! mesh = mesh.copy(new HashMap()); ! geometrics = mesh.geometrics(); ! Project.getInstance().getActiveSpace().addProtected(geometrics); ! } ! vertices = Geometry.collect(geometrics); ! mover = new SlidingMove(vertices); ! ! affected = getAffected(geometrics); ! current = findIntersection(e); ! start = current.copy(); ! updateFeedback(); ! setTip(secondClickTip()); ! } else { ! geometrics = null; ! } } else { Geometric geometric = affected.iterator().next(); *************** *** 297,300 **** --- 357,362 ---- moved(e); } + + System.out.println("geometrics = " + geometrics); } *************** *** 337,341 **** public void cleanUp() { if (start != null) { ! handle.revert(); } super.cleanUp(); --- 399,403 ---- public void cleanUp() { if (start != null) { ! mover.revert(); } super.cleanUp(); *************** *** 348,352 **** affected = null; copy = false; ! handle = null; } --- 410,414 ---- affected = null; copy = false; ! mover = null; } |
From: Michael L. <he...@us...> - 2007-09-07 10:52:36
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20228/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Refactored finalmove tool Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** FinalMoveTool.java 6 Sep 2007 09:15:35 -0000 1.21 --- FinalMoveTool.java 7 Sep 2007 10:52:23 -0000 1.22 *************** *** 37,49 **** private Collection<Geometric> geometrics; ! private Collection<Vertex> vertices; private Collection<Geometric> affected; - private Vertex last; private boolean copy; private Mesh mesh; private Vertex direction; ! private Map<Vertex, Vertex> originals; ! private Map<Vertex, Direction> slide; --- 37,49 ---- private Collection<Geometric> geometrics; ! private Collection<Geometric> affected; private boolean copy; private Mesh mesh; private Vertex direction; ! ! private Collection<Vertex> vertices; ! private MoveHandle handle; *************** *** 57,110 **** } ! ! ! ! private Map<Vertex, Direction> computeDirectionMap(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! Map<Vertex, Direction> slidemap = new HashMap(); ! Map<Vertex, Collection<Edge>> edgemap = space.edgeMap(vertices); ! ! for (Vertex current : vertices) { ! Collection<Edge> edges = edgemap.get(current); ! Direction direction; ! if (edges.size() == 0) { ! direction = new Direction(current.copy(), null); ! } else if (edges.size() == 1) { ! Edge edge = edges.iterator().next(); ! Vertex to = edge.otherVertex(current); ! Vertex v = to.minus(current); ! double length = v.length(); ! v.scale(1 / length); ! direction = new Direction(current.copy(), v, Double.NEGATIVE_INFINITY, length); ! } else { ! direction = new Direction(current.copy(), null, 0, 0); } - slidemap.put(current, direction); } - return slidemap; - } else { - return null; } ! } ! ! private void computePlanes(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! Set<Vertex> mark = new HashSet(); ! Set<Edge> edges = new HashSet(); ! Set<Surface> surfaces = new HashSet(); ! mark.addAll(vertices); ! for (Edge current : space.getEdges()) { ! if (mark.contains(current.getFrom()) && mark.contains(current.getTo())) { ! edges.add(current); } } ! for (Surface current : space.getSurfaces()) { ! if (edges.containsAll(current.getEdges())) { ! surfaces.add(current); } } } } --- 57,168 ---- } ! /** ! * Move Handle ! * ! */ ! public class MoveHandle { ! private Collection<Vertex> vertices; ! private Map<Vertex, Vertex> originals; ! private Map<Vertex, Direction> slide; ! ! private void computePlanes(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! Set<Vertex> mark = new HashSet(); ! Set<Edge> edges = new HashSet(); ! Set<Surface> surfaces = new HashSet(); ! mark.addAll(vertices); ! for (Edge current : space.getEdges()) { ! if (mark.contains(current.getFrom()) && mark.contains(current.getTo())) { ! edges.add(current); ! } ! } ! for (Surface current : space.getSurfaces()) { ! if (edges.containsAll(current.getEdges())) { ! surfaces.add(current); ! } } } } ! ! private Map<Vertex, Direction> computeDirectionMap(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! Map<Vertex, Direction> slidemap = new HashMap(); ! Map<Vertex, Collection<Edge>> edgemap = space.edgeMap(vertices); ! ! for (Vertex current : vertices) { ! Collection<Edge> edges = edgemap.get(current); ! Direction direction; ! if (edges.size() == 0) { ! direction = new Direction(current.copy(), null); ! } else if (edges.size() == 1) { ! Edge edge = edges.iterator().next(); ! Vertex to = edge.otherVertex(current); ! Vertex v = to.minus(current); ! double length = v.length(); ! v.scale(1 / length); ! direction = new Direction(current.copy(), v, Double.NEGATIVE_INFINITY, length); ! } else { ! direction = new Direction(current.copy(), null, 0, 0); ! } ! slidemap.put(current, direction); } + return slidemap; + } else { + return null; } ! } ! ! /** ! * Constructor ! * @param vertices Collection of vertices to move ! */ ! public MoveHandle(Collection<Vertex> vertices) { ! this.vertices = vertices; ! originals = new HashMap(); ! for (Vertex current : vertices) { ! originals.put(current, current.copy()); ! } ! slide = computeDirectionMap(vertices); ! computePlanes(vertices); ! } ! /** ! * Move ! * @param delta Vector distance to move ! */ ! public void move(Vertex delta) { ! for (Vertex current : vertices) { ! Vertex original = originals.get(current); ! current.set(original.add(delta)); ! if (slide != null) { ! Direction direction = slide.get(current); ! Vertex n = direction.getDirection(); ! if (n != null) { ! Vertex v = current.minus(original); ! double t = n.dot(v); ! if (t > direction.upper()) { ! t = direction.upper(); ! } ! if (t < direction.lower()) { ! t = direction.lower(); ! } ! Vertex u = n.copy(); ! u.scale(t); ! current.set(original.add(u)); ! } } } } + + /** + * Revert to original position + */ + public void revert() { + for (Vertex current : vertices) { + Vertex original = originals.get(current); + current.set(original); + } + } } *************** *** 132,167 **** } private void move() { current = current.copy(); ! last = current.vertex(); ! move(vertices, current.vertex().minus(start.vertex())); updateFeedback(); } - - private void move(Collection<Vertex> vertices, Vertex delta) { - for (Vertex current : vertices) { - Vertex original = originals.get(current); - current.set(original.add(delta)); - if (slide != null) { - Direction direction = slide.get(current); - Vertex n = direction.getDirection(); - if (n != null) { - Vertex v = current.minus(original); - double t = n.dot(v); - if (t > direction.upper()) { - t = direction.upper(); - } - if (t < direction.lower()) { - t = direction.lower(); - } - Vertex u = n.copy(); - u.scale(t); - current.set(original.add(u)); - } - } - } - } - /** {@inheritDoc} */ @Override --- 190,204 ---- } + private void move(Vertex delta) { + handle.move(delta); + } + private void move() { current = current.copy(); ! direction = current.vertex().minus(start.vertex()); ! move(direction); updateFeedback(); } /** {@inheritDoc} */ @Override *************** *** 239,252 **** vertices = Geometry.collect(geometrics); ! originals = new HashMap(); ! for (Vertex current : vertices) { ! originals.put(current, current.copy()); ! } ! slide = computeDirectionMap(vertices); ! computePlanes(vertices); affected = getAffected(geometrics); current = findIntersection(e); start = current.copy(); - last = current.vertex(); updateFeedback(); setTip(secondClickTip()); --- 276,284 ---- vertices = Geometry.collect(geometrics); ! handle = new MoveHandle(vertices); ! affected = getAffected(geometrics); current = findIntersection(e); start = current.copy(); updateFeedback(); setTip(secondClickTip()); *************** *** 256,260 **** if (copy) { owner.removeProtected(geometrics); - direction = last.minus(start.vertex()); owner.insert(mesh); geometrics = null; --- 288,291 ---- *************** *** 306,313 **** public void cleanUp() { if (start != null) { ! for (Vertex current : vertices) { ! Vertex original = originals.get(current); ! current.set(original); ! } } super.cleanUp(); --- 337,341 ---- public void cleanUp() { if (start != null) { ! handle.revert(); } super.cleanUp(); *************** *** 320,325 **** affected = null; copy = false; ! originals = null; ! slide = null; } --- 348,352 ---- affected = null; copy = false; ! handle = null; } |
From: Michael L. <he...@us...> - 2007-09-07 03:47:22
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13366/src/gfx Modified Files: Bgrid.gif Log Message: different icon Index: Bgrid.gif =================================================================== RCS file: /cvsroot/bprocessor/gl/src/gfx/Bgrid.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsnOtPog and /tmp/cvspCbodd differ |
From: Michael L. <he...@us...> - 2007-09-06 09:15:40
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1583/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Small progress on move Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** FinalMoveTool.java 5 Sep 2007 13:57:26 -0000 1.20 --- FinalMoveTool.java 6 Sep 2007 09:15:35 -0000 1.21 *************** *** 244,247 **** --- 244,248 ---- } slide = computeDirectionMap(vertices); + computePlanes(vertices); affected = getAffected(geometrics); current = findIntersection(e); |
From: Michael L. <he...@us...> - 2007-09-05 13:57:26
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28911/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Started implementation of plane-constraints in move tool Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** FinalMoveTool.java 4 Sep 2007 13:37:18 -0000 1.19 --- FinalMoveTool.java 5 Sep 2007 13:57:26 -0000 1.20 *************** *** 12,17 **** --- 12,19 ---- import java.util.Collection; import java.util.HashMap; + import java.util.HashSet; import java.util.LinkedList; import java.util.Map; + import java.util.Set; import java.util.Stack; *************** *** 25,28 **** --- 27,31 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; + import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Space; *************** *** 55,66 **** ! private Map<Vertex, Vertex> computeMap(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! return space.directionMap(vertices); ! } else { ! return null; ! } ! } private Map<Vertex, Direction> computeDirectionMap(Collection<Vertex> vertices) { --- 58,62 ---- ! private Map<Vertex, Direction> computeDirectionMap(Collection<Vertex> vertices) { *************** *** 69,72 **** --- 65,69 ---- Map<Vertex, Direction> slidemap = new HashMap(); Map<Vertex, Collection<Edge>> edgemap = space.edgeMap(vertices); + for (Vertex current : vertices) { Collection<Edge> edges = edgemap.get(current); *************** *** 92,105 **** } ! private Map<Vertex, Direction> computeSlideMap(Collection<Vertex> vertices) { ! Map<Vertex, Vertex> edgemap = computeMap(vertices); ! if (edgemap != null) { ! Map<Vertex, Direction> slidemap = new HashMap(); ! for (Vertex current : vertices) { ! slidemap.put(current, new Direction(current.copy(), edgemap.get(current))); } - return slidemap; - } else { - return null; } } --- 89,109 ---- } ! private void computePlanes(Collection<Vertex> vertices) { ! if (vertices.size() > 0) { ! Space space = vertices.iterator().next().getOwner(); ! Set<Vertex> mark = new HashSet(); ! Set<Edge> edges = new HashSet(); ! Set<Surface> surfaces = new HashSet(); ! mark.addAll(vertices); ! for (Edge current : space.getEdges()) { ! if (mark.contains(current.getFrom()) && mark.contains(current.getTo())) { ! edges.add(current); ! } ! } ! for (Surface current : space.getSurfaces()) { ! if (edges.containsAll(current.getEdges())) { ! surfaces.add(current); ! } } } } |
From: Michael L. <he...@us...> - 2007-09-05 11:18:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28863/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: New mechanism for finding work plane Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** AbstractPencil.java 5 Sep 2007 09:29:58 -0000 1.94 --- AbstractPencil.java 5 Sep 2007 11:18:50 -0000 1.95 *************** *** 187,194 **** if (start != null) { Vertex normal; ! if (Math.abs(n.getZ()) > 0.45) { normal = new Vertex(0, 0, 1.0); } else { ! normal = new Vertex(0, 0, 1.0); } --- 187,196 ---- if (start != null) { Vertex normal; ! if (Math.abs(n.getZ()) > 0.47) { normal = new Vertex(0, 0, 1.0); } else { ! Vertex d = Project.getInstance().getCurrentCamera().getDirection(); ! d.normalize(); ! normal = d; } |
From: Michael L. <he...@us...> - 2007-09-05 11:18:47
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28852/src/net/sourceforge/bprocessor/model Modified Files: Camera.java Log Message: New mechanism for finding work plane Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Camera.java 26 Jun 2007 02:05:04 -0000 1.44 --- Camera.java 5 Sep 2007 11:18:46 -0000 1.45 *************** *** 245,249 **** /** * @return Returns the center. - * @hibernate.property */ public double[] getCenter() { --- 245,248 ---- *************** *** 252,255 **** --- 251,265 ---- /** + * + * @return direction + */ + public Vertex getDirection() { + double x = center[0] - camera[0]; + double y = center[1] - camera[1]; + double z = center[2] - camera[2]; + return new Vertex(x, y, z); + } + + /** * @param width The width of the camera. */ |
From: Michael L. <he...@us...> - 2007-09-05 09:29:57
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17434/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: minor fix Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** AbstractPencil.java 5 Sep 2007 09:24:00 -0000 1.93 --- AbstractPencil.java 5 Sep 2007 09:29:58 -0000 1.94 *************** *** 190,194 **** normal = new Vertex(0, 0, 1.0); } else { ! normal = new Vertex(1, 0, 0); } --- 190,194 ---- normal = new Vertex(0, 0, 1.0); } else { ! normal = new Vertex(0, 0, 1.0); } |
From: Michael L. <he...@us...> - 2007-09-05 09:24:05
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15042/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: Removed work plane from AbstractPencil Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** AbstractPencil.java 5 Sep 2007 06:24:47 -0000 1.92 --- AbstractPencil.java 5 Sep 2007 09:24:00 -0000 1.93 *************** *** 109,117 **** /** Whether or not the tool is locked */ protected boolean lock; - - /** Work plane */ - protected Plane plane; - - /** Number */ --- 109,112 ---- *************** *** 147,151 **** lock = false; active = false; - plane = new Plane (0, 0, 1, 0); } --- 142,145 ---- *************** *** 186,190 **** Edge ray = new Edge(near, far); ray = transformation.unProject(ray); ! { Vertex n = new Vertex(0, 0, 1.0); --- 180,184 ---- Edge ray = new Edge(near, far); ray = transformation.unProject(ray); ! Plane work; { Vertex n = new Vertex(0, 0, 1.0); *************** *** 192,213 **** n.normalize(); if (start != null) { ! Vertex planeNormal; ! if (Math.abs(n.getZ()) < 0.45) { ! planeNormal = plane.normal(); } else { ! planeNormal = plane.normal(); } - plane = new Plane(planeNormal.getX(), - planeNormal.getY(), - planeNormal.getZ(), - -(planeNormal.getX() * start.vertex().getX() + - planeNormal.getY() * start.vertex().getY() + - planeNormal.getZ() * start.vertex().getZ())); } } - Plane work = plane; - if (constrain) { if (lockingEdge != null) { --- 186,208 ---- n.normalize(); if (start != null) { ! Vertex normal; ! if (Math.abs(n.getZ()) > 0.45) { ! normal = new Vertex(0, 0, 1.0); } else { ! normal = new Vertex(1, 0, 0); } + work = new Plane(normal.getX(), + normal.getY(), + normal.getZ(), + -(normal.getX() * start.vertex().getX() + + normal.getY() * start.vertex().getY() + + normal.getZ() * start.vertex().getZ())); + + } else { + work = new Plane(0, 0, 1, 0); } } if (constrain) { if (lockingEdge != null) { *************** *** 764,768 **** */ public void cleanUp() { - plane = new Plane(0, 0, 1, 0); start = null; current = null; --- 759,762 ---- |
From: Michael L. <he...@us...> - 2007-09-05 09:03:54
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5226/src/net/sourceforge/bprocessor/gl/tool Modified Files: MultiExtrudeTool.java Log Message: Removed a reference of work plane from defunct tool Index: MultiExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MultiExtrudeTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** MultiExtrudeTool.java 11 Sep 2006 12:47:32 -0000 1.23 --- MultiExtrudeTool.java 5 Sep 2007 09:00:00 -0000 1.24 *************** *** 113,120 **** Edge ray = new Edge(near, far); ray = trans.unProject(ray); ! plane = extrudeSurface.plane().orthogonalPlane(ray); ! log.info("Distance to ortho-plane from start " + plane.distance(start.vertex())); ! log.info("Distance to plane from start " + ! extrudeSurface.plane().distance(start.vertex())); LinkedList planeinfo = new LinkedList(); Vertex normalCopy = normal.copy(); --- 113,117 ---- Edge ray = new Edge(near, far); ray = trans.unProject(ray); ! // plane = extrudeSurface.plane().orthogonalPlane(ray); LinkedList planeinfo = new LinkedList(); Vertex normalCopy = normal.copy(); |
From: Michael L. <he...@us...> - 2007-09-05 08:56:52
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3960/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrusionTool.java Log Message: removed reference to work plane Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** ExtrusionTool.java 20 Aug 2007 12:33:37 -0000 1.65 --- ExtrusionTool.java 5 Sep 2007 08:56:51 -0000 1.66 *************** *** 267,271 **** ontoPlane = ((Surface) target).plane(); makeTarget(current); ! } else if (target instanceof Plane && target != plane) { ontoPlane = (Plane)target; makeTarget(current); --- 267,271 ---- ontoPlane = ((Surface) target).plane(); makeTarget(current); ! } else if (target instanceof Plane) { ontoPlane = (Plane)target; makeTarget(current); |