bprocessor-commit Mailing List for B-processor (Page 78)
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: Nordholt <nor...@us...> - 2007-01-31 20:51:35
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21625/src/etc Modified Files: bprocessor.xsd Log Message: added boolean and net types to the schema Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** bprocessor.xsd 25 Jan 2007 10:20:55 -0000 1.27 --- bprocessor.xsd 31 Jan 2007 20:51:19 -0000 1.28 *************** *** 80,83 **** --- 80,90 ---- </xsd:complexContent> </xsd:complexType> + + <xsd:complexType name="NetType"> + <xsd:complexContent> + <xsd:extension base="SpaceType"> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> <xsd:complexType name="SpaceType"> *************** *** 251,254 **** --- 258,271 ---- </xsd:complexType> + <xsd:complexType name="BooleanType"> + <xsd:complexContent> + <xsd:extension base="Types"> + <xsd:sequence> + <xsd:element name="boolean" type="xsd:boolean" maxOccurs="1" minOccurs="1"/> + </xsd:sequence> + </xsd:extension> + </xsd:complexContent> + </xsd:complexType> + <xsd:complexType name="StringType"> <xsd:complexContent> |
|
From: rimestad <rim...@us...> - 2007-01-31 20:46:08
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19209/src/net/sourceforge/bprocessor/gui/actions Modified Files: CsvReader.java FileImportActionListener.java Log Message: Added a additional panel to the filedialog to select a floor and see the amount of vertexes in the file Index: CsvReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CsvReader.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CsvReader.java 30 Jan 2007 19:50:45 -0000 1.1 --- CsvReader.java 31 Jan 2007 20:45:54 -0000 1.2 *************** *** 132,136 **** classification = Integer.parseInt(st.nextToken()); // Object_kode ! if (floor == chosenFloor) { if (curId < prevId && !verts.isEmpty()) { // Started on new surface --- 132,136 ---- classification = Integer.parseInt(st.nextToken()); // Object_kode ! if (floor == chosenFloor || chosenFloor == -1) { if (curId < prevId && !verts.isEmpty()) { // Started on new surface *************** *** 205,209 **** return s; } else { ! log.info("There were " + verts.size() + " vertexes but edges were null"); return s; } --- 205,209 ---- return s; } else { ! log.warn("There were " + verts.size() + " vertexes which resulted in a empty edge list"); return s; } Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** FileImportActionListener.java 30 Jan 2007 19:50:45 -0000 1.5 --- FileImportActionListener.java 31 Jan 2007 20:45:54 -0000 1.6 *************** *** 6,14 **** --- 6,23 ---- //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.gui.actions; + import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import java.beans.PropertyChangeEvent; + import java.beans.PropertyChangeListener; + import java.io.BufferedReader; import java.io.File; + import java.io.FileInputStream; + import java.io.InputStreamReader; + import javax.swing.JComboBox; import javax.swing.JFileChooser; + import javax.swing.JLabel; + import javax.swing.JPanel; import net.sourceforge.bprocessor.model.Project; *************** *** 35,38 **** --- 44,49 ---- public void actionPerformed(ActionEvent e) { JFileChooser loadChooser = new JFileChooser(Project.getInstance().getDefaultPath()); + CVSinfo info = new CVSinfo(loadChooser); + loadChooser.setAccessory(info); int lstate = loadChooser.showOpenDialog(null); File lfile = loadChooser.getSelectedFile(); *************** *** 41,45 **** try { CsvReader read = new CsvReader(lfile, Project.getInstance().world()); ! read.importFloor(10); Project.getInstance().changed(Project.getInstance()); } catch (Exception ex) { --- 52,56 ---- try { CsvReader read = new CsvReader(lfile, Project.getInstance().world()); ! read.importFloor(info.getSelectedFloor()); Project.getInstance().changed(Project.getInstance()); } catch (Exception ex) { *************** *** 49,52 **** } ! } --- 60,184 ---- } ! /** ! * A info panel next to the loader telling some of the CSV file information ! * for the users pleasure ! */ ! public class CVSinfo extends JPanel ! implements PropertyChangeListener, ActionListener { ! private File file = null; ! ! private JComboBox floor; ! ! private JLabel linesLabel; ! ! private int selectedFloor; ! ! /** ! * The constructor ! * @param fc the filechooser to add the additional view to ! */ ! public CVSinfo(JFileChooser fc) { ! setPreferredSize(new Dimension(100, 50)); ! floor = new JComboBox(); ! floor.addItem("All"); ! floor.setSelectedIndex(0); ! floor.addActionListener(this); ! this.add(floor); ! linesLabel = new JLabel("Lines:"); ! this.add(linesLabel); ! fc.addPropertyChangeListener(this); ! } ! ! /** ! * @return The chosen floor -1 if all are selected ! */ ! public int getSelectedFloor() { ! return selectedFloor; ! } ! ! /** ! * {@inheritDoc} ! */ ! public void propertyChange(PropertyChangeEvent e) { ! boolean update = false; ! String prop = e.getPropertyName(); ! ! //If the directory changed, don't show an image. ! if (JFileChooser.DIRECTORY_CHANGED_PROPERTY.equals(prop)) { ! file = null; ! update = true; ! ! //If a file became selected, find out which one. ! } else if (JFileChooser.SELECTED_FILE_CHANGED_PROPERTY.equals(prop)) { ! file = (File) e.getNewValue(); ! update = true; ! } ! ! if (update && file != null && file.exists() && file.canRead()) { ! try { ! BufferedReader bf; ! FileInputStream fis = new FileInputStream(file); ! InputStreamReader isr = new InputStreamReader(fis); ! bf = new BufferedReader(isr); ! int lines = 0; ! long floors = 0; ! while (bf.ready()) { ! String line = bf.readLine(); ! if (line.charAt(0) == '#') { ! //skip comments ! continue; ! } else { ! lines++; ! //read info from file ! String[] tokens = line.split(";"); ! if (tokens.length < 15) { ! throw new Exception("Wrong file format"); ! } ! long f = Long.parseLong(tokens[2]); //read out the floor ! floors = floors | (long)Math.pow(2, f); ! } ! } ! ! resetView(); ! ! for (int i = 0; i < 64; i++) { ! long val = (floors >> i) & 1; ! if (val == 1) { ! floor.addItem("" + i); ! } ! } ! linesLabel.setText("Lines: " + lines); ! } catch (Exception exc) { ! log.error(exc); ! } ! if (isShowing()) { ! repaint(); ! } ! } else { ! resetView(); ! } ! } ! ! /** ! * Reset all info in view ! */ ! private void resetView() { ! linesLabel.setText("Lines:"); ! floor.removeAllItems(); ! floor.addItem("All"); ! } ! ! /** ! * {@inheritDoc} ! */ ! public void actionPerformed(ActionEvent e) { ! if (isShowing()) { ! if (floor.getSelectedIndex() > 0) { ! selectedFloor = Integer.parseInt((String)floor.getSelectedItem()); ! } else { ! selectedFloor = -1; ! } ! } ! } ! } } |
|
From: Michael L. <he...@us...> - 2007-01-31 15:22:33
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18190/src/net/sourceforge/bprocessor/gui/actions Modified Files: CreateConstructionSpaceActionListener.java CreateFunctionalSpaceActionListener.java Log Message: Fixes Index: CreateFunctionalSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateFunctionalSpaceActionListener.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CreateFunctionalSpaceActionListener.java 4 Oct 2006 14:43:24 -0000 1.11 --- CreateFunctionalSpaceActionListener.java 31 Jan 2007 15:22:19 -0000 1.12 *************** *** 7,11 **** package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 7,11 ---- package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; *************** *** 13,17 **** import java.awt.event.ActionEvent; import java.awt.event.ActionListener; - import javax.swing.JOptionPane; import org.apache.log4j.Logger; --- 13,16 ---- *************** *** 35,55 **** */ public void actionPerformed(ActionEvent e) { ! String result = JOptionPane.showInputDialog(GUI.getInstance(), ! "Name", ! "Create Functional Space", ! JOptionPane.QUESTION_MESSAGE); ! if (log.isDebugEnabled()) { ! log.debug("Input: " + result); ! } ! ! if (result != null && !result.trim().equals("")) { ! try { ! Space fs = Project.getInstance().getActiveSpace().createFunctionalSpace(result.trim()); ! Project.getInstance().getActiveSpace().add(fs); ! Project.getInstance().changed(Project.getInstance().getActiveSpace()); ! Project.getInstance().checkpoint(); ! } catch (Exception ex) { ! ex.printStackTrace(); ! } } } --- 34,46 ---- */ public void actionPerformed(ActionEvent e) { ! try { ! Space owner = Project.getInstance().world(); ! Space space; ! space = owner.createFunctionalSpace("Functional"); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! } catch (Exception error) { ! error.printStackTrace(); } } Index: CreateConstructionSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/CreateConstructionSpaceActionListener.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CreateConstructionSpaceActionListener.java 16 Nov 2006 23:20:04 -0000 1.12 --- CreateConstructionSpaceActionListener.java 31 Jan 2007 15:22:19 -0000 1.13 *************** *** 7,11 **** package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 7,11 ---- package net.sourceforge.bprocessor.gui.actions; ! import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; *************** *** 14,19 **** import java.awt.event.ActionListener; - import javax.swing.JOptionPane; - import org.apache.log4j.Logger; --- 14,17 ---- *************** *** 37,64 **** */ public void actionPerformed(ActionEvent e) { ! String result = JOptionPane.showInputDialog(GUI.getInstance(), ! "Name", ! "Create Construction Space", ! JOptionPane.QUESTION_MESSAGE); ! ! ! ! if (log.isDebugEnabled()) { ! log.debug("Input: " + result); ! } ! ! if (result != null && !result.trim().equals("")) { ! try { ! Space cs = Project.getInstance().getActiveSpace().createConstructionSpace(result.trim()); ! Project.getInstance().getActiveSpace().add(cs); ! Project.getInstance().changed(Project.getInstance().getActiveSpace()); ! Project.getInstance().checkpoint(); ! } catch (Exception ex) { ! ex.printStackTrace(); ! } } - - } - } --- 35,48 ---- */ public void actionPerformed(ActionEvent e) { ! try { ! Space owner = Project.getInstance().world(); ! Space space; ! space = owner.createConstructionSpace("Construction"); ! owner.add(space); ! AttributeView.instance().display(space); ! Project.getInstance().checkpoint(); ! } catch (Exception error) { ! error.printStackTrace(); } } } |
|
From: Michael L. <he...@us...> - 2007-01-31 15:22:33
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18190/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: Fixes Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** PopupMenu.java 29 Jan 2007 11:57:09 -0000 1.23 --- PopupMenu.java 31 Jan 2007 15:22:19 -0000 1.24 *************** *** 14,18 **** import java.util.LinkedList; import java.util.Map; - import java.util.Set; import javax.swing.AbstractAction; --- 14,17 ---- *************** *** 207,238 **** }; pm.add(instantiate); - AbstractAction makeunion = new CollectionMenuAction(s, "Make Union") { - public void actionPerformed(ActionEvent arg0) { - Set internal = new HashSet(); - internal.addAll(col); - - Set envelope = new HashSet(); - { - Iterator iter = internal.iterator(); - while (iter.hasNext()) { - Space current = (Space) iter.next(); - Iterator sit = current.getEnvelope().iterator(); - while (sit.hasNext()) { - Surface surface = (Surface) sit.next(); - if (!internal.contains(surface.getBackDomain())) { - envelope.add(surface); - } else if (!internal.contains(surface.getFrontDomain())) { - envelope.add(surface); - } - } - } - } - Selection.primary().clear(); - Selection.primary().addAll(envelope); - Project.getInstance().checkpoint(); - } - }; - pm.add(makeunion); - if (s.size() == 1) { // Some options do only apply to one space --- 206,209 ---- *************** *** 386,400 **** }; menu.add(allConnected); AbstractAction makeUnion = new EntitiesMenuAction(entities, "Make Union") { public void actionPerformed(ActionEvent e) { Collection<Surface> surfaces = new HashSet<Surface>(); Collection<Geometric> geometrics = (Collection<Geometric>) entities; for (Geometric geometric : geometrics) { ! if (geometric instanceof Surface) { ! surfaces.add((Surface) geometric); } } ! Collection<Space> spaces = new HashSet<Space>(); ! Space owner = null; for (Surface surface : surfaces) { owner = surface.getOwner(); --- 357,379 ---- }; menu.add(allConnected); + AbstractAction makeUnion = new EntitiesMenuAction(entities, "Make Union") { public void actionPerformed(ActionEvent e) { Collection<Surface> surfaces = new HashSet<Surface>(); + Collection<Space> interior = new HashSet<Space>(); + Collection<Space> spaces = new HashSet<Space>(); + Space owner = null; + Collection<Geometric> geometrics = (Collection<Geometric>) entities; for (Geometric geometric : geometrics) { ! if (geometric instanceof Space) { ! interior.add((Space) geometric); } } ! ! for (Space space : interior) { ! surfaces.addAll(space.getEnvelope()); ! } ! for (Surface surface : surfaces) { owner = surface.getOwner(); *************** *** 407,417 **** } } ! Collection<Space> interior = new HashSet<Space>(); ! for (Space space : spaces) { ! interior.add(space); ! } ! for (Space space : interior) { ! surfaces.addAll(space.getEnvelope()); ! } Collection<Surface> inside = new LinkedList<Surface>(); Collection<Surface> border = new LinkedList<Surface>(); --- 386,390 ---- } } ! Collection<Surface> inside = new LinkedList<Surface>(); Collection<Surface> border = new LinkedList<Surface>(); *************** *** 489,492 **** --- 462,466 ---- Selection.primary().clear(); Selection.primary().add(union); + Project.getInstance().checkpoint(); } }; |
|
From: Michael L. <he...@us...> - 2007-01-31 15:22:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18160/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Fixes Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.119 retrieving revision 1.120 diff -C2 -d -r1.119 -r1.120 *** Space.java 31 Jan 2007 10:51:08 -0000 1.119 --- Space.java 31 Jan 2007 15:22:10 -0000 1.120 *************** *** 1148,1152 **** public Classification getClassification() { if (this.isUnion()) { ! return getOwner().getClassification(); } else { return classification; --- 1148,1156 ---- public Classification getClassification() { if (this.isUnion()) { ! if (getOwner() == null) { ! return null; ! } else { ! return getOwner().getClassification(); ! } } else { return classification; |
|
From: Michael L. <he...@us...> - 2007-01-31 15:22:27
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18019/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java CreateSpaceActionListener.java Log Message: Fixes Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** SpaceTool.java 29 Jan 2007 11:56:59 -0000 1.68 --- SpaceTool.java 31 Jan 2007 15:22:06 -0000 1.69 *************** *** 275,278 **** --- 275,280 ---- } + + JMenuItem voidItem = new JMenuItem("Void"); Space sp = Project.getInstance().getActiveSpace(); *************** *** 313,316 **** --- 315,329 ---- false); createConstItem.addActionListener(constListener); + JMenuItem selectSpaceItem = new JMenuItem("Select " + category); + selectSpaceItem.addActionListener(new SpaceMenuAction(space, "Select") { + public void actionPerformed(ActionEvent arg0) { + if (space != null) { + Selection.primary().clear(); + glv.getView().makeTarget(null); + Selection.primary().set(space); + Project.getInstance().changed(Project.getInstance()); + } + } + }); JMenuItem editSpaceItem = new JMenuItem("Edit " + category); *************** *** 383,386 **** --- 396,400 ---- constMenu.addSeparator(); constMenu.add(createConstItem); + menu.add(selectSpaceItem); menu.add(funcMenu); menu.add(constMenu); Index: CreateSpaceActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/CreateSpaceActionListener.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** CreateSpaceActionListener.java 6 Jan 2007 21:11:08 -0000 1.15 --- CreateSpaceActionListener.java 31 Jan 2007 15:22:06 -0000 1.16 *************** *** 7,20 **** package net.sourceforge.bprocessor.gl.tool; ! import net.sourceforge.bprocessor.gui.GUI; import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.gui.attrview.ClassificationTextAttribute; - import javax.swing.Box; import javax.swing.JButton; import javax.swing.JDialog; - import java.awt.Component; - import java.awt.Container; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; --- 7,17 ---- package net.sourceforge.bprocessor.gl.tool; ! import net.sourceforge.bprocessor.gui.attrview.AttributeView; import net.sourceforge.bprocessor.gui.attrview.ClassificationTextAttribute; import javax.swing.JButton; import javax.swing.JDialog; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; *************** *** 44,50 **** private boolean functional; - /** The current category */ - private String category; - /** The classification attribute */ private ClassificationTextAttribute cta; --- 41,44 ---- *************** *** 92,147 **** } ! /** ! * Action performed ! * @param e The action event ! */ ! public void oldActionPerformed(ActionEvent e) { ! String result; ! category = null; ! if (Project.getInstance().getActiveSpace().getLevel() == Space.SPACE_LEVEL) { ! category = "Space"; ! } ! if (Project.getInstance().getActiveSpace().getLevel() == Space.ELEMENT_LEVEL) { ! category = "Element"; ! } ! if (Project.getInstance().getActiveSpace().getLevel() == Space.PART_LEVEL) { ! category = "Part"; ! } ! ! ! result = ""; ! if (functional) { ! dialog = new JDialog(GUI.getInstance(), "Create Functional Space", true); ! /*cta = new ClassificationTextAttribute( ! new Attribute("Classification", Project.getInstance().getFunctionalClas(), null, 1)); ! } else { ! dialog = new JDialog(GUI.getInstance(), "Create Construction Space", true); ! cta = new ClassificationTextAttribute( ! new Attribute("Classification", Project.getInstance().getConstructionClas(), null, 1)); ! */ ! } ! Container dialogContent = dialog.getContentPane(); ! cta.addMouseListener(this); ! Box content = Box.createVerticalBox(); ! Box fr = Box.createHorizontalBox(); ! Box sr = Box.createHorizontalBox(); ! fr.add(cta); ! JButton ok = new JButton("Ok"); ! ok.addActionListener(new MyActionListener()); ! JButton cancel = new JButton("Cancel"); ! cancel.addActionListener(new MyActionListener()); ! sr.add(ok); ! sr.add(cancel); ! content.add(fr); ! content.add(sr); ! dialogContent.add(content); ! dialog.setSize(200, 80); ! dialog.setLocationRelativeTo((Component)e.getSource()); ! dialog.show(); ! ! if (log.isDebugEnabled()) { ! log.debug("Input: " + result); ! } ! } /** --- 86,90 ---- } ! /** |
|
From: Michael L. <he...@us...> - 2007-01-31 15:22:26
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18190/src/net/sourceforge/bprocessor/gui/attrview Modified Files: ClassificationTextAttribute.java Log Message: Fixes Index: ClassificationTextAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/ClassificationTextAttribute.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClassificationTextAttribute.java 24 Jan 2007 10:25:14 -0000 1.5 --- ClassificationTextAttribute.java 31 Jan 2007 15:22:19 -0000 1.6 *************** *** 75,83 **** super(BoxLayout.X_AXIS); if (attribute.getName().equalsIgnoreCase("Classification")) { ! label = new JLabel("Reference: "); } else { label = new JLabel("Type: "); } ! this.attribute = attribute; this.listeners = new LinkedList(); --- 75,83 ---- super(BoxLayout.X_AXIS); if (attribute.getName().equalsIgnoreCase("Classification")) { ! label = new JLabel("Classification: "); } else { label = new JLabel("Type: "); } ! label.setFont(AttributeView.FONT_BOLD); this.attribute = attribute; this.listeners = new LinkedList(); |
|
From: Nikolaj B. <nbr...@us...> - 2007-01-31 12:48:47
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv20924/src/net/sourceforge/bprocessor/model Modified Files: Classification.java EnergyCalc.java Log Message: Fixed the old energy calc method to use id's and not names to resovle a conversion problem between systems Index: EnergyCalc.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/EnergyCalc.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** EnergyCalc.java 29 Jan 2007 18:08:45 -0000 1.5 --- EnergyCalc.java 31 Jan 2007 12:48:23 -0000 1.6 *************** *** 25,47 **** Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification() != null) { ! if (current.getFrontDomain().getClassification().getName().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } ! if (current.getFrontDomain().getClassification().getName(). ! equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } } if (current.getBackDomain().getClassification() != null) { ! if (current.getBackDomain().getClassification().getName().equalsIgnoreCase("Exteriør")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } ! if (current.getBackDomain().getClassification().getName() ! .equalsIgnoreCase("Uopvarmet rum")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } } } ! return totalloss; } --- 25,48 ---- Surface current = (Surface) it.next(); if (current.getFrontDomain().getClassification() != null) { ! if (current.getFrontDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } ! if (current.getFrontDomain().getClassification().getId(). ! equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getBackDomain(), current); } } if (current.getBackDomain().getClassification() != null) { ! if (current.getBackDomain().getClassification().getId().equalsIgnoreCase("-80")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } ! if (current.getBackDomain().getClassification().getId() ! .equalsIgnoreCase("-100")) { totalloss = totalloss + calcloss(current.getFrontDomain(), current); } } } ! int i = (int) (totalloss * 1000); ! totalloss = ((double) i) / 1000; return totalloss; } *************** *** 62,80 **** if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! if (classification.getClassification().getName().equalsIgnoreCase("Terrandæk")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Tagkonstruktion") || ! classification.getClassification().getName().equalsIgnoreCase("Tagsystem")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Loftkonstruktion")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Vægsystem") || ! classification.getClassification().getName().equalsIgnoreCase("Vægkonstruktion")) { loss = 0.25 * current.getArea(); return loss; --- 63,81 ---- if (elemcheck.getName().equalsIgnoreCase("Void") && first) { ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-210.01")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.01") || ! classification.getClassification().getFullId(null).equalsIgnoreCase("-215")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-215.04")) { loss = 0.15 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205") || ! classification.getClassification().getFullId(null).equalsIgnoreCase("-205.01")) { loss = 0.25 * current.getArea(); return loss; *************** *** 91,100 **** if (classification.getClassification(). ! getName().equalsIgnoreCase("Vinduesparti")) { loss = 0.8 * current.getArea(); return loss; } ! if (classification.getClassification().getName().equalsIgnoreCase("Dørparti")) { loss = 1.5 * current.getArea(); return loss; --- 92,101 ---- if (classification.getClassification(). ! getFullId(null).equalsIgnoreCase("-205.02")) { loss = 0.8 * current.getArea(); return loss; } ! if (classification.getClassification().getFullId(null).equalsIgnoreCase("-205.03")) { loss = 1.5 * current.getArea(); return loss; *************** *** 155,163 **** if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName().equalsIgnoreCase("Beboelse og ophold")) { relevant = true; } --- 156,165 ---- if (spa.getClassification() != null) { if (spa.getClassification().getParent() != null && ! spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { relevant = true; } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { relevant = true; } *************** *** 182,191 **** spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName() ! .equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } --- 184,193 ---- spa = current.getFrontDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } *************** *** 195,204 **** spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getName().equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getName() ! .equalsIgnoreCase("Beboelse og ophold")) { tha = tha + current.getArea(); } --- 197,206 ---- spa = current.getBackDomain(); if (spa.getClassification() != null) { ! if (spa.getClassification().getFullId(null).equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } if (spa.getClassification().getParent() != null && ! spa.getClassification().getParent().getFullId(null) ! .equalsIgnoreCase("-10")) { tha = tha + current.getArea(); } Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Classification.java 6 Jan 2007 21:06:59 -0000 1.6 --- Classification.java 31 Jan 2007 12:48:23 -0000 1.7 *************** *** 157,161 **** Space current = cur; String fullId = id.toString(); ! if (current.getTypeClassification() != null) { if (!("" + fullId.charAt(0)).equalsIgnoreCase("-")) { if (!current.getTypeClassification().getId().equalsIgnoreCase("0")) { --- 157,161 ---- Space current = cur; String fullId = id.toString(); ! if (current != null && current.getTypeClassification() != null) { if (!("" + fullId.charAt(0)).equalsIgnoreCase("-")) { if (!current.getTypeClassification().getId().equalsIgnoreCase("0")) { *************** *** 170,174 **** Classification par = parent; if (par != null) { ! if (cur.getOwner().getLevel() != 2) { current = cur.getOwner(); if (current.getClassification() == par) { --- 170,174 ---- Classification par = parent; if (par != null) { ! if (cur != null && cur.getOwner().getLevel() != 2) { current = cur.getOwner(); if (current.getClassification() == par) { *************** *** 188,192 **** while (!par.getName().equalsIgnoreCase("Classification")) { fullId = par.getId() + "." + fullId; ! par = par.getParent(); } } --- 188,192 ---- while (!par.getName().equalsIgnoreCase("Classification")) { fullId = par.getId() + "." + fullId; ! par = par.getParent(); } } |
|
From: Nordholt <nor...@us...> - 2007-01-31 11:07:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11854/src/net/sourceforge/bprocessor/gl Modified Files: GLView.java Log Message: Removed changed call on the current camera when changing the zoom factor Index: GLView.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/GLView.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** GLView.java 29 Jan 2007 11:18:48 -0000 1.52 --- GLView.java 31 Jan 2007 11:07:09 -0000 1.53 *************** *** 345,352 **** String what = (String)choices.getSelectedItem(); if (what.matches("1:[\\d]+")) { - choices.setSelectedItem(what); int fac = Integer.parseInt(what.substring(2)); Project.getInstance().getCurrentCamera().setFactor(fac); - Project.getInstance().changed(Project.getInstance().getCurrentCamera()); } else { GUI.getInstance().alert("Wrong scale format, have to be 1:[integer]"); --- 345,350 ---- |
|
From: Nordholt <nor...@us...> - 2007-01-31 10:52:21
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5027/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: fixing an out of bounds error Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** GenericTreeView.java 29 Jan 2007 15:47:20 -0000 1.69 --- GenericTreeView.java 31 Jan 2007 10:52:20 -0000 1.70 *************** *** 604,608 **** } else { add(new ModellorNode(s.getModellor())); ! model.nodesWereInserted(this, new int[]{5}); } } else { --- 604,608 ---- } else { add(new ModellorNode(s.getModellor())); ! model.nodesWereInserted(this, new int[]{placement}); } } else { |
|
From: Michael L. <he...@us...> - 2007-01-31 10:51:12
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4485/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Space.java Log Message: Fixed problems with hole-analysis accross space boundary Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** Surface.java 31 Jan 2007 09:18:30 -0000 1.133 --- Surface.java 31 Jan 2007 10:51:08 -0000 1.134 *************** *** 799,802 **** --- 799,803 ---- // spaces here. boolean flip = false; + boolean inside = false; if (exterior != null) { *************** *** 807,810 **** --- 808,812 ---- flip = true; } + inside = exterior.getOwner() == getOwner(); } *************** *** 812,816 **** if (delta < 0) { facemap[i].setBackDomain(getBackDomain()); ! if (exterior != null) { if (flip) { facemap[i].setFrontDomain(exterior.getFrontDomain()); --- 814,818 ---- if (delta < 0) { facemap[i].setBackDomain(getBackDomain()); ! if (exterior != null && inside) { if (flip) { facemap[i].setFrontDomain(exterior.getFrontDomain()); *************** *** 821,825 **** } else { facemap[i].setFrontDomain(getFrontDomain()); ! if (exterior != null) { if (flip) { facemap[i].setBackDomain(exterior.getBackDomain()); --- 823,827 ---- } else { facemap[i].setFrontDomain(getFrontDomain()); ! if (exterior != null && inside) { if (flip) { facemap[i].setBackDomain(exterior.getBackDomain()); Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.118 retrieving revision 1.119 diff -C2 -d -r1.118 -r1.119 *** Space.java 30 Jan 2007 19:53:33 -0000 1.118 --- Space.java 31 Jan 2007 10:51:08 -0000 1.119 *************** *** 451,454 **** --- 451,461 ---- public void clear() { if (container) { + Collection<Surface> surfs = getSurfaces(); + for (Surface surface : surfs) { + Surface exterior = surface.getExterior(); + if (exterior != null) { + exterior.removeHole(surface); + } + } vertices.clear(); nextVertexId = 1; |
|
From: Michael L. <he...@us...> - 2007-01-31 09:18:34
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28603/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Elemenent-surfaces attach to the space-surfaces Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.179 retrieving revision 1.180 diff -C2 -d -r1.179 -r1.180 *** View.java 30 Jan 2007 19:40:13 -0000 1.179 --- View.java 31 Jan 2007 09:18:27 -0000 1.180 *************** *** 571,575 **** edges.add(e3); Surface s = new Surface(edges); ! drawSurface(s); } } --- 571,575 ---- edges.add(e3); Surface s = new Surface(edges); ! drawSurface(s, false); } } *************** *** 1218,1222 **** gl.glPolygonStipple(highlight, 0); Surface s = (Surface) o; ! drawSurface(s); gl.glDisable(GL.GL_POLYGON_STIPPLE); } else if (o instanceof ClippingPlane) { --- 1218,1222 ---- gl.glPolygonStipple(highlight, 0); Surface s = (Surface) o; ! drawSurface(s, false); gl.glDisable(GL.GL_POLYGON_STIPPLE); } else if (o instanceof ClippingPlane) { *************** *** 1655,1659 **** if (side == BOTH) { if (visible) { ! drawSurface(s); } } else { --- 1655,1659 ---- if (side == BOTH) { if (visible) { ! drawSurface(s, false); } } else { *************** *** 1680,1684 **** } } ! drawSurface(s); if (!visible) { gl.glDisable(GL.GL_POLYGON_STIPPLE); --- 1680,1684 ---- } } ! drawSurface(s, false); if (!visible) { gl.glDisable(GL.GL_POLYGON_STIPPLE); *************** *** 1692,1697 **** * Draw a surface * @param s The surface to draw */ ! private void drawSurface(Surface s) { GLUtessellator tess = glu.gluNewTess(); GLUtessellatorCallback cb = new Callback(); --- 1692,1698 ---- * Draw a surface * @param s The surface to draw + * @param hit The hit-detection flag */ ! private void drawSurface(Surface s, boolean hit) { GLUtessellator tess = glu.gluNewTess(); GLUtessellatorCallback cb = new Callback(); *************** *** 1724,1728 **** while (innerIt.hasNext()) { Surface surface = (Surface)innerIt.next(); ! drawContour(surface, tess); } } --- 1725,1735 ---- while (innerIt.hasNext()) { Surface surface = (Surface)innerIt.next(); ! if (hit) { ! if (surface.getOwner() == s.getOwner()) { ! drawContour(surface, tess); ! } ! } else { ! drawContour(surface, tess); ! } } } *************** *** 2087,2091 **** transformTo(owner); } ! drawSurface(s); popName(gl); } --- 2094,2098 ---- transformTo(owner); } ! drawSurface(s, true); popName(gl); } *************** *** 2169,2173 **** Surface surface = system.surface(5); pushName(gl, surface); ! drawSurface(surface); popName(gl); } else { --- 2176,2180 ---- Surface surface = system.surface(5); pushName(gl, surface); ! drawSurface(surface, true); popName(gl); } else { |
|
From: Michael L. <he...@us...> - 2007-01-31 09:18:34
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28611/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometry.java Log Message: Elemenent-surfaces attach to the space-surfaces Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** Surface.java 30 Jan 2007 14:10:03 -0000 1.132 --- Surface.java 31 Jan 2007 09:18:30 -0000 1.133 *************** *** 634,637 **** --- 634,639 ---- // spaces here. boolean flip = false; + boolean inside = false; + if (exterior != null) { *************** *** 642,645 **** --- 644,648 ---- flip = true; } + inside = exterior.getOwner() == getOwner(); } *************** *** 647,651 **** if (delta < 0) { facemap[i].setBackDomain(getBackDomain()); ! if (exterior != null) { if (flip) { facemap[i].setFrontDomain(exterior.getFrontDomain()); --- 650,654 ---- if (delta < 0) { facemap[i].setBackDomain(getBackDomain()); ! if (exterior != null && inside) { if (flip) { facemap[i].setFrontDomain(exterior.getFrontDomain()); *************** *** 656,660 **** } else { facemap[i].setFrontDomain(getFrontDomain()); ! if (exterior != null) { if (flip) { facemap[i].setBackDomain(exterior.getBackDomain()); --- 659,663 ---- } else { facemap[i].setFrontDomain(getFrontDomain()); ! if (exterior != null && inside) { if (flip) { facemap[i].setBackDomain(exterior.getBackDomain()); Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** Geometry.java 30 Jan 2007 14:10:03 -0000 1.43 --- Geometry.java 31 Jan 2007 09:18:30 -0000 1.44 *************** *** 280,290 **** Collection<Surface> envelope = surface.getOwner().getEnvelope(); candidates.addAll(surfaces); ! //candidates.addAll(envelope); for (Surface current : candidates) { if (current != surface) { ! if (current.surrounds(surface, false)) { exteriors.add(current); ! } else if (surface.surrounds(current, false)) { interiors.add(current); } --- 280,291 ---- Collection<Surface> envelope = surface.getOwner().getEnvelope(); candidates.addAll(surfaces); ! candidates.addAll(envelope); for (Surface current : candidates) { if (current != surface) { ! boolean outside = current.getOwner() != surface.getOwner(); ! if (current.surrounds(surface, outside)) { exteriors.add(current); ! } else if (surface.surrounds(current, outside)) { interiors.add(current); } |
|
From: rimestad <rim...@us...> - 2007-01-30 19:57:29
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6126/src/net/sourceforge/bprocessor/gui Modified Files: GUI.java Log Message: To avoid concurrent modifications while working on import Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** GUI.java 20 Jan 2007 21:24:49 -0000 1.58 --- GUI.java 30 Jan 2007 19:57:26 -0000 1.59 *************** *** 110,115 **** --- 110,122 ---- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); instance = this; + + /** + * FIXME there have to be some kind of thread lock on + * project to avoid concurrent modification before enabling spacecheck + */ + /* Thread sc = new SpaceChecker(); sc.start(); + */ } |
|
From: rimestad <rim...@us...> - 2007-01-30 19:53:35
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4527/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Some fixes to the insert(Edge list) method to make it return the resulting edge list after insertion Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** Space.java 30 Jan 2007 14:10:03 -0000 1.117 --- Space.java 30 Jan 2007 19:53:33 -0000 1.118 *************** *** 690,705 **** * Analysis is performed that ensure no duplicate * vertices and edges. * @param edges List of edges */ ! public void insert(List<Edge> edges) { for (Edge edge : edges) { ! insert(edge); } } /** ! * Insert a edge ! * @param edge The edge ! * @return The edge */ public Edge insert(Edge edge) { --- 690,715 ---- * Analysis is performed that ensure no duplicate * vertices and edges. + * The given list will be altered to be unique edges + * in the space * @param edges List of edges + * @return The resulting collection of edges */ ! public List<Edge> insert(List<Edge> edges) { ! List<Edge> tmp = new ArrayList<Edge>(edges.size()); for (Edge edge : edges) { ! Edge tempedge = insert(edge); ! if (tempedge != null) { ! tmp.add(tempedge); ! } else { ! log.info("Edge were very short " + edge); ! } } + return tmp; } /** ! * Insert a edge into this space ! * @param edge The edge to insert into the space ! * @return The edge if to != from otherwise null */ public Edge insert(Edge edge) { |
|
From: rimestad <rim...@us...> - 2007-01-30 19:52:05
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3776/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: WHO IS TALKING ???? Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** NetFacadeModellor.java 30 Jan 2007 16:18:57 -0000 1.11 --- NetFacadeModellor.java 30 Jan 2007 19:51:53 -0000 1.12 *************** *** 387,391 **** Map offmap1 = new HashMap<Edge, Double>(); Map offmap2 = new HashMap<Edge, Double>(); ! for (Object o: hole.getEdges()) { Edge e = (Edge)o; offmap1.put(e, 0.02); --- 387,391 ---- Map offmap1 = new HashMap<Edge, Double>(); Map offmap2 = new HashMap<Edge, Double>(); ! for (Object o : hole.getEdges()) { Edge e = (Edge)o; offmap1.put(e, 0.02); *************** *** 553,557 **** deltaCorrection *= -1; } ! Vertex n = s.normal().copy(delta*deltaCorrection); s.move(n.getX(), n.getY(), n.getZ()); } --- 553,557 ---- deltaCorrection *= -1; } ! Vertex n = s.normal().copy(delta * deltaCorrection); s.move(n.getX(), n.getY(), n.getZ()); } |
|
From: rimestad <rim...@us...> - 2007-01-30 19:51:39
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3371/src/net/sourceforge/bprocessor/gui/actions Modified Files: FileImportActionListener.java Added Files: CsvReader.java Log Message: Put the Landmålergården import in its own class CVSreader (that is removed it from Project) Fixed it in many ways, so that it now reads surfaces and spaces but there are still some major flaws --- NEW FILE: CsvReader.java --- //--------------------------------------------------------------------------------- // $Id: CsvReader.java,v 1.1 2007/01/30 19:50:45 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.gui.actions; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; import org.apache.log4j.Logger; import net.sourceforge.bprocessor.model.Classification; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; /** * A reader of the dataformat by Landmålergården * 1. Create a reader with a file * 2. Call import * 3. fetch the wanted data from the Csv Reader via getters */ public class CsvReader { private static Logger log = Logger.getLogger(CsvReader.class); private File file = null; private Space where = null; /** * Construct a CSV reader * @param lfile the file object to read from * @param where The space to load into * @throws FileNotFoundException thrown if the file does not exist */ public CsvReader(File lfile, Space where) throws FileNotFoundException { if (lfile.exists()) { file = lfile; long lines = lfile.length() / 45; this.where = where; } else { throw new FileNotFoundException(); } } /** * Make a list of edges out of a list of vertexes * @param verts the vertex list (have to be greater than 2) * @return The list of edges */ public List<Edge> makeEdgesFromVertexes(List<Vertex> verts) { if (verts.size() > 2) { List<Edge> res = new ArrayList<Edge>(verts.size() + 1); Vertex first = null; Vertex previous = null; Vertex last = null; for (Vertex v : verts) { if (first == null) { first = v; previous = first; } else { res.add(new Edge(previous, v)); previous = v; } last = previous; } res.add(new Edge(last, first)); return res; } else { return null; } } /** * Read in a floor from the file * @param chosenFloor The chosen floor * @throws Exception If the file were lost or unable to be read */ public void importFloor(int chosenFloor) throws Exception { BufferedReader bf; FileInputStream fis = new FileInputStream(file); InputStreamReader isr = new InputStreamReader(fis); bf = new BufferedReader(isr); String current = ""; double x = 0; double y = 0; double z = 0; int curId = 0; int prevId = 0; int spaceid = 0; int surfaceId = -1; int floor = -1; int previousSpaceId = spaceid; int classification = 0; Space currentSpace = null; Surface outerSurface = null; List<Vertex> verts = new ArrayList<Vertex>(); int line = 0; while (bf.ready()) { current = bf.readLine(); line++; StringTokenizer st = new StringTokenizer(current, ";"); if (st.countTokens() == 16) { int curSurfaceId = Integer.parseInt(st.nextToken()); // surface(with holes)id if (surfaceId == -1) { surfaceId = curSurfaceId; } st.nextToken(); // hus floor = Integer.parseInt(st.nextToken()); // etage st.nextToken(); // lejl st.nextToken(); // rum st.nextToken(); // kode y = Double.parseDouble(st.nextToken()); // y x = Double.parseDouble(st.nextToken()); // x z = Double.parseDouble(st.nextToken()); // z st.nextToken(); // tal curId = Integer.parseInt(st.nextToken()); // utal st.nextToken(); // type st.nextToken(); // material st.nextToken(); // billed spaceid = Integer.parseInt(st.nextToken()); // Object_id classification = Integer.parseInt(st.nextToken()); // Object_kode if (floor == chosenFloor) { if (curId < prevId && !verts.isEmpty()) { // Started on new surface Surface s = addToRead(verts, currentSpace, outerSurface); if (outerSurface == null) { // this is the first surface in a face outerSurface = s; } if (surfaceId != curSurfaceId) { // this were the last surface in a face outerSurface = null; surfaceId = curSurfaceId; } } if (spaceid != previousSpaceId) { currentSpace = new Space("Space with id " + spaceid, Space.CONSTRUCTION, Space.SPACE_LEVEL, true); where.add(currentSpace); currentSpace.setClassification(new Classification("Type " + classification, -1)); previousSpaceId = spaceid; } // add the just read vertex to the list of verts for the next surface verts.add(new Vertex(x, y, z)); } else if (!verts.isEmpty()) { // The previous vertex were from a wanted floor Surface s = addToRead(verts, currentSpace, outerSurface); if (outerSurface == null) { // this is the first surface in a face outerSurface = s; } if (surfaceId != curSurfaceId) { // this were the last surface in a face outerSurface = null; surfaceId = curSurfaceId; } } // last part of while loop prevId = curId; } else { throw new IOException("Problems in format at line " + line); } } //check if there is something left to read if (!verts.isEmpty()) { addToRead(verts, currentSpace, outerSurface); } } /** * @param verts the vertex list * @param outer If the given vertex list is inside a * surface pass it here otherwise pass null * @param currentSpace the added space * @return the generated surface */ private Surface addToRead(List<Vertex> verts, Space currentSpace, Surface outer) { List<Edge> es = makeEdgesFromVertexes(verts); Surface s = null; if (es != null) { es = where.insert(es); if (es.size() > 2) { s = new Surface(es); if (outer != null) { outer.addHole(s); } s.setFrontDomain(currentSpace); where.add(s); } else { log.warn("There were a edge list with fewer that 3 edges"); } verts.clear(); return s; } else { log.info("There were " + verts.size() + " vertexes but edges were null"); return s; } } } Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** FileImportActionListener.java 8 Jan 2007 12:31:48 -0000 1.4 --- FileImportActionListener.java 30 Jan 2007 19:50:45 -0000 1.5 *************** *** 40,44 **** lstate == JFileChooser.APPROVE_OPTION) { try { ! Project.getInstance().importCSV(lfile); } catch (Exception ex) { log.error("Could not open file: " + lfile, ex); --- 40,46 ---- lstate == JFileChooser.APPROVE_OPTION) { try { ! CsvReader read = new CsvReader(lfile, Project.getInstance().world()); ! read.importFloor(10); ! Project.getInstance().changed(Project.getInstance()); } catch (Exception ex) { log.error("Could not open file: " + lfile, ex); |
|
From: rimestad <rim...@us...> - 2007-01-30 19:50:42
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3360/src/net/sourceforge/bprocessor/model Modified Files: Project.java Log Message: Put the Landmålergården import in its own class CVSreader (that is removed it from Project) Fixed it in many ways, so that it now reads surfaces and spaces but there are still some major flaws Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -d -r1.112 -r1.113 *** Project.java 29 Jan 2007 14:56:50 -0000 1.112 --- Project.java 30 Jan 2007 19:50:39 -0000 1.113 *************** *** 11,15 **** import java.io.File; import java.io.FileInputStream; - import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; --- 11,14 ---- *************** *** 1129,1187 **** return copyBuffer; } - - /** - * Load a file - * @param lfile The file to load - * @throws IOException - * @exception IOException Thrown if an exception occurs - */ - public void importCSV(File lfile) throws IOException { - System.out.println("import file"); - BufferedReader bf; - bf = new BufferedReader( - new InputStreamReader(new FileInputStream(lfile))); - String current = ""; - Vertex firstVer = null; - Vertex fromVer = null; - Vertex toVer; - double x = 0; - double y = 0; - double z = 0; - int curId = 0; - int lastId = 0; - int i = 0; - List<Edge> newEdges = new LinkedList<Edge>(); - current = bf.readLine(); - while (current != null) { - StringTokenizer st = new StringTokenizer(current, ";"); - st.nextToken(); - st.nextToken(); - y = Double.parseDouble(st.nextToken()); - x = Double.parseDouble(st.nextToken()); - z = Double.parseDouble(st.nextToken()); - st.nextToken(); - curId = Integer.parseInt(st.nextToken()); - - if (curId <= lastId) { - newEdges.add(new Edge(fromVer, firstVer)); - lastId = 0; - } - - if (curId == 1) { - firstVer = new Vertex(x, y, z); - fromVer = new Vertex(x, y, z); - lastId = curId; - } - - if (curId >= lastId && curId > 1) { - toVer = new Vertex(x, y, z); - newEdges.add(new Edge(fromVer, toVer)); - fromVer = toVer; - lastId = curId; - } - current = bf.readLine(); - } - Project.getInstance().world().insert(newEdges); - } - } --- 1128,1130 ---- |
|
From: rimestad <rim...@us...> - 2007-01-30 19:40:46
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31723/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Fixed coordinatesytstem size exlosion when decreasing window height Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.178 retrieving revision 1.179 diff -C2 -d -r1.178 -r1.179 *** View.java 30 Jan 2007 10:44:05 -0000 1.178 --- View.java 30 Jan 2007 19:40:13 -0000 1.179 *************** *** 1286,1290 **** Camera camera = Project.getInstance().getCurrentCamera(); Vertex v = new Vertex(camera.getCamera()); ! double scale = (camera.getFocalwidth() / 65) * (500 / height); double dist = v.minus(new Vertex(camera.getCenter())).length() * scale; if (active != null) { --- 1286,1290 ---- Camera camera = Project.getInstance().getCurrentCamera(); Vertex v = new Vertex(camera.getCamera()); ! double scale = (camera.getFocalwidth() / 65); double dist = v.minus(new Vertex(camera.getCenter())).length() * scale; if (active != null) { |
|
From: Nordholt <nor...@us...> - 2007-01-30 16:19:13
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15659/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: made the windows and doors more detailed. Made it possiple to change the front surface. Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** NetFacadeModellor.java 29 Jan 2007 18:12:12 -0000 1.10 --- NetFacadeModellor.java 30 Jan 2007 16:18:57 -0000 1.11 *************** *** 48,52 **** /** The framewidth of the facade */ ! private double frameWidth = 0.1; /** The depth of the facade */ --- 48,52 ---- /** The framewidth of the facade */ ! private double frameWidth = 0.045; /** The depth of the facade */ *************** *** 216,219 **** --- 216,222 ---- */ public void setNet(Space net) { + if (this.net != null) { + space.remove(net); + } this.net = (Net)net; space.add(net); *************** *** 326,332 **** if (frame == null) { frame = new Space("Frame", ! Space.CONSTRUCTION, ! Space.ELEMENT_LEVEL, ! true); space.add(frame); } --- 329,335 ---- if (frame == null) { frame = new Space("Frame", ! Space.CONSTRUCTION, ! Space.ELEMENT_LEVEL, ! true); space.add(frame); } *************** *** 352,370 **** Iterator fieldEdges = field.getEdges().iterator(); Map envF = field.getParameters().environment(); ! Double extraFrame = 0.0; ! if (envF.get("type") instanceof Selector) { ! Selector sel = (Selector)envF.get("type"); ! if (sel.getCurrentValue() == null) { ! log.info("current null...strange"); ! } else if (sel.getCurrentValue().equals("Empty")) { ! extraFrame = 0.0; ! } else if (sel.getCurrentValue().equals("Glass")) { ! extraFrame = 0.0; ! } else if (sel.getCurrentValue().equals("Window")) { ! extraFrame = 0.05; ! } else if (sel.getCurrentValue().equals("Door")) { ! extraFrame = 0.12; ! } ! } while (fieldEdges.hasNext()) { Edge e = (Edge)fieldEdges.next(); --- 355,359 ---- Iterator fieldEdges = field.getEdges().iterator(); Map envF = field.getParameters().environment(); ! while (fieldEdges.hasNext()) { Edge e = (Edge)fieldEdges.next(); *************** *** 372,378 **** double width = ((Double)envE.get("width")).doubleValue(); if (outline.contains(e)) { ! offsetMap.put(e, Double.valueOf(-(width + extraFrame))); } else { ! offsetMap.put(e, Double.valueOf(-((width / 2) + extraFrame))); } } --- 361,367 ---- double width = ((Double)envE.get("width")).doubleValue(); if (outline.contains(e)) { ! offsetMap.put(e, Double.valueOf(-(width))); } else { ! offsetMap.put(e, Double.valueOf(-((width / 2)))); } } *************** *** 382,385 **** --- 371,431 ---- Set sides2 = new HashSet(); Geometry.holeAnalysis(space.insert(extrudeIntoSpace(hole, depth, sides2))); + Double extraFrame = 0.0; + if (envF.get("type") instanceof Selector) { + Selector sel = (Selector)envF.get("type"); + if (sel.getCurrentValue().equals("Empty")) { + extraFrame = 0.0; + } else if (sel.getCurrentValue().equals("Glass")) { + extraFrame = 0.0; + } else if (sel.getCurrentValue().equals("Window")) { + extraFrame = 0.05; + } else if (sel.getCurrentValue().equals("Door")) { + extraFrame = 0.12; + } + } + if (extraFrame > 0) { + Map offmap1 = new HashMap<Edge, Double>(); + Map offmap2 = new HashMap<Edge, Double>(); + for (Object o: hole.getEdges()) { + Edge e = (Edge)o; + offmap1.put(e, 0.02); + offmap2.put(e, -(extraFrame - 0.02)); + } + Surface in = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap1)); + Surface out = new Surface(Edge.placeOffset(hole.getEdges(), hole, offmap2)); + hole.getExterior().removeHole(hole); + pushIntoSpace(hole, 0.05); + Geometry.holeAnalysis(hole); + in = space.insert(in); + out = space.insert(out); + + Space wf = new Space("Window Frame", + Space.CONSTRUCTION, + Space.ELEMENT_LEVEL, + true); + Space g = new Space("Glass", + Space.CONSTRUCTION, + Space.ELEMENT_LEVEL, + true); + g.setTransparent(true); + space.add(g); + space.add(wf); + assignSame(front, in, space, wf); + assignSame(front, out, space, g); + + Set sides = new HashSet(); + Surface inEx = extrudeIntoSpace(in, 0.05, sides); + assignSame(front, inEx, space, frame); + space.add(inEx); + assignSame(front, inEx, space, frame); + Geometry.holeAnalysis(inEx); + sides = new HashSet(); + Surface outEx = extrudeIntoSpace(out, 0.05, sides); + outEx = space.insert(outEx); + assignOpposite(front, outEx, space, g); + assignOpposite(front, hole, space, wf); + Geometry.holeAnalysis(outEx); + Geometry.holeAnalysis(hole); + } } } *************** *** 494,497 **** --- 540,561 ---- /** + * Pushes a surface into the space of the modellor by some length + * along the surface normal + * @param s the surface to push + * @param delta the lenght to push + */ + private void pushIntoSpace(Surface s, double delta) { + int deltaCorrection = 1; + if (s.normal().dot(front.normal()) < 0) { + deltaCorrection *= -1; + } + if (front.getFrontDomain() != space) { + deltaCorrection *= -1; + } + Vertex n = s.normal().copy(delta*deltaCorrection); + s.move(n.getX(), n.getY(), n.getZ()); + } + + /** * Assign space sp2 to the same side of s2 as space sp1 is assigned to s1 * @param s1 first surface *************** *** 515,518 **** --- 579,602 ---- } } + + /** + * Assign space sp2 to the opposite side of s2 as space sp1 is assigned to s1 + * @param s1 first surface + * @param s2 second surface + * @param sp1 first space + * @param sp2 second space + */ + private void assignOpposite(Surface s1, Surface s2, Space sp1, Space sp2) { + Space back = s2.getBackDomain(); + Space front = s2.getFrontDomain(); + assignSame(s1, s2, sp1, sp2); + if (s2.getBackDomain() == sp2) { + s2.setBackDomain(back); + s2.setFrontDomain(sp2); + } else { + s2.setFrontDomain(front); + s2.setBackDomain(sp2); + } + } /** |
|
From: Nordholt <nor...@us...> - 2007-01-30 16:18:51
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15297/src/net/sourceforge/bprocessor/model Modified Files: Selector.java Log Message: removing some write out Index: Selector.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Selector.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Selector.java 29 Jan 2007 18:08:45 -0000 1.1 --- Selector.java 30 Jan 2007 16:18:04 -0000 1.2 *************** *** 30,34 **** */ public Selector(List options) { - log.info("new selector"); this.options = options; } --- 30,33 ---- *************** *** 39,43 **** */ public Object getCurrentValue() { - log.info("Getting current: " + currentValue); return currentValue; } --- 38,41 ---- *************** *** 50,54 **** public void setCurrentValue(Object value) { if (options.contains(value)) { - log.info("managed to chance the value to: " + value); this.currentValue = value; } --- 48,51 ---- |
|
From: Michael L. <he...@us...> - 2007-01-30 14:10:25
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28842/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Geometry.java Space.java Log Message: Started implementing hole-analysis between element and space Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** Surface.java 24 Jan 2007 12:08:32 -0000 1.131 --- Surface.java 30 Jan 2007 14:10:03 -0000 1.132 *************** *** 1181,1192 **** * Tests if a surface is a hole in this surface * @param hole The surface to test * @return True if hole */ ! public boolean surrounds(Surface hole) { Iterator iter = hole.getVertices().iterator(); while (iter.hasNext()) { Vertex current = (Vertex) iter.next(); ! if (!surrounds(current)) { ! return false; } } --- 1181,1201 ---- * Tests if a surface is a hole in this surface * @param hole The surface to test + * @param boundary Test boundary condidition * @return True if hole */ ! public boolean surrounds(Surface hole, boolean boundary) { Iterator iter = hole.getVertices().iterator(); while (iter.hasNext()) { Vertex current = (Vertex) iter.next(); ! if (boundary) { ! if (!onBoundary(current)) { ! if (!surrounds(current)) { ! return false; ! } ! } ! } else { ! if (!surrounds(current)) { ! return false; ! } } } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -d -r1.116 -r1.117 *** Space.java 29 Jan 2007 15:03:36 -0000 1.116 --- Space.java 30 Jan 2007 14:10:03 -0000 1.117 *************** *** 2521,2527 **** Project.getInstance().setActiveSpace(this); Selection.primary().clear(); - if (surfaces.isEmpty()) { - copyOwnerEnvelope(); - } Project.getInstance().changed(Project.getInstance()); } --- 2521,2524 ---- Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** Geometry.java 5 Jan 2007 13:54:47 -0000 1.42 --- Geometry.java 30 Jan 2007 14:10:03 -0000 1.43 *************** *** 276,287 **** { ! Collection surfaces = surface.getOwner().getSurfaces(); ! Iterator iter = surfaces.iterator(); ! while (iter.hasNext()) { ! Surface current = (Surface) iter.next(); if (current != surface) { ! if (current.surrounds(surface)) { exteriors.add(current); ! } else if (surface.surrounds(current)) { interiors.add(current); } --- 276,290 ---- { ! Collection<Surface> candidates = new LinkedList<Surface>(); ! Collection<Surface> surfaces = surface.getOwner().getSurfaces(); ! Collection<Surface> envelope = surface.getOwner().getEnvelope(); ! candidates.addAll(surfaces); ! //candidates.addAll(envelope); ! ! for (Surface current : candidates) { if (current != surface) { ! if (current.surrounds(surface, false)) { exteriors.add(current); ! } else if (surface.surrounds(current, false)) { interiors.add(current); } |
|
From: Michael L. <he...@us...> - 2007-01-30 10:44:06
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11440/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Fixed problems with space-path Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.177 retrieving revision 1.178 diff -C2 -d -r1.177 -r1.178 *** View.java 26 Jan 2007 14:30:03 -0000 1.177 --- View.java 30 Jan 2007 10:44:05 -0000 1.178 *************** *** 1035,1043 **** private void drawPath(LinkedList<Space> path, boolean selection) { LinkedList<Label> labels = new LinkedList<Label>(); - Label divider = new Label(">>"); boolean first = true; for (Space space : path) { if (!first) { ! labels.add(divider); } else { first = false; --- 1035,1042 ---- private void drawPath(LinkedList<Space> path, boolean selection) { LinkedList<Label> labels = new LinkedList<Label>(); boolean first = true; for (Space space : path) { if (!first) { ! labels.add(new Label(">>")); } else { first = false; |
|
From: Michael L. <he...@us...> - 2007-01-30 10:44:06
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11440/src/net/sourceforge/bprocessor/gl/model Modified Files: SpaceBox.java Log Message: Fixed problems with space-path Index: SpaceBox.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model/SpaceBox.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SpaceBox.java 26 Jan 2007 14:04:56 -0000 1.1 --- SpaceBox.java 30 Jan 2007 10:44:04 -0000 1.2 *************** *** 23,26 **** --- 23,27 ---- public SpaceBox(Space space) { super(space.getDisplayName()); + this.space = space; } |
|
From: Nordholt <nor...@us...> - 2007-01-29 18:12:22
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4040/src/net/sourceforge/bprocessor/facade/modellor Modified Files: NetFacadeModellor.java Log Message: Used selector attributes to make it possible to choose between 4 kinds of field in the net. Index: NetFacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/NetFacadeModellor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** NetFacadeModellor.java 2 Jan 2007 17:47:05 -0000 1.9 --- NetFacadeModellor.java 29 Jan 2007 18:12:12 -0000 1.10 *************** *** 22,25 **** --- 22,26 ---- import net.sourceforge.bprocessor.model.ParameterBlock; import net.sourceforge.bprocessor.model.Project; + import net.sourceforge.bprocessor.model.Selector; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; *************** *** 143,146 **** --- 144,148 ---- List attributes = new LinkedList(); attributes.add(new Attribute("Net", net, true)); + attributes.add(new Attribute("Front", front, true)); attributes.add(new Attribute("Framewidth", new Double(frameWidth), true)); attributes.add(new Attribute("Depth", new Double(depth), true)); *************** *** 166,169 **** --- 168,182 ---- } else if (att.getName().equals("Single")) { setSingle(((Boolean)att.getValue()).booleanValue()); + } else if (att.getName().equals("Front")) { + Iterator sit = Project.getInstance().getActiveSpace().getSurfaces().iterator(); + while (sit.hasNext()) { + Surface s = (Surface)sit.next(); + if (s.getName().equals(att.getValue())) { + if (front != s) { + this.setFront(s); + this.setNet(createNet(front)); + } + } + } } } *************** *** 261,266 **** Surface s = (Surface)itS.next(); Map env = s.getParameters().environment(); ! if (env.get("openable") == null) { ! s.getParameters().put("openable", false); } } --- 274,286 ---- Surface s = (Surface)itS.next(); Map env = s.getParameters().environment(); ! if (env.get("type") == null) { ! List options = new LinkedList(); ! options.add("Empty"); ! options.add("Glass"); ! options.add("Window"); ! options.add("Door"); ! Selector sel = new Selector(options); ! sel.setCurrentValue("Glass"); ! s.getParameters().put(new Attribute("type", sel)); } } *************** *** 332,338 **** Iterator fieldEdges = field.getEdges().iterator(); Map envF = field.getParameters().environment(); ! boolean openable = false; ! if (envF.get("openable") != null) { ! openable = (Boolean)envF.get("openable"); } while (fieldEdges.hasNext()) { --- 352,369 ---- Iterator fieldEdges = field.getEdges().iterator(); Map envF = field.getParameters().environment(); ! Double extraFrame = 0.0; ! if (envF.get("type") instanceof Selector) { ! Selector sel = (Selector)envF.get("type"); ! if (sel.getCurrentValue() == null) { ! log.info("current null...strange"); ! } else if (sel.getCurrentValue().equals("Empty")) { ! extraFrame = 0.0; ! } else if (sel.getCurrentValue().equals("Glass")) { ! extraFrame = 0.0; ! } else if (sel.getCurrentValue().equals("Window")) { ! extraFrame = 0.05; ! } else if (sel.getCurrentValue().equals("Door")) { ! extraFrame = 0.12; ! } } while (fieldEdges.hasNext()) { *************** *** 340,350 **** Map envE = e.getParameters().environment(); double width = ((Double)envE.get("width")).doubleValue(); - if (openable) { - width *= 2; - } if (outline.contains(e)) { ! offsetMap.put(e, Double.valueOf(-width)); } else { ! offsetMap.put(e, Double.valueOf(-width / 2)); } } --- 371,378 ---- Map envE = e.getParameters().environment(); double width = ((Double)envE.get("width")).doubleValue(); if (outline.contains(e)) { ! offsetMap.put(e, Double.valueOf(-(width + extraFrame))); } else { ! offsetMap.put(e, Double.valueOf(-((width / 2) + extraFrame))); } } *************** *** 422,429 **** * @return a new net */ ! private Net createNet(Surface front) { Net n = new Net("Facade net"); if (front != null) { ! Surface s = front.copyall(n); } return n; --- 450,457 ---- * @return a new net */ ! private Net createNet(Surface front) { Net n = new Net("Facade net"); if (front != null) { ! front.copyall(n); } return n; |