bprocessor-commit Mailing List for B-processor (Page 61)
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-06-19 14:03:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25655/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: Added a Frame modellor (not yet implemented) Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** PopupMenu.java 4 Jun 2007 20:38:25 -0000 1.35 --- PopupMenu.java 19 Jun 2007 14:03:32 -0000 1.36 *************** *** 203,206 **** --- 203,218 ---- } + + private abstract static class ModellorAction extends AbstractAction { + protected Modellor modellor; + protected Space space; + + public ModellorAction(Modellor modellor, Space space) { + super(modellor.getGeneralName()); + this.modellor = modellor; + this.space = space; + } + } + /** * A popup generator for a collection of space *************** *** 301,304 **** --- 313,329 ---- pm.add(modCheck); pm.add(getTransformMenu(sp)); + + for (Modellor current : Modellor.getRegisteredModellors()) { + if (current.application() == Modellor.DETAIL) { + AbstractAction action = new ModellorAction(current, sp) { + public void actionPerformed(ActionEvent e) { + System.out.println("detail " + modellor); + modellor.newInstance(space); + } + }; + pm.add(action); + } + } + JMenu mm = new JMenu("Modellors"); Collection c = Modellor.getRegisteredModellors(); |
From: Michael L. <he...@us...> - 2007-06-19 14:03:27
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25639/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Added a Frame modellor (not yet implemented) Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.127 retrieving revision 1.128 diff -C2 -d -r1.127 -r1.128 *** Project.java 18 Jun 2007 13:22:02 -0000 1.127 --- Project.java 19 Jun 2007 14:03:27 -0000 1.128 *************** *** 24,27 **** --- 24,28 ---- import net.sourceforge.bprocessor.model.modellor.Box; import net.sourceforge.bprocessor.model.modellor.Cylinder; + import net.sourceforge.bprocessor.model.modellor.Frame; import net.sourceforge.bprocessor.model.modellor.InnerWallModellor; import net.sourceforge.bprocessor.model.modellor.LayerModellor; *************** *** 165,168 **** --- 166,170 ---- Modellor.registerModellor(new Box()); + Modellor.registerModellor(new Frame()); try { |
From: Michael L. <he...@us...> - 2007-06-19 14:03:27
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25639/src/net/sourceforge/bprocessor/model/modellor Added Files: Frame.java Log Message: Added a Frame modellor (not yet implemented) --- NEW FILE: Frame.java --- //--------------------------------------------------------------------------------- // $Id: Frame.java,v 1.1 2007/06/19 14:03:27 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.modellor; import java.util.List; import java.util.Map; import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Space; /** * */ public class Frame extends Modellor { /** {@inheritDoc} */ @Override public void getAttributes(List<Attribute> attributes) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void getSubContent(Map<String, Object> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public int getUseableLevel() { return Space.PROJECT_LEVEL; } /** {@inheritDoc} */ @Override public Modellor newInstance(Space space) { // TODO Auto-generated method stub return null; } /** {@inheritDoc} */ @Override public void setAttributes(Map<String, Attribute> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void setSubContent(Map<String, Object> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void update(Object entity) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void delete() { // TODO Auto-generated method stub } /** {@inheritDoc} */ public String getGeneralName() { return "Frame"; } /** * {@inheritDoc} */ public String getName() { return "Settings"; } /** * {@inheritDoc} */ public int application() { return Modellor.DETAIL; } } |
From: Michael L. <he...@us...> - 2007-06-19 13:46:21
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18685/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: Added Modellor.application, that specifies how a modellor are to be applied Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** GUI.java 19 Jun 2007 13:38:06 -0000 1.69 --- GUI.java 19 Jun 2007 13:46:14 -0000 1.70 *************** *** 275,279 **** for (Modellor current : Modellor.getRegisteredModellors()) { ! if (current.modern()) { AbstractAction action = new ModellorAction(current) { public void actionPerformed(ActionEvent e) { --- 275,279 ---- for (Modellor current : Modellor.getRegisteredModellors()) { ! if (current.application() == Modellor.SHAPE) { AbstractAction action = new ModellorAction(current) { public void actionPerformed(ActionEvent e) { |
From: Michael L. <he...@us...> - 2007-06-19 13:42:27
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17079/src/net/sourceforge/bprocessor/model/modellor Modified Files: Modellor.java Box.java Log Message: Added Modellor.application, that specifies how a modellor are to be applied Index: Modellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Modellor.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Modellor.java 18 Jun 2007 13:22:01 -0000 1.13 --- Modellor.java 19 Jun 2007 13:42:28 -0000 1.14 *************** *** 29,32 **** --- 29,40 ---- */ public abstract class Modellor extends Entity implements Observer, Parametric { + + /** */ + public static final int NORMAL = 0; + /** */ + public static final int SHAPE = 1; + /** */ + public static final int DETAIL = 2; + /** The registered modellors */ private static LinkedList<Modellor> modellors; *************** *** 233,240 **** /** * ! * @return true if modern */ ! public boolean modern() { ! return false; } } --- 241,248 ---- /** * ! * @return type of application */ ! public int application() { ! return NORMAL; } } Index: Box.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Box.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Box.java 19 Jun 2007 12:01:19 -0000 1.2 --- Box.java 19 Jun 2007 13:42:28 -0000 1.3 *************** *** 152,157 **** * {@inheritDoc} */ ! public boolean modern() { ! return true; } --- 152,157 ---- * {@inheritDoc} */ ! public int application() { ! return SHAPE; } |
From: Michael L. <he...@us...> - 2007-06-19 12:01:26
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9145/src/net/sourceforge/bprocessor/model/modellor Modified Files: Box.java Log Message: Simple box modellor implemented Index: Box.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Box.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Box.java 18 Jun 2007 13:22:01 -0000 1.1 --- Box.java 19 Jun 2007 12:01:19 -0000 1.2 *************** *** 8,17 **** --- 8,22 ---- package net.sourceforge.bprocessor.model.modellor; + import java.util.Collection; + import java.util.LinkedList; import java.util.List; import java.util.Map; import net.sourceforge.bprocessor.model.Attribute; + import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; + import net.sourceforge.bprocessor.model.Surface; + import net.sourceforge.bprocessor.model.Vertex; /** *************** *** 23,26 **** --- 28,36 ---- private Space space; + private double width; + private double height; + private double depth; + + /** * *************** *** 39,42 **** --- 49,55 ---- space = new Space("Interior", Space.CONSTRUCTION, Space.SPACE_LEVEL, true); union.add(space); + width = 1.0; + height = 1.0; + depth = 1.0; } *************** *** 44,49 **** @Override public void getAttributes(List<Attribute> attributes) { ! // TODO Auto-generated method stub ! } --- 57,63 ---- @Override public void getAttributes(List<Attribute> attributes) { ! attributes.add(new Attribute("width", Double.valueOf(width), true)); ! attributes.add(new Attribute("height", Double.valueOf(height), true)); ! attributes.add(new Attribute("depth", Double.valueOf(depth), true)); } *************** *** 51,55 **** @Override public void getSubContent(Map<String, Object> map) { ! // TODO Auto-generated method stub } --- 65,71 ---- @Override public void getSubContent(Map<String, Object> map) { ! map.put("width", Double.valueOf(width)); ! map.put("height", Double.valueOf(height)); ! map.put("depth", Double.valueOf(depth)); } *************** *** 71,76 **** @Override public void setAttributes(Map<String, Attribute> map) { ! // TODO Auto-generated method stub ! } --- 87,93 ---- @Override public void setAttributes(Map<String, Attribute> map) { ! width = ((Double) map.get("width").getValue()).doubleValue(); ! height = ((Double) map.get("height").getValue()).doubleValue(); ! depth = ((Double) map.get("depth").getValue()).doubleValue(); } *************** *** 78,83 **** @Override public void setSubContent(Map<String, Object> map) { ! // TODO Auto-generated method stub ! } --- 95,101 ---- @Override public void setSubContent(Map<String, Object> map) { ! width = ((Double) map.get("width")).doubleValue(); ! height = ((Double) map.get("height")).doubleValue(); ! depth = ((Double) map.get("depth")).doubleValue(); } *************** *** 86,89 **** --- 104,131 ---- public void update(Object entity) { System.out.println("update " + space); + union.clear(); + union.add(space); + Vertex v1 = new Vertex(0, 0, 0); + Vertex v2 = new Vertex(width, 0, 0); + Vertex v3 = new Vertex(width, height, 0); + Vertex v4 = new Vertex(0, height, 0); + Edge e1 = new Edge(v1, v2); + Edge e2 = new Edge(v2, v3); + Edge e3 = new Edge(v3, v4); + Edge e4 = new Edge(v4, v1); + List<Edge> edges = new LinkedList(); + edges.add(e1); + edges.add(e2); + edges.add(e3); + edges.add(e4); + Surface bottom = new Surface(edges); + bottom.setFrontDomain(space); + Collection<Surface> sides = new LinkedList(); + Surface top = bottom.extrusion(depth, sides); + for (Surface current : sides) { + union.insert(current); + } + union.insert(top); + union.insert(bottom); } |
From: Michael L. <he...@us...> - 2007-06-18 13:22:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14423/src/net/sourceforge/bprocessor/model/modellor Modified Files: Modellor.java Added Files: Box.java Log Message: New experimental box modellor Index: Modellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Modellor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Modellor.java 18 Jun 2007 09:03:43 -0000 1.12 --- Modellor.java 18 Jun 2007 13:22:01 -0000 1.13 *************** *** 125,128 **** --- 125,137 ---- public abstract Modellor newInstance(Space space); + + /** + * Create space + * @return Space + */ + public Space createSpace() { + return null; + } + /** * Get parameter block for element *************** *** 221,223 **** --- 230,240 ---- setAttributes(map); } + + /** + * + * @return true if modern + */ + public boolean modern() { + return false; + } } --- NEW FILE: Box.java --- //--------------------------------------------------------------------------------- // $Id: Box.java,v 1.1 2007/06/18 13:22:01 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model.modellor; import java.util.List; import java.util.Map; import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; /** * */ public class Box extends Modellor { private Space union; private Space space; /** * */ public Box() { // TODO Auto-generated constructor stub } /** * Constructs modellor * @param union Union */ public Box(Space union) { this.union = union; union.setModellor(this); space = new Space("Interior", Space.CONSTRUCTION, Space.SPACE_LEVEL, true); union.add(space); } /** {@inheritDoc} */ @Override public void getAttributes(List<Attribute> attributes) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void getSubContent(Map<String, Object> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public int getUseableLevel() { return Space.PROJECT_LEVEL; } /** {@inheritDoc} */ @Override public Modellor newInstance(Space space) { // TODO Auto-generated method stub return null; } /** {@inheritDoc} */ @Override public void setAttributes(Map<String, Attribute> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void setSubContent(Map<String, Object> map) { // TODO Auto-generated method stub } /** {@inheritDoc} */ @Override public void update(Object entity) { System.out.println("update " + space); } /** {@inheritDoc} */ @Override public void delete() { // TODO Auto-generated method stub } /** {@inheritDoc} */ public String getGeneralName() { return "Box"; } /** * {@inheritDoc} */ public String getName() { return "Settings"; } /** * {@inheritDoc} */ public boolean modern() { return true; } /** * {@inheritDoc} */ public Space createSpace() { Space union = new Space("Box", Space.CONSTRUCTION, Space.SPACE_LEVEL, true); union.setUnion(true); Modellor modellor = new Box(union); Project.getInstance().addObserver(modellor); return union; } } |
From: Michael L. <he...@us...> - 2007-06-18 13:22:04
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14414/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: New experimental box modellor Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** GUI.java 24 May 2007 10:57:48 -0000 1.67 --- GUI.java 18 Jun 2007 13:21:57 -0000 1.68 *************** *** 56,59 **** --- 56,60 ---- import java.awt.event.KeyEvent; + import javax.swing.AbstractAction; import javax.swing.JFrame; import javax.swing.JMenu; *************** *** 151,155 **** /** Abstract action */ ! private abstract class AbstractAction implements ActionListener { } --- 152,156 ---- /** Abstract action */ ! private abstract class EditAction implements ActionListener { } *************** *** 241,244 **** --- 242,254 ---- } + private abstract class ModellorAction extends AbstractAction { + protected Modellor modellor; + + public ModellorAction(Modellor modellor) { + super(modellor.getGeneralName()); + this.modellor = modellor; + } + } + private JMenu createCreateMenu() { JMenu create = new JMenu("Create"); *************** *** 280,283 **** --- 290,309 ---- createNet.addActionListener(new CreateNetActionListener()); create.add(createNet); + + for (Modellor current : Modellor.getRegisteredModellors()) { + if (current.modern()) { + AbstractAction action = new ModellorAction(current) { + public void actionPerformed(ActionEvent e) { + System.out.println("actionate " + modellor); + Space space = modellor.createSpace(); + Project.getInstance().world().add(space); + Project.getInstance().changed(Project.getInstance()); + } + }; + create.add(action); + } + } + + JMenu modellorSubmenu = new JMenu("Modellors"); *************** *** 296,300 **** int level = s.getLevel(); for (Modellor m : Modellor.getRegisteredModellors()) { ! JMenuItem mod = new JMenuItem(m.getName()); if (level == m.getUseableLevel()) { mod.addActionListener(new ModellorMenuAction(s, m)); --- 322,326 ---- int level = s.getLevel(); for (Modellor m : Modellor.getRegisteredModellors()) { ! JMenuItem mod = new JMenuItem(m.getGeneralName()); if (level == m.getUseableLevel()) { mod.addActionListener(new ModellorMenuAction(s, m)); *************** *** 319,323 **** editUndo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); ! editUndo.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { Project.getInstance().undo(); --- 345,349 ---- editUndo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); ! editUndo.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { Project.getInstance().undo(); *************** *** 331,335 **** editRedo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); ! editRedo.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { Project.getInstance().redo(); --- 357,361 ---- editRedo.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); ! editRedo.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { Project.getInstance().redo(); *************** *** 353,357 **** Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); editCopy.setEnabled(false); ! editCopy.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { Selection s = Selection.primary(); --- 379,383 ---- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); editCopy.setEnabled(false); ! editCopy.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { Selection s = Selection.primary(); *************** *** 373,377 **** Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); editPaste.setEnabled(false); ! editPaste.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { LinkedList<Geometric> copied = new LinkedList<Geometric>(); --- 399,403 ---- Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); editPaste.setEnabled(false); ! editPaste.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { LinkedList<Geometric> copied = new LinkedList<Geometric>(); *************** *** 416,420 **** JMenuItem editDelete = new JMenuItem("Delete"); editDelete.setMnemonic(KeyEvent.VK_D); ! editDelete.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { Collection c = Selection.primary(); --- 442,446 ---- JMenuItem editDelete = new JMenuItem("Delete"); editDelete.setMnemonic(KeyEvent.VK_D); ! editDelete.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { Collection c = Selection.primary(); *************** *** 433,437 **** JMenuItem repaintTree = new JMenuItem("Repaint tree"); repaintTree.setEnabled(true); ! repaintTree.addActionListener(new AbstractAction() { public void actionPerformed(ActionEvent arg0) { makeTree(); --- 459,463 ---- JMenuItem repaintTree = new JMenuItem("Repaint tree"); repaintTree.setEnabled(true); ! repaintTree.addActionListener(new EditAction() { public void actionPerformed(ActionEvent arg0) { makeTree(); |
From: Michael L. <he...@us...> - 2007-06-18 13:22:04
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14423/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: New experimental box modellor Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.126 retrieving revision 1.127 diff -C2 -d -r1.126 -r1.127 *** Project.java 24 May 2007 10:47:14 -0000 1.126 --- Project.java 18 Jun 2007 13:22:02 -0000 1.127 *************** *** 22,25 **** --- 22,26 ---- import java.util.StringTokenizer; + import net.sourceforge.bprocessor.model.modellor.Box; import net.sourceforge.bprocessor.model.modellor.Cylinder; import net.sourceforge.bprocessor.model.modellor.InnerWallModellor; *************** *** 163,166 **** --- 164,169 ---- Modellor.registerModellor(new ModelBathModellor2()); + Modellor.registerModellor(new Box()); + try { loadClassification(true); |
From: Michael L. <he...@us...> - 2007-06-18 09:03:52
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11053/src/net/sourceforge/bprocessor/model/modellor Modified Files: Modellor.java Log Message: Renamed some parameters Index: Modellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/Modellor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Modellor.java 17 Apr 2007 13:04:44 -0000 1.11 --- Modellor.java 18 Jun 2007 09:03:43 -0000 1.12 *************** *** 51,58 **** /** * Register a modellor to the possible choices of modellors ! * @param m The modellor */ ! public static void registerModellor(Modellor m) { ! modellors.add(m); } --- 51,58 ---- /** * Register a modellor to the possible choices of modellors ! * @param modellor The modellor */ ! public static void registerModellor(Modellor modellor) { ! modellors.add(modellor); } *************** *** 74,82 **** /** * De-register a modellor from the system ! * @param m The modellor to remove from the registry * @return True if it succedes */ ! public static boolean removeModellor(Modellor m) { ! return modellors.remove(m); } --- 74,82 ---- /** * De-register a modellor from the system ! * @param modellor The modellor to remove from the registry * @return True if it succedes */ ! public static boolean removeModellor(Modellor modellor) { ! return modellors.remove(modellor); } *************** *** 108,127 **** /** * method to fill in all the attributes, in the wished order ! * @param l the list to fill in the attributes */ ! public abstract void getAttributes(List<Attribute> l); /** * Set attributes in the modellor ! * @param m a map of attribute name to attributes for quick lookup */ ! public abstract void setAttributes(Map<String, Attribute> m); /** * Create a new instance of the modellor, based on a space ! * @param s The space the modellor should reside in * @return The created modellor object for the given space */ ! public abstract Modellor newInstance(Space s); /** --- 108,127 ---- /** * method to fill in all the attributes, in the wished order ! * @param attributes the list to fill in the attributes */ ! public abstract void getAttributes(List<Attribute> attributes); /** * Set attributes in the modellor ! * @param map a map of attribute name to attributes for quick lookup */ ! public abstract void setAttributes(Map<String, Attribute> map); /** * Create a new instance of the modellor, based on a space ! * @param space The space the modellor should reside in * @return The created modellor object for the given space */ ! public abstract Modellor newInstance(Space space); /** *************** *** 150,158 **** /** * Set the entire content of the modellor to the given map key to value pairs ! * @param m the map containing the values; */ ! public void setContent(Map<String, Object> m) { ! active = ((Boolean)m.get("active")).booleanValue(); ! setSubContent(m); } --- 150,158 ---- /** * Set the entire content of the modellor to the given map key to value pairs ! * @param map the map containing the values; */ ! public void setContent(Map<String, Object> map) { ! active = ((Boolean)map.get("active")).booleanValue(); ! setSubContent(map); } *************** *** 170,182 **** /** * Abstract method for getting the implementing modellors content ! * @param c the map to put the content in */ ! public abstract void getSubContent(Map<String, Object> c); /** * Abstact method for setting the content in extending classes ! * @param c The map containing the object setting */ ! public abstract void setSubContent(Map<String, Object> c); /** --- 170,182 ---- /** * Abstract method for getting the implementing modellors content ! * @param map the map to put the content in */ ! public abstract void getSubContent(Map<String, Object> map); /** * Abstact method for setting the content in extending classes ! * @param map The map containing the object setting */ ! public abstract void setSubContent(Map<String, Object> map); /** |
From: Michael L. <he...@us...> - 2007-06-15 11:57:15
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11889/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: Removed some unused code Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** SpaceTool.java 14 Jun 2007 09:36:17 -0000 1.80 --- SpaceTool.java 15 Jun 2007 11:57:06 -0000 1.81 *************** *** 37,43 **** import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Geometry; - import net.sourceforge.bprocessor.model.modellor.Cylinder; - import net.sourceforge.bprocessor.model.modellor.LayerModellor; - import net.sourceforge.bprocessor.model.modellor.Modellor; /** --- 37,40 ---- *************** *** 97,134 **** /** - * MenuAction for making layers on spaces - */ - protected class LayerAction extends MenuAction { - /** The space */ - private Space space; - - /** The surface */ - private Surface surface; - - /** - * Constructor - * @param space The space - * @param surface The surface - */ - public LayerAction(Space space, Surface surface) { - super(); - this.space = space; - this.surface = surface; - } - - /** - * ActionPerformed - * @param event The action event - */ - public void actionPerformed(ActionEvent event) { - if (space != null) { - Modellor modellor = new LayerModellor(space, surface, 0.5); - space.setModellor(modellor); - space.changed(); - } - } - } - - /** * Create a popup for performing operations on selection * @return The popup menu --- 94,97 ---- *************** *** 169,181 **** } - /** - * Create a cylinder - * @param objects The selection - */ - protected void createCylinder(Collection objects) { - Modellor modellor = new Cylinder(); - modellor.update(modellor); - } - /** * Creates the correct type popup menu. --- 132,135 ---- |
From: Michael L. <he...@us...> - 2007-06-14 09:36:22
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21463/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: All connected also selects spaces interior to the selection Keyboard delete now also deletes selected spaces Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** SpaceTool.java 16 May 2007 07:37:56 -0000 1.79 --- SpaceTool.java 14 Jun 2007 09:36:17 -0000 1.80 *************** *** 12,21 **** import java.awt.event.ActionListener; import java.awt.event.MouseEvent; - import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; - import java.util.List; import java.util.Stack; --- 12,19 ---- *************** *** 29,34 **** import net.sourceforge.bprocessor.gui.PopupMenu; import net.sourceforge.bprocessor.gui.actions.SpaceMenuAction; - import net.sourceforge.bprocessor.model.ClippingPlane; - import net.sourceforge.bprocessor.model.Constructor; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; --- 27,30 ---- *************** *** 446,472 **** @Override public void remove() { ! Iterator it = Selection.primary().iterator(); ! List<Geometric> edges = new ArrayList<Geometric>(); ! List<Geometric> vertices = new ArrayList<Geometric>(); ! List<Geometric> surfaces = new ArrayList<Geometric>(); ! while (it.hasNext()) { ! Object selected = it.next(); ! if (selected instanceof Surface) { ! surfaces.add((Surface)selected); ! } else if (selected instanceof Edge) { ! edges.add((Edge)selected); ! } else if (selected instanceof Vertex) { ! vertices.add((Vertex) selected); ! } else if (selected instanceof ClippingPlane) { ! ((ClippingPlane)selected).delete(); ! } else if (selected instanceof Constructor) { ! ((Constructor)selected).delete(); ! } } Selection.primary().clear(); glv.getView().makeTarget(null); - Project.getInstance().delete(surfaces); - Project.getInstance().delete(edges); - Project.getInstance().delete(vertices); Project.getInstance().changed(Project.getInstance().getActiveSpace()); Project.getInstance().checkpoint(); --- 442,450 ---- @Override public void remove() { ! for (Geometric current : Selection.primary()) { ! current.delete(); } Selection.primary().clear(); glv.getView().makeTarget(null); Project.getInstance().changed(Project.getInstance().getActiveSpace()); Project.getInstance().checkpoint(); |
From: Michael L. <he...@us...> - 2007-06-14 09:36:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21445/src/net/sourceforge/bprocessor/model Modified Files: Geometric.java Log Message: All connected also selects spaces interior to the selection Keyboard delete now also deletes selected spaces Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Geometric.java 4 Jun 2007 20:38:32 -0000 1.17 --- Geometric.java 14 Jun 2007 09:36:13 -0000 1.18 *************** *** 35,38 **** --- 35,39 ---- LinkedList<Edge> edges = new LinkedList(); LinkedList<Vertex> vertices = new LinkedList(); + Set<Surface> env = new HashSet(surfaces); for (Geometric current : geometrics) { if (current instanceof Surface) { *************** *** 49,52 **** --- 50,54 ---- Surface surface = surfaces.remove(); mark.add(surface); + env.add(surface); for (Edge current : surface.getEdges()) { if (!mark.contains(current)) { *************** *** 85,88 **** --- 87,103 ---- } } + + Set<Space> spaces = new HashSet(); + for (Surface current : env) { + spaces.add(current.getFrontDomain()); + spaces.add(current.getBackDomain()); + } + for (Space current : spaces) { + if (current != current.getOwner().empty) { + if (env.containsAll(current.getEnvelope())) { + mark.add(current); + } + } + } return new LinkedList(mark); } |
From: Michael L. <he...@us...> - 2007-06-11 06:57:35
|
Update of /cvsroot/bprocessor/build In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3639 Modified Files: build.xml Log Message: Version updated to M9 Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/build/build.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** build.xml 1 Dec 2006 13:31:38 -0000 1.29 --- build.xml 11 Jun 2007 06:57:22 -0000 1.30 *************** *** 3,7 **** <target name="init"> <property name="project" value="bprocessor"/> ! <property name="version" value="M8a"/> <property name="script.dir" value="${basedir}/bin"/> --- 3,7 ---- <target name="init"> <property name="project" value="bprocessor"/> ! <property name="version" value="M9"/> <property name="script.dir" value="${basedir}/bin"/> |
From: Michael L. <he...@us...> - 2007-06-11 06:57:35
|
Update of /cvsroot/bprocessor/build/doc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3639/doc Modified Files: Changelog Log Message: Version updated to M9 Index: Changelog =================================================================== RCS file: /cvsroot/bprocessor/build/doc/Changelog,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Changelog 17 Oct 2006 09:28:47 -0000 1.10 --- Changelog 11 Jun 2007 06:57:25 -0000 1.11 *************** *** 1,4 **** --- 1,7 ---- Changelog: ========== + 2007/06/11: Release M9 + - Substantial update + 2006/10/17: Release M7 |
From: Michael L. <he...@us...> - 2007-06-08 10:51:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24192/src/net/sourceforge/bprocessor/model Modified Files: Mesh.java Log Message: Extended the Mesh.copy function to preserve references outside the set beeing copied Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Mesh.java 6 Jun 2007 20:14:11 -0000 1.19 --- Mesh.java 8 Jun 2007 10:51:34 -0000 1.20 *************** *** 241,248 **** } for (Surface current : surfaces) { if (current.getExterior() != null) { Surface exterior = (Surface) map.get(current.getExterior()); if (exterior != null) { - Surface surface = (Surface) map.get(current); exterior.addHole(surface); } --- 241,254 ---- } for (Surface current : surfaces) { + Surface surface = (Surface) map.get(current); + if (surface.getBackDomain() == null) { + surface.setBackDomain(current.getBackDomain()); + } + if (surface.getFrontDomain() == null) { + surface.setFrontDomain(current.getFrontDomain()); + } if (current.getExterior() != null) { Surface exterior = (Surface) map.get(current.getExterior()); if (exterior != null) { exterior.addHole(surface); } |
From: Michael L. <he...@us...> - 2007-06-07 07:04:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12924/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Space.java Log Message: Removed some code that caused a problem for net-facade modellor Fixed a problem with clearing spaces that gave duplicate entries in the envelope Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.167 retrieving revision 1.168 diff -C2 -d -r1.167 -r1.168 *** Surface.java 4 Jun 2007 20:38:32 -0000 1.167 --- Surface.java 7 Jun 2007 07:04:40 -0000 1.168 *************** *** 345,354 **** if (back != null) { back.removeSurface(this); ! // setBackDomain(null); } Space front = getFrontDomain(); if (front != null) { front.removeSurface(this); ! // setFrontDomain(null); } } --- 345,354 ---- if (back != null) { back.removeSurface(this); ! setBackDomain(null); } Space front = getFrontDomain(); if (front != null) { front.removeSurface(this); ! setFrontDomain(null); } } *************** *** 575,588 **** } copy.setEdges(edges); ! Space front = (Space) map.get(frontDomain); ! if (front == null) { ! front = frontDomain; ! } ! copy.setFrontDomain(front); ! Space back = (Space) map.get(backDomain); ! if (back == null) { ! back = backDomain; ! } ! copy.setBackDomain(back); } return copy; --- 575,588 ---- } copy.setEdges(edges); ! // Space front = (Space) map.get(frontDomain); ! // if (front == null) { ! // front = frontDomain; ! // } ! // copy.setFrontDomain(front); ! // Space back = (Space) map.get(backDomain); ! // if (back == null) { ! // back = backDomain; ! // } ! // copy.setBackDomain(back); } return copy; Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.149 retrieving revision 1.150 diff -C2 -d -r1.149 -r1.150 *** Space.java 31 May 2007 12:52:14 -0000 1.149 --- Space.java 7 Jun 2007 07:04:40 -0000 1.150 *************** *** 35,39 **** private static final long serialVersionUID = 1L; ! private static final boolean DELETE_EDGES = false; private static Logger log = Logger.getLogger(Space.class); --- 35,39 ---- private static final long serialVersionUID = 1L; ! private static final boolean DELETE_EDGES = true; private static Logger log = Logger.getLogger(Space.class); *************** *** 459,462 **** --- 459,464 ---- exterior.removeHole(surface); } + surface.setBackDomain(null); + surface.setFrontDomain(null); } vertices.clear(); |
From: Michael L. <he...@us...> - 2007-06-06 20:14:18
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22205/src/net/sourceforge/bprocessor/model Modified Files: Mesh.java Log Message: Small change to copy Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Mesh.java 4 Jun 2007 20:38:32 -0000 1.18 --- Mesh.java 6 Jun 2007 20:14:11 -0000 1.19 *************** *** 9,13 **** import java.util.Collection; - import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; --- 9,12 ---- *************** *** 225,235 **** /** * Returns a copy of this mesh * @return copy of this Mesh */ ! public Mesh copy() { Collection<Vertex> vs = new LinkedList(); Collection<Edge> es = new LinkedList(); Collection<Surface> ss = new LinkedList(); - Map map = new HashMap(); for (Vertex current : vertices) { vs.add((Vertex) current.copy(map)); --- 224,234 ---- /** * Returns a copy of this mesh + * @param map Map * @return copy of this Mesh */ ! public Mesh copy(Map map) { Collection<Vertex> vs = new LinkedList(); Collection<Edge> es = new LinkedList(); Collection<Surface> ss = new LinkedList(); for (Vertex current : vertices) { vs.add((Vertex) current.copy(map)); |
From: Michael L. <he...@us...> - 2007-06-06 20:14:14
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22170/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Small change to copy Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** FinalMoveTool.java 4 Jun 2007 20:38:21 -0000 1.14 --- FinalMoveTool.java 6 Jun 2007 20:14:08 -0000 1.15 *************** *** 11,14 **** --- 11,15 ---- import java.awt.event.MouseEvent; import java.util.Collection; + import java.util.HashMap; import java.util.LinkedList; import java.util.Stack; *************** *** 117,121 **** Vertex v = direction.copy(); v.scale(i); ! Mesh copy = mesh.copy(); for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); --- 118,122 ---- Vertex v = direction.copy(); v.scale(i); ! Mesh copy = mesh.copy(new HashMap()); for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); *************** *** 132,136 **** v.scale(d / v.length()); ! Mesh copy = mesh.copy(); for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); --- 133,137 ---- v.scale(d / v.length()); ! Mesh copy = mesh.copy(new HashMap()); for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); *************** *** 155,159 **** if (copy) { mesh = new Mesh(geometrics); ! mesh = mesh.copy(); geometrics = mesh.geometrics(); Project.getInstance().getActiveSpace().addProtected(geometrics); --- 156,160 ---- if (copy) { mesh = new Mesh(geometrics); ! mesh = mesh.copy(new HashMap()); geometrics = mesh.geometrics(); Project.getInstance().getActiveSpace().addProtected(geometrics); |
From: Michael L. <he...@us...> - 2007-06-04 20:38:39
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18118/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometric.java Mesh.java Log Message: Improved copying of geometry Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.166 retrieving revision 1.167 diff -C2 -d -r1.166 -r1.167 *** Surface.java 31 May 2007 12:52:14 -0000 1.166 --- Surface.java 4 Jun 2007 20:38:32 -0000 1.167 *************** *** 345,354 **** if (back != null) { back.removeSurface(this); ! setBackDomain(null); } Space front = getFrontDomain(); if (front != null) { front.removeSurface(this); ! setFrontDomain(null); } } --- 345,354 ---- if (back != null) { back.removeSurface(this); ! // setBackDomain(null); } Space front = getFrontDomain(); if (front != null) { front.removeSurface(this); ! // setFrontDomain(null); } } *************** *** 567,570 **** --- 567,571 ---- if (copy == null) { copy = new Surface(); + map.put(this, copy); List<Edge> edges = new ArrayList<Edge>(); Iterator iter = getEdges().iterator(); Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Mesh.java 29 May 2007 21:08:43 -0000 1.17 --- Mesh.java 4 Jun 2007 20:38:32 -0000 1.18 *************** *** 10,13 **** --- 10,14 ---- import java.util.Collection; import java.util.HashMap; + import java.util.HashSet; import java.util.LinkedList; import java.util.List; *************** *** 45,48 **** --- 46,73 ---- /** * + * @param geometrics Collection of Geometric objects + */ + public Mesh(Collection<Geometric> geometrics) { + Collection<Vertex> vertices = new HashSet(); + Collection<Edge> edges = new HashSet(); + Collection<Surface> surfaces = new HashSet(); + for (Geometric current : geometrics) { + if (current instanceof Surface) { + surfaces.add((Surface) current); + } else if (current instanceof Edge) { + edges.add((Edge) current); + } else if (current instanceof Vertex) { + vertices.add((Vertex) current); + } + } + edges.addAll(Surface.edges(surfaces)); + vertices.addAll(Edge.vertices(edges)); + this.surfaces = surfaces; + this.edges = edges; + this.vertices = vertices; + } + + /** + * * @return vertices */ *************** *** 68,71 **** --- 93,108 ---- /** + * Returns all geometric objects in this Mesh + * @return collection of geometrics objects + */ + public Collection<Geometric> geometrics() { + Collection<Geometric> result = new LinkedList(); + result.addAll(surfaces); + result.addAll(edges); + result.addAll(vertices); + return result; + } + + /** * */ *************** *** 204,207 **** --- 241,253 ---- ss.add((Surface) current.copy(map)); } + for (Surface current : surfaces) { + if (current.getExterior() != null) { + Surface exterior = (Surface) map.get(current.getExterior()); + if (exterior != null) { + Surface surface = (Surface) map.get(current); + exterior.addHole(surface); + } + } + } return new Mesh(ss, es, vs); } Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Geometric.java 29 May 2007 11:49:22 -0000 1.16 --- Geometric.java 4 Jun 2007 20:38:32 -0000 1.17 *************** *** 9,15 **** import java.util.Collection; import java.util.Map; import java.util.Set; - /** * The Geometric as a super class for geometric entities --- 9,16 ---- import java.util.Collection; + import java.util.HashSet; + import java.util.LinkedList; import java.util.Map; import java.util.Set; /** * The Geometric as a super class for geometric entities *************** *** 24,27 **** --- 25,92 ---- /** + * Returns collection of all connected geometry of specified + * collection of geometric objects. + * @param geometrics Collecion of Geometric objects + * @return all connected geometry + */ + public static Collection<Geometric> connected(Collection<Geometric> geometrics) { + Set<Geometric> mark = new HashSet(); + LinkedList<Surface> surfaces = new LinkedList(); + LinkedList<Edge> edges = new LinkedList(); + LinkedList<Vertex> vertices = new LinkedList(); + for (Geometric current : geometrics) { + if (current instanceof Surface) { + surfaces.offer((Surface) current); + } else if (current instanceof Edge) { + edges.offer((Edge) current); + } else if (current instanceof Vertex) { + vertices.offer((Vertex) current); + } + } + loop: + while (true) { + if (!surfaces.isEmpty()) { + Surface surface = surfaces.remove(); + mark.add(surface); + for (Edge current : surface.getEdges()) { + if (!mark.contains(current)) { + edges.offer(current); + } + } + for (Surface current : surface.getHoles()) { + if (!mark.contains(current)) { + surfaces.offer(current); + } + } + } else if (!edges.isEmpty()) { + Edge edge = edges.remove(); + mark.add(edge); + if (!mark.contains(edge.from)) { + vertices.offer(edge.from); + } + if (!mark.contains(edge.to)) { + vertices.offer(edge.to); + } + for (Surface current : edge.getSurfaces()) { + if (!mark.contains(current)) { + surfaces.offer(current); + } + } + } else if (!vertices.isEmpty()) { + Vertex vertex = vertices.remove(); + mark.add(vertex); + for (Edge current : vertex.getEdges()) { + if (!mark.contains(current)) { + edges.offer(current); + } + } + } else { + break loop; + } + } + return new LinkedList(mark); + } + + /** * Get the space * @return The space |
From: Michael L. <he...@us...> - 2007-06-04 20:38:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18110/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: Improved copying of geometry Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** PopupMenu.java 29 May 2007 11:49:25 -0000 1.34 --- PopupMenu.java 4 Jun 2007 20:38:25 -0000 1.35 *************** *** 31,35 **** import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.CoordinateSystem; - import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Geometric; --- 31,34 ---- *************** *** 372,391 **** } }; ! menu.add(delete); AbstractAction allConnected = new EntitiesMenuAction(entities, "All Connected") { public void actionPerformed(ActionEvent arg0) { ! int size = 0; ! Collection<Vertex> vertices = Geometry.collect(entities); ! Collection<Edge> edges = new LinkedList<Edge>(); ! while (vertices.size() > size) { ! size = vertices.size(); ! edges = Vertex.edges(vertices); ! vertices = Geometry.collect(edges); ! } ! Collection<Surface> surfaces = Edge.surfaces(edges); ! Collection<Geometric> geometrics = new HashSet<Geometric>(); ! geometrics.addAll(surfaces); ! geometrics.addAll(edges); ! geometrics.addAll(vertices); Selection.primary().set(geometrics); } --- 371,379 ---- } }; ! menu.add(delete); AbstractAction allConnected = new EntitiesMenuAction(entities, "All Connected") { public void actionPerformed(ActionEvent arg0) { ! Collection<Geometric> geometrics = ! Geometric.connected(new LinkedList(entities)); Selection.primary().set(geometrics); } |
From: Michael L. <he...@us...> - 2007-06-04 20:38:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18096/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectStrategy.java FinalMoveTool.java Log Message: Improved copying of geometry Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** SelectStrategy.java 10 May 2007 11:53:11 -0000 1.12 --- SelectStrategy.java 4 Jun 2007 20:38:21 -0000 1.13 *************** *** 11,15 **** import java.util.HashSet; import java.util.Iterator; - import java.util.LinkedList; import java.util.List; --- 11,14 ---- *************** *** 24,28 **** import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Geometric; - import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; --- 23,26 ---- *************** *** 130,146 **** Selection.primary().addAll(extended); } else { ! int size = 0; ! Collection<Vertex> vertices = Geometry.collect(Selection.primary()); ! Collection<Edge> edges = new LinkedList<Edge>(); ! while (vertices.size() > size) { ! size = vertices.size(); ! edges = Vertex.edges(vertices); ! vertices = Geometry.collect(edges); ! } ! Collection<Surface> surfaces = Edge.surfaces(edges); ! Collection<Geometric> geometrics = new HashSet<Geometric>(); ! geometrics.addAll(surfaces); ! geometrics.addAll(edges); ! geometrics.addAll(vertices); Selection.primary().set(geometrics); } --- 128,133 ---- Selection.primary().addAll(extended); } else { ! Collection<Geometric> geometrics = ! Geometric.connected(Selection.primary()); Selection.primary().set(geometrics); } Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** FinalMoveTool.java 31 May 2007 12:41:59 -0000 1.13 --- FinalMoveTool.java 4 Jun 2007 20:38:21 -0000 1.14 *************** *** 11,18 **** import java.awt.event.MouseEvent; import java.util.Collection; - import java.util.HashMap; - import java.util.HashSet; import java.util.LinkedList; - import java.util.Map; import java.util.Stack; --- 11,15 ---- *************** *** 25,29 **** 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; --- 22,25 ---- *************** *** 158,167 **** copy = e.isAltDown(); if (copy) { ! Collection<Geometric> copied = new LinkedList(); ! Map map = new HashMap(); ! for (Geometric current : geometrics) { ! copied.add(current.copy(map)); ! } ! geometrics = copied; Project.getInstance().getActiveSpace().addProtected(geometrics); } --- 154,160 ---- copy = e.isAltDown(); if (copy) { ! mesh = new Mesh(geometrics); ! mesh = mesh.copy(); ! geometrics = mesh.geometrics(); Project.getInstance().getActiveSpace().addProtected(geometrics); } *************** *** 179,199 **** if (copy) { owner.removeProtected(geometrics); - Collection<Vertex> vertices = new HashSet(); - Collection<Edge> edges = new HashSet(); - Collection<Surface> surfaces = new HashSet(); - for (Geometric current : geometrics) { - if (current instanceof Surface) { - surfaces.add((Surface) current); - } else if (current instanceof Edge) { - edges.add((Edge) current); - } else if (current instanceof Vertex) { - vertices.add((Vertex) current); - } - } - edges.addAll(Surface.edges(surfaces)); - vertices.addAll(Edge.vertices(edges)); - mesh = new Mesh(surfaces, edges, vertices); direction = last.minus(start.vertex()); ! owner.insert(mesh.copy()); geometrics = null; } --- 172,177 ---- if (copy) { owner.removeProtected(geometrics); direction = last.minus(start.vertex()); ! owner.insert(mesh); geometrics = null; } |
From: Michael L. <he...@us...> - 2007-06-01 11:52:36
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5461/src/net/sourceforge/bprocessor/gl/tool Modified Files: CameraFlyTool.java AbstractTool.java CameraWalkTool.java CameraTool.java Log Message: Drag delay is now specified per tool. Default is 200 ms. Camera tools has dragdelay of 0 ms Index: CameraTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraTool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CameraTool.java 3 Jul 2006 14:25:03 -0000 1.11 --- CameraTool.java 1 Jun 2007 11:52:34 -0000 1.12 *************** *** 43,46 **** --- 43,47 ---- orbit = new OrbitStrategy(glv); rotationCursor = cursor1; + dragDelay = 0; } Index: CameraWalkTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraWalkTool.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CameraWalkTool.java 21 Nov 2006 17:38:25 -0000 1.6 --- CameraWalkTool.java 1 Jun 2007 11:52:34 -0000 1.7 *************** *** 32,35 **** --- 32,36 ---- public CameraWalkTool(GLView glv, Cursor cursor) { super(glv, cursor); + dragDelay = 0; } Index: CameraFlyTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CameraFlyTool.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CameraFlyTool.java 21 Nov 2006 17:38:25 -0000 1.8 --- CameraFlyTool.java 1 Jun 2007 11:52:33 -0000 1.9 *************** *** 32,35 **** --- 32,36 ---- public CameraFlyTool(GLView glv, Cursor cursor) { super(glv, cursor); + dragDelay = 0; } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** AbstractTool.java 1 Jun 2007 10:49:33 -0000 1.122 --- AbstractTool.java 1 Jun 2007 11:52:34 -0000 1.123 *************** *** 90,94 **** /** The minimum drag time */ ! private static final int MIN_DRAG_TIME_MS = 200; /** Simple selection mechanism **/ --- 90,94 ---- /** The minimum drag time */ ! protected int dragDelay = 200; /** Simple selection mechanism **/ *************** *** 389,397 **** select.dragged(e); } else { ! if (e.getWhen() > pressedTime + MIN_DRAG_TIME_MS) { dragged(e); } else { parked = e; ! int delay = (int) (MIN_DRAG_TIME_MS - (e.getWhen() - pressedTime)); dragtimer = new Timer(delay, new DragAction()); dragtimer.setRepeats(false); --- 389,397 ---- select.dragged(e); } else { ! if (e.getWhen() > pressedTime + dragDelay) { dragged(e); } else { parked = e; ! int delay = (int) (dragDelay - (e.getWhen() - pressedTime)); dragtimer = new Timer(delay, new DragAction()); dragtimer.setRepeats(false); |
From: Michael L. <he...@us...> - 2007-06-01 10:49:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11913/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java Log Message: Small improvement of the time based delay in drag in tools Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.121 retrieving revision 1.122 diff -C2 -d -r1.121 -r1.122 *** AbstractTool.java 16 May 2007 07:37:56 -0000 1.121 --- AbstractTool.java 1 Jun 2007 10:49:33 -0000 1.122 *************** *** 38,41 **** --- 38,43 ---- import java.awt.Point; import java.awt.Toolkit; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; *************** *** 53,56 **** --- 55,59 ---- import java.util.Collection; import java.util.Stack; + import javax.swing.Timer; import org.apache.log4j.Logger; *************** *** 82,85 **** --- 85,92 ---- private Transform id; + private MouseEvent parked; + + private Timer dragtimer; + /** The minimum drag time */ private static final int MIN_DRAG_TIME_MS = 200; *************** *** 191,194 **** --- 198,211 ---- } + private class DragAction implements ActionListener { + public void actionPerformed(ActionEvent e) { + if (parked != null) { + dragged(parked); + parked = null; + glv.repaint(true); + } + } + } + /** * Getter for cursor *************** *** 359,362 **** --- 376,380 ---- */ public void mouseDragged(MouseEvent e) { + parked = null; int x = e.getX(); int y = e.getY(); *************** *** 373,376 **** --- 391,400 ---- if (e.getWhen() > pressedTime + MIN_DRAG_TIME_MS) { dragged(e); + } else { + parked = e; + int delay = (int) (MIN_DRAG_TIME_MS - (e.getWhen() - pressedTime)); + dragtimer = new Timer(delay, new DragAction()); + dragtimer.setRepeats(false); + dragtimer.start(); } } *************** *** 386,389 **** --- 410,414 ---- */ public void mouseMoved(MouseEvent e) { + parked = null; int x = e.getX(); int y = e.getY(); *************** *** 424,427 **** --- 449,453 ---- */ public void mousePressed(MouseEvent e) { + parked = null; pressedTime = e.getWhen(); pressPos[0] = e.getX(); *************** *** 464,467 **** --- 490,494 ---- */ public void mouseReleased(MouseEvent e) { + parked = null; if (e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(cursor); |
From: Michael L. <he...@us...> - 2007-05-31 12:52:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8739/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Space.java Log Message: Refactored Surface remove Ð a part of remove is now called unlink Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.165 retrieving revision 1.166 diff -C2 -d -r1.165 -r1.166 *** Surface.java 31 May 2007 12:41:55 -0000 1.165 --- Surface.java 31 May 2007 12:52:14 -0000 1.166 *************** *** 331,335 **** */ public void unlink() { ! } --- 331,355 ---- */ public void unlink() { ! for (Surface current : getHoles()) { ! if (getExterior() != null) { ! getExterior().addHole(current); ! } else { ! current.setExterior(null); ! } ! } ! if (getExterior() != null) { ! Surface exterior = getExterior(); ! exterior.removeHole(this); ! } ! Space back = getBackDomain(); ! if (back != null) { ! back.removeSurface(this); ! setBackDomain(null); ! } ! Space front = getFrontDomain(); ! if (front != null) { ! front.removeSurface(this); ! setFrontDomain(null); ! } } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.148 retrieving revision 1.149 diff -C2 -d -r1.148 -r1.149 *** Space.java 31 May 2007 12:41:55 -0000 1.148 --- Space.java 31 May 2007 12:52:14 -0000 1.149 *************** *** 913,937 **** */ public void remove(Surface surface) { ! for (Surface current : surface.getHoles()) { ! if (surface.getExterior() != null) { ! surface.getExterior().addHole(current); ! } else { ! current.setExterior(null); ! } ! } ! if (surface.getExterior() != null) { ! Surface exterior = surface.getExterior(); ! exterior.removeHole(surface); ! } ! Space back = surface.getBackDomain(); ! if (back != null) { ! back.removeSurface(surface); ! surface.setBackDomain(null); ! } ! Space front = surface.getFrontDomain(); ! if (front != null) { ! front.removeSurface(surface); ! surface.setFrontDomain(null); ! } surfaces.remove(surface.getId()); surface.setId(null); --- 913,917 ---- */ public void remove(Surface surface) { ! surface.unlink(); surfaces.remove(surface.getId()); surface.setId(null); |