bprocessor-commit Mailing List for B-processor (Page 42)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: rimestad <rim...@us...> - 2007-11-12 14:15:31
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16958/src/net/sourceforge/bprocessor/gui/actions Modified Files: FileImportActionListener.java ImportFileReader.java Log Message: Removed lock from space, and created a LibraryObj to encapsulate the union spaces for the library. Made changes acording to that in the treeview. Index: FileImportActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/FileImportActionListener.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** FileImportActionListener.java 5 Nov 2007 18:11:22 -0000 1.13 --- FileImportActionListener.java 12 Nov 2007 14:15:28 -0000 1.14 *************** *** 26,29 **** --- 26,30 ---- import net.sourceforge.bprocessor.gui.GUI; + import net.sourceforge.bprocessor.model.LibraryObj; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; *************** *** 107,113 **** } else if (lfile.getName().endsWith(".obj")) { try { ! Space into = Project.getInstance().getActiveSpace(); ! Space s = into.createUnion(lfile.getName()); ! Project.getInstance().addCalalogObject(s); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); --- 108,115 ---- } else if (lfile.getName().endsWith(".obj")) { try { ! Space s = new Space(lfile.getName(), Space.CONSTRUCTION, true); ! s.setUnion(true); ! LibraryObj lo = new LibraryObj(Byte.MAX_VALUE, lfile, s); ! Project.getInstance().addCalalogObject(lo); ImportFileReader.importObjFile(lfile, s, info.objPanel.getScale(), info.objPanel.getDirection(), info.objPanel.getCalcNormals()); Index: ImportFileReader.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ImportFileReader.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** ImportFileReader.java 5 Nov 2007 10:18:58 -0000 1.12 --- ImportFileReader.java 12 Nov 2007 14:15:28 -0000 1.13 *************** *** 200,204 **** into.add(s); } - s.setLocked(true); } for (Material m : materialMap.values()) { --- 200,203 ---- *************** *** 217,221 **** into.addProtected(s); } - into.setLocked(true); into.changed(); stream.close(); --- 216,219 ---- |
From: rimestad <rim...@us...> - 2007-11-12 14:15:20
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16947/src/net/sourceforge/bprocessor/model Modified Files: Space.java Command.java Project.java Added Files: LibraryObj.java Log Message: Removed lock from space, and created a LibraryObj to encapsulate the union spaces for the library. Made changes acording to that in the treeview. --- NEW FILE: LibraryObj.java --- //--------------------------------------------------------------------------------- // $Id: LibraryObj.java,v 1.1 2007/11/12 14:15:22 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.model; import java.io.File; import java.util.LinkedList; import java.util.List; /** * @author rimestad * A object pointing to a lib file */ public class LibraryObj implements Parametric { private File file; private Space space = null; private byte useableLevels = 0; private boolean isLocked = false; private String name; private String author; private String version; /** * The default constructor * @param usableLvls the levels where obj can be used incoded into a byte * @param f the file that represents this library object * @param s the space (union) this lib obj encapsulate */ public LibraryObj(byte usableLvls, File f, Space s) { file = f; useableLevels = usableLvls; space = s; name = s.getName(); } /** * Constructor for persistence */ public LibraryObj() { } /** * Get the file this lib obj represents * @return the file */ public File getFile() { return file; } /** * Set the file this lib obj points to * @param f The file */ void setFile(File f) { file = f; } /** * Return a byte with the usable levelnumber bit set * @return a byte with some set bits */ public byte getUseLevel() { return useableLevels; } /** * A getter for the space (union) this lib obj points to * @return The Space */ public Space getSpace() { return space; } /** * A setter for space in this lib obj * @param s the space */ void setSpace(Space s) { space = s; } /** * @return the isLocked */ public boolean isLocked() { return isLocked; } /** * @param isLocked the isLocked to set */ public void setLocked(boolean isLocked) { this.isLocked = isLocked; } /** * {@inheritDoc} */ public String getGeneralName() { return "Library Object"; } /** * {@inheritDoc} */ public List<Attribute> getAttributes() { List<Attribute> att = new LinkedList<Attribute>(); att.add(new Attribute("name", getName())); att.add(new Attribute("levels", new Selector<String>(getLevelStrings()))); att.add(new Attribute("geometry", getSpace())); att.add(new Attribute("Locked", isLocked())); att.add(new Attribute("File", getFile().getAbsoluteFile())); att.add(new Attribute("Author", getAuthor())); att.add(new Attribute("Version", getVersion())); return att; } private List<String> getLevelStrings() { List<String> strings = new LinkedList<String>(); int lvl = Space.SPACE_LEVEL; for (int i = 0; i < Space.PART_LEVEL; i++) { if ((useableLevels & (1 >> i)) == (1 >> i)) { strings.add(Space.levelToString(lvl)); } lvl++; } return strings; } /** * {@inheritDoc} */ public void setAttributes(List<Attribute> attributes) { } /** * Getter for name * @return The name */ public String getName() { return name; } /** * @return the author */ public String getAuthor() { return author; } /** * @param author the author to set */ public void setAuthor(String author) { this.author = author; } /** * @return the version */ public String getVersion() { return version; } /** * @param version the version to set */ public void setVersion(String version) { this.version = version; } } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.205 retrieving revision 1.206 diff -C2 -d -r1.205 -r1.206 *** Space.java 9 Nov 2007 13:58:42 -0000 1.205 --- Space.java 12 Nov 2007 14:15:22 -0000 1.206 *************** *** 65,71 **** private int type; - /** Tell if the space is finished and therefore cannot be edited */ - private boolean locked; - /** If the constructionspace is transparent */ private boolean transparent; --- 65,68 ---- *************** *** 2819,2838 **** /** - * Tell if the space is locked or not - * @return the locked - */ - public boolean isLocked() { - return locked; - } - - /** - * Set a lock on the space to tell that it is finish - * @param locked the locked to set - */ - public void setLocked(boolean locked) { - this.locked = locked; - } - - /** * Getter for anchor * @return The anchor --- 2816,2819 ---- Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Command.java 12 Nov 2007 08:05:25 -0000 1.24 --- Command.java 12 Nov 2007 14:15:22 -0000 1.25 *************** *** 801,859 **** } } - - /** - * a command for instanciating a union - * @author rimestad - */ - public static class Instance extends Command { - private Space space; - /** - * Create a instance - * @param s the space to instanciate - */ - public Instance(Space s) { - space = s; - parameters.put(new Attribute("scale", 1.0)); - } - - /** {@inheritDoc} */ - @Override - public void evaluate() { - Project proj = Project.getInstance(); - Space world = proj.getActiveSpace(); - double scale = parameters.getDouble("scale"); - Space instance = new Space(space.getName() + " instance ", space.getType(), false); - instance.setProto(space); - world.add(instance); - } - } - - /** - * a command for instanciating a union - * @author rimestad - */ - public static class Duplicate extends Command { - private Space space; - /** - * Create a duplicate - * @param s the space to duplicate - */ - public Duplicate(Space s) { - space = s; - parameters.put(new Attribute("scale", 1.0)); - } - - /** {@inheritDoc} */ - @Override - public void evaluate() { - Project proj = Project.getInstance(); - Space world = proj.getActiveSpace(); - double scale = parameters.getDouble("scale"); - Space created = space.copy(); - for (Vertex v : created.collect()) { - v.scale(scale); - } - world.add(created); - } - } } --- 801,803 ---- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.139 retrieving revision 1.140 diff -C2 -d -r1.139 -r1.140 *** Project.java 6 Nov 2007 19:00:43 -0000 1.139 --- Project.java 12 Nov 2007 14:15:22 -0000 1.140 *************** *** 121,125 **** private long nextMaterialId; ! private List<Space> catalog; /** --- 121,125 ---- private long nextMaterialId; ! private List<LibraryObj> catalog; /** *************** *** 157,161 **** redoStack = new Stack(); copyBuffer = new LinkedList(); ! catalog = new LinkedList<Space>(); resetCam(); observers = new LinkedList(); --- 157,161 ---- redoStack = new Stack(); copyBuffer = new LinkedList(); ! catalog = new LinkedList<LibraryObj>(); resetCam(); observers = new LinkedList(); *************** *** 1044,1057 **** * @return the list of spaces */ ! public List<Space> getCatalogObjects() { return catalog; } /** ! * Add a catalog spaces to til list of catalog objects ! * @param s the space object to add */ ! public void addCalalogObject(Space s) { ! catalog.add(s); } } --- 1044,1057 ---- * @return the list of spaces */ ! public List<LibraryObj> getCatalogObjects() { return catalog; } /** ! * Add a lib obj to til list of lib objects ! * @param lo the library object to add */ ! public void addCalalogObject(LibraryObj lo) { ! catalog.add(lo); } } |
From: Michael L. <he...@us...> - 2007-11-12 13:29:32
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31164/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: revival of old normal calculation Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.201 retrieving revision 1.202 diff -C2 -d -r1.201 -r1.202 *** Surface.java 12 Nov 2007 12:36:13 -0000 1.201 --- Surface.java 12 Nov 2007 13:29:35 -0000 1.202 *************** *** 1512,1516 **** public Vertex normal() { ! return normal0(edges); } --- 1512,1516 ---- public Vertex normal() { ! return normal1(edges); } *************** *** 1614,1617 **** --- 1614,1709 ---- return new Vertex(x, y, z); } + + /** + * @param edges edges + * @return value + */ + public static Vertex normal1(Collection<Edge> edges) { + int size = edges.size(); + Edge[] e = new Edge[size]; + double[] xs = new double[size]; + double[] ys = new double[size]; + double[] zs = new double[size]; + final double eps = 0.0000000001; + edges.toArray(e); + Edge e0 = e[0]; + Edge e1 = e[1]; + Vertex current; + if (e0.to == e1.from || e0.to == e1.to) { + current = e0.from; + } else { + current = e0.to; + } + for (int i = 0; i < e.length; i++) { + xs[i] = current.x; + ys[i] = current.y; + zs[i] = current.z; + if (current == e[i].from) { + current = e[i].to; + } else { + current = e[i].from; + } + } + double vx = xs[1] - xs[0]; + double vy = ys[1] - ys[0]; + double vz = zs[1] - zs[0]; + double x = 0.0; + double y = 0.0; + double z = 0.0; + for (int i = 2; i < e.length; i++) { + double ux = xs[i] - xs[i - 1]; + double uy = ys[i] - ys[i - 1]; + double uz = zs[i] - zs[i - 1]; + x = Math.abs(vy * uz - vz * uy); + y = Math.abs(vz * ux - vx * uz); + z = Math.abs(vx * uy - vy * ux); + if (x > eps || y > eps || z > eps) { + break; + } + } + double[] coord; + if (y > x) { + if (y > z) { + coord = xs; + } else { + coord = ys; + } + } else { + if (x > z) { + coord = zs; + } else { + coord = ys; + } + } + double min = Double.MAX_VALUE; + int inx1 = -1; + for (int i = 0; i < e.length; i++) { + if (coord[i] <= min) { + inx1 = i; + min = coord[i]; + } + } + int inx0 = inx1 == 0 ? e.length - 1 : inx1 - 1; + int inx2 = (inx1 + 1) % e.length; + + vx = xs[inx1] - xs[inx0]; + vy = ys[inx1] - ys[inx0]; + vz = zs[inx1] - zs[inx0]; + + double ux = xs[inx2] - xs[inx1]; + double uy = ys[inx2] - ys[inx1]; + double uz = zs[inx2] - zs[inx1]; + + x = vy * uz - vz * uy; + y = vz * ux - vx * uz; + z = vx * uy - vy * ux; + double length = Math.sqrt(x * x + y * y + z * z); + x = x / length; + y = y / length; + z = z / length; + + return new Vertex(x, y, z); + } + /** |
From: Michael L. <he...@us...> - 2007-11-12 12:36:16
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9987/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: removed a comment Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.200 retrieving revision 1.201 diff -C2 -d -r1.200 -r1.201 *** Surface.java 6 Nov 2007 18:20:30 -0000 1.200 --- Surface.java 12 Nov 2007 12:36:13 -0000 1.201 *************** *** 75,79 **** public static int direction(List<Edge> edges, CoordinateSystem system) { if (edges.size() < 2) { - log.error("Could not calculate direction for edge list due to its size"); return PARALLEL; } --- 75,78 ---- |
From: Michael L. <he...@us...> - 2007-11-12 10:55:50
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1514/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: removed some unused code Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.256 retrieving revision 1.257 diff -C2 -d -r1.256 -r1.257 *** View.java 9 Nov 2007 12:23:29 -0000 1.256 --- View.java 12 Nov 2007 10:55:48 -0000 1.257 *************** *** 1845,1853 **** } - /** {@inheritDoc} */ - public Vertex toModelCoords(double x, double y) { - return toPlaneCoords(x, y, new Plane(0, 0, 1, 0)); - } - /** * Returns the aspect ratio --- 1845,1848 ---- |
From: Michael L. <he...@us...> - 2007-11-12 08:08:21
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv701/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: coordinate systems Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** FacadeModellor.java 5 Nov 2007 10:18:54 -0000 1.34 --- FacadeModellor.java 12 Nov 2007 08:08:23 -0000 1.35 *************** *** 440,444 **** for (int i = 0; i < vertPosts; i++) { offset.scale(lengthV / offset.length()); ! Constructor l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); lengthV += intervalV; space.add(l); --- 440,444 ---- for (int i = 0; i < vertPosts; i++) { offset.scale(lengthV / offset.length()); ! Constructor l = new Line(cross.add(offset), vertDir.copy(), true, true); lengthV += intervalV; space.add(l); *************** *** 451,455 **** for (int i = 0; i < horPosts; i++) { offset.scale(lengthH / offset.length()); ! Line l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); lengthH += (intervalH); horCons.add(l); --- 451,455 ---- for (int i = 0; i < horPosts; i++) { offset.scale(lengthH / offset.length()); ! Line l = new Line(cross.add(offset), horDir.copy(), true, true); lengthH += (intervalH); horCons.add(l); |
From: Michael L. <he...@us...> - 2007-11-12 08:05:40
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31993/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java SpaceTool.java Log Message: coordinate systems Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** SpaceTool.java 5 Nov 2007 10:18:46 -0000 1.90 --- SpaceTool.java 12 Nov 2007 08:05:34 -0000 1.91 *************** *** 35,39 **** import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; - import net.sourceforge.bprocessor.model.Geometry; /** --- 35,38 ---- *************** *** 220,224 **** createFuncItem.addActionListener(funcListener); - // MARK 1 JMenuItem createConstItem = new JMenuItem("New Construction " + category); ActionListener constListener = new CreateSpaceActionListener(surface, --- 219,222 ---- *************** *** 248,285 **** } }); - JMenuItem copySpaceItem = new JMenuItem("Duplicate " + category); - copySpaceItem.addActionListener(new SpaceMenuAction(space, "Duplicate") { - public void actionPerformed(ActionEvent arg0) { - if (space != null) { - Space spaceCopy = space.copy(); - space.getOwner().add(spaceCopy); - Selection.primary().set(spaceCopy); - glv.changeTool(Tool.MOVE_TOOL); - space.getOwner().changed(); - Project.getInstance().checkpoint(); - } - } - }); ! JMenuItem flipSpaceItem = new JMenuItem("Rotate " + category + " 90 degrees CCW"); ! flipSpaceItem.addActionListener(new SpaceMenuAction(space, "Rotate") { ! public void actionPerformed(ActionEvent arg0) { ! if (space != null) { ! Iterator it = space.collect().iterator(); ! Vertex center = space.center(); ! while (it.hasNext()) { ! Geometry.rotate(Math.PI / 2, ! 0, 0, 1, ! (Vertex)it.next(), ! center); ! } ! space.changed(); ! } ! } ! }); if (!space.isContainer()) { editSpaceItem.setEnabled(false); - copySpaceItem.setEnabled(false); - flipSpaceItem.setEnabled(false); } --- 246,254 ---- } }); ! ! if (!space.isContainer()) { editSpaceItem.setEnabled(false); } *************** *** 312,318 **** menu.addSeparator(); menu.add(voidItem); - menu.add(copySpaceItem); menu.add(editSpaceItem); - menu.add(flipSpaceItem); menu.addPopupMenuListener(spl); menu.pack(); --- 281,285 ---- Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** AbstractTool.java 5 Nov 2007 10:18:46 -0000 1.134 --- AbstractTool.java 12 Nov 2007 08:05:34 -0000 1.135 *************** *** 302,311 **** sidewards.scale(2 / sidewards.length()); up.scale(2 / up.length()); ! if (e.getKeyCode() == KeyEvent.VK_META || e.getKeyCode() == KeyEvent.VK_ALT) { metaPressed = true; glv.setCursor(metaCursor); return; } ! if (e.getKeyCode() == KeyEvent.VK_CONTROL) { setActiveStrategy(AbstractTool.select); glv.getView().makeTarget(null); --- 302,313 ---- sidewards.scale(2 / sidewards.length()); up.scale(2 / up.length()); ! ! ! if (e.getKeyCode() == KeyEvent.VK_ALT) { metaPressed = true; glv.setCursor(metaCursor); return; } ! if (e.getKeyCode() == KeyEvent.VK_CONTROL || e.getKeyCode() == KeyEvent.VK_META) { setActiveStrategy(AbstractTool.select); glv.getView().makeTarget(null); *************** *** 464,468 **** setActiveStrategy(AbstractTool.pan); } ! if (activeStrategy != null) { activeStrategy.pressed(e); } else { --- 466,470 ---- setActiveStrategy(AbstractTool.pan); } ! if (!e.isPopupTrigger() && activeStrategy != null) { activeStrategy.pressed(e); } else { |
From: Michael L. <he...@us...> - 2007-11-12 08:05:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31982/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: coordinate systems Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** PopupMenu.java 9 Nov 2007 13:58:45 -0000 1.69 --- PopupMenu.java 12 Nov 2007 08:05:30 -0000 1.70 *************** *** 124,127 **** --- 124,137 ---- /** + * + * @param systems Collection of coordinate systems + * @return Menu for coordinate systems + */ + public static JPopupMenu getCoordinateSystemMenu(Collection systems) { + JPopupMenu menu = getGeometricMenu(systems); + return menu; + } + + /** * A popup generator for a space * @param space the space *************** *** 359,362 **** --- 369,414 ---- Project.getInstance().getActiveSpace().add(union); Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); + } + }; + menu.add(action); + } + { + AbstractAction action = new GeometricMenuAction(arguments, "Align Axes") { + public void actionPerformed(ActionEvent event) { + if (entities.size() == 1) { + Geometric geometric = entities.iterator().next(); + if (geometric instanceof Vertex) { + Vertex vertex = (Vertex) geometric; + Collection<Edge> edges = vertex.getEdges(); + double x = 0; + double y = 0; + double z = 0; + for (Edge current : edges) { + Vertex other = current.otherVertex(vertex); + Vertex v = other.minus(vertex); + x += v.getX(); + y += v.getY(); + z += v.getZ(); + } + x /= edges.size(); + y /= edges.size(); + z /= edges.size(); + Vertex n = new Vertex(x, y, z); + Edge edge = edges.iterator().next(); + Vertex other = edge.otherVertex(vertex); + + Vertex v = other.minus(vertex); + Vertex i = n.cross(v); + Vertex j = n.cross(i); + + Vertex o = vertex.copy(); + CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); + system.setIJN(i, j, n); + system.setOrigin(o); + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); + } + } } }; *************** *** 415,432 **** public static JPopupMenu getBackgroundMenu() { JPopupMenu menu = new JPopupMenu(); ! AbstractAction action = new AbstractAction("Cube...") { ! public void actionPerformed(ActionEvent event) { ! Command command = new Command.Cube(); ! AttributeView.instance().display(command); ! } ! }; ! menu.add(action); ! action = new AbstractAction("Cylinder...") { ! public void actionPerformed(ActionEvent event) { ! Command command = new Command.Cylinder(); ! AttributeView.instance().display(command); ! } ! }; ! menu.add(action); return menu; } --- 467,504 ---- public static JPopupMenu getBackgroundMenu() { JPopupMenu menu = new JPopupMenu(); ! { ! AbstractAction action = new AbstractAction("Reset View") { ! public void actionPerformed(ActionEvent event) { ! CoordinateSystem system = Project.getInstance().getActiveCoordinateSystem(); ! Vertex i = new Vertex(1, 0, 0); ! Vertex j = new Vertex(0, 1, 0); ! Vertex n = new Vertex(0, 0, 1); ! Vertex o = new Vertex(0, 0, 0); ! system.setIJN(i, j, n); ! system.setOrigin(o); ! Project.getInstance().changed(Project.getInstance()); ! Project.getInstance().checkpoint(); ! } ! }; ! menu.add(action); ! } ! { ! AbstractAction action = new AbstractAction("Cube...") { ! public void actionPerformed(ActionEvent event) { ! Command command = new Command.Cube(); ! AttributeView.instance().display(command); ! } ! }; ! menu.add(action); ! } ! { ! AbstractAction action = new AbstractAction("Cylinder...") { ! public void actionPerformed(ActionEvent event) { ! Command command = new Command.Cylinder(); ! AttributeView.instance().display(command); ! } ! }; ! menu.add(action); ! } return menu; } *************** *** 456,459 **** --- 528,533 ---- } else if (type instanceof Edge) { return getEdgeMenu(new LinkedList<Geometric>(Selection.primary())); + } else if (type instanceof CoordinateSystem) { + return getCoordinateSystemMenu(new LinkedList<Geometric>(Selection.primary())); } else { return PopupMenu.getGeometricMenu(new LinkedList<Geometric>(Selection.primary())); |
From: Michael L. <he...@us...> - 2007-11-12 08:05:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31972/src/net/sourceforge/bprocessor/model Modified Files: Line.java Command.java Constructor.java Log Message: coordinate systems Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Constructor.java 10 Oct 2007 08:32:00 -0000 1.23 --- Constructor.java 12 Nov 2007 08:05:25 -0000 1.24 *************** *** 29,36 **** /** Tells if the constructor is extended for hit or not */ ! private boolean active; /** Specify wether the constructor is changable */ ! private boolean editable; /** Set of geometrics connected to this constructor */ --- 29,36 ---- /** Tells if the constructor is extended for hit or not */ ! protected boolean active; /** Specify wether the constructor is changable */ ! protected boolean editable; /** Set of geometrics connected to this constructor */ Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Command.java 9 Nov 2007 09:45:25 -0000 1.23 --- Command.java 12 Nov 2007 08:05:25 -0000 1.24 *************** *** 739,746 **** --- 739,749 ---- @Override public void evaluate() { + List<Vertex> locals = system.translate(vertices); double sx = parameters.getDouble("translate x"); double sy = parameters.getDouble("translate y"); double sz = parameters.getDouble("translate z"); + + System.out.println("translate " + sx + ", " + sy + ", " + sz); for (Vertex current : locals) { current.setX(current.getX() + sx); Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Line.java 2 Oct 2007 12:37:56 -0000 1.35 --- Line.java 12 Nov 2007 08:05:25 -0000 1.36 *************** *** 18,34 **** */ public class Line extends Constructor { - /** - * - */ - private static final long serialVersionUID = 1L; - /** The logger */ private static Logger log = Logger.getLogger(Line.class); /** The direction vector */ ! private Vertex dir; ! ! /** The edge the center of this Line is to be moved on */ ! private Edge constraint; /** --- 18,26 ---- */ public class Line extends Constructor { /** The logger */ private static Logger log = Logger.getLogger(Line.class); /** The direction vector */ ! private Vertex direction; /** *************** *** 36,48 **** */ public Line() { - super(); - } - - /** - * Constuctor of Line with only the origin and a standard direction of (1,0,0) - * @param origin The origin - */ - public Line(Vertex origin) { - this(origin, new Vertex(1, 0, 0), false); } --- 28,31 ---- *************** *** 53,70 **** */ public Line(Vertex origin, Vertex dir) { ! this(origin, dir, false); ! } ! ! /** ! * Constructor of the Line with orgin and three angles ! * @param origin The origin ! * @param dir The vector of direction ! * @param active If the constructor is active ! */ ! public Line(Vertex origin, Vertex dir, boolean active) { ! super(origin); ! dir.normalize(); ! this.setActive(active); ! this.dir = dir; } --- 36,41 ---- */ public Line(Vertex origin, Vertex dir) { ! this.origin = origin; ! this.direction = dir; } *************** *** 77,96 **** */ public Line(Vertex origin, Vertex dir, boolean active, boolean editable) { ! super(origin, active, editable); ! dir.normalize(); ! this.dir = dir; ! } ! ! /** ! * Constructor of the Line with orgin and three angles ! * @param origin The origin ! * @param dir The vector of direction ! * @param constraint The bounded placements ! * @param active If the constructor is active ! * @param editable If the constructor is editable ! */ ! public Line(Vertex origin, Vertex dir, Edge constraint, boolean active, boolean editable) { ! this(origin, dir, active, editable); ! this.constraint = constraint; } --- 48,55 ---- */ public Line(Vertex origin, Vertex dir, boolean active, boolean editable) { ! this.origin = origin; ! this.direction = dir; ! this.active = active; ! this.editable = editable; } *************** *** 100,104 **** */ public Vertex getDirection() { ! return dir; } --- 59,63 ---- */ public Vertex getDirection() { ! return direction; } *************** *** 115,120 **** */ public void setDirection(Vertex dir) { ! this.dir = dir; ! dir.normalize(); } --- 74,78 ---- */ public void setDirection(Vertex dir) { ! this.direction = dir; } *************** *** 171,175 **** */ public Vertex getPointAt(double t) { ! Vertex tmp = dir.copy(); tmp.scale(t); return getOrigin().add(tmp); --- 129,133 ---- */ public Vertex getPointAt(double t) { ! Vertex tmp = direction.copy(); tmp.scale(t); return getOrigin().add(tmp); *************** *** 191,200 **** /** {@inheritDoc} */ public double degreesAboutY() { ! return Geometry.degreesAboutY(dir); } /** {@inheritDoc} */ public double degreesAboutZ() { ! return Geometry.degreesAboutZ(dir); } --- 149,158 ---- /** {@inheritDoc} */ public double degreesAboutY() { ! return Geometry.degreesAboutY(direction); } /** {@inheritDoc} */ public double degreesAboutZ() { ! return Geometry.degreesAboutZ(direction); } *************** *** 213,219 **** */ public Vertex tip(double distance) { ! double x = getOrigin().getX() + dir.getX() * distance; ! double y = getOrigin().getY() + dir.getY() * distance; ! double z = getOrigin().getZ() + dir.getZ() * distance; return new Tip(x, y, z); } --- 171,177 ---- */ public Vertex tip(double distance) { ! double x = getOrigin().getX() + direction.getX() * distance; ! double y = getOrigin().getY() + direction.getY() * distance; ! double z = getOrigin().getZ() + direction.getZ() * distance; return new Tip(x, y, z); } *************** *** 401,423 **** } - /** {@inheritDoc} */ - public Vertex canMove(double x, double y, double z, Collection entities) { - // TODO Think it through - Vertex move = new Vertex(x, y, z); - if (constraint != null) { - move = move.projectOnto(constraint.getDirection()); - Vertex to = getOrigin().add(move); - if (!constraint.coincides(to)) { - Vertex where = to.minus(constraint.getFrom()); - Vertex where2 = to.minus(constraint.getTo()); - if (where.length() > where2.length()) { - where = where2; - } - log.info("there were so long " + where); - move = where.minus(move); - } - } - return move; - } /** --- 359,362 ---- |
Update of /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22801/src/net/sourceforge/bprocessor/model Modified Files: TransformStack.java Translate.java Rotate.java AxisRotate.java Scale.java IDTransform.java Transform.java Log Message: Added a untransform method on transform object and therefore the classes extending it. Index: Rotate.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/Rotate.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Rotate.java 9 Nov 2007 09:45:25 -0000 1.6 --- Rotate.java 12 Nov 2007 07:42:51 -0000 1.7 *************** *** 145,147 **** --- 145,164 ---- return "Rotate"; } + + /** {@inheritDoc} */ + @Override + public Vertex untransform(Vertex vertex) { + Matrix matrix = Matrix.rotation(-rx, 1, 0, 0); + double values[] = new double[4]; + values[0] = vertex.getX(); + values[1] = vertex.getY(); + values[2] = vertex.getZ(); + values[3] = 1; + values = matrix.multiply(values); + matrix = Matrix.rotation(-ry, 0, 1, 0); + values = matrix.multiply(values); + matrix = Matrix.rotation(-rz, 0, 0, 1); + values = matrix.multiply(values); + return new Vertex(values[0], values[1], values[2]); + } } Index: Transform.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/Transform.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Transform.java 28 Nov 2006 15:39:28 -0000 1.4 --- Transform.java 12 Nov 2007 07:42:51 -0000 1.5 *************** *** 32,34 **** --- 32,41 ---- return getGeneralName(); } + + /** + * untransform out of transfromation + * @param vertex the vertex to untransform + * @return the untransformed vertex + */ + public abstract Vertex untransform(Vertex vertex); } Index: Translate.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/Translate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Translate.java 9 Nov 2007 09:45:25 -0000 1.5 --- Translate.java 12 Nov 2007 07:42:51 -0000 1.6 *************** *** 137,139 **** --- 137,152 ---- return "Translate"; } + + /** + * make the inverse transfromation + * @param vertex the vertex to untransform + * @return the untransformed vertex + */ + @Override + public Vertex untransform(Vertex vertex) { + double x = vertex.getX() - tx; + double y = vertex.getY() - ty; + double z = vertex.getZ() - tz; + return new Vertex(x, y, z); + } } Index: TransformStack.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/TransformStack.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TransformStack.java 16 Apr 2007 15:55:22 -0000 1.4 --- TransformStack.java 12 Nov 2007 07:42:51 -0000 1.5 *************** *** 100,102 **** --- 100,112 ---- } + /** {@inheritDoc} */ + @Override + public Vertex untransform(Vertex vertex) { + for (int i = 0; i < stack.size(); i++) { + Transform current = (Transform) stack.get(i); + vertex = current.untransform(vertex); + } + return vertex; + } + } Index: AxisRotate.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/AxisRotate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** AxisRotate.java 9 Nov 2007 09:45:25 -0000 1.5 --- AxisRotate.java 12 Nov 2007 07:42:51 -0000 1.6 *************** *** 166,168 **** --- 166,181 ---- return "General Rotate"; } + + /** {@inheritDoc} */ + @Override + public Vertex untransform(Vertex vertex) { + Matrix matrix = Matrix.rotation(-angle, rx, ry, rz); + double values[] = new double[4]; + values[0] = vertex.getX(); + values[1] = vertex.getY(); + values[2] = vertex.getZ(); + values[3] = 1; + values = matrix.multiply(values); + return new Vertex(values[0], values[1], values[2]); + } } Index: IDTransform.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/IDTransform.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** IDTransform.java 16 Apr 2007 15:55:22 -0000 1.2 --- IDTransform.java 12 Nov 2007 07:42:51 -0000 1.3 *************** *** 49,51 **** --- 49,57 ---- return "ID"; } + + /** {@inheritDoc} */ + @Override + public Vertex untransform(Vertex vertex) { + return vertex; + } } Index: Scale.java =================================================================== RCS file: /cvsroot/bprocessor//model/src/net/sourceforge/bprocessor/model/Scale.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Scale.java 9 Nov 2007 09:45:25 -0000 1.6 --- Scale.java 12 Nov 2007 07:42:51 -0000 1.7 *************** *** 136,138 **** --- 136,147 ---- return "Scale"; } + + /** {@inheritDoc} */ + @Override + public Vertex untransform(Vertex vertex) { + double x = vertex.getX() * 1 / sx; + double y = vertex.getY() * 1 / sy; + double z = vertex.getZ() * 1 / sz; + return new Vertex(x, y, z); + } } |
From: rimestad <rim...@us...> - 2007-11-12 07:41:01
|
Update of /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21925/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Corrected tooltip for extend Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor//gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** ToolFactory.java 19 Oct 2007 10:55:19 -0000 1.88 --- ToolFactory.java 12 Nov 2007 07:40:54 -0000 1.89 *************** *** 218,222 **** extrudeBut.setMnemonic(KeyEvent.VK_V); registerTool(Tool.MULTI_EXTRUDE_TOOL, multiExtrude, ! "Biconextrudetool2.gif", "Controlled extrude"); //this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); //registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); --- 218,222 ---- extrudeBut.setMnemonic(KeyEvent.VK_V); registerTool(Tool.MULTI_EXTRUDE_TOOL, multiExtrude, ! "Biconextrudetool2.gif", "Extend"); //this.registerTool(Tool.MOVE_TOOL, alternate, "Biconmovetool.gif", "Move"); //registerTool(Tool.CONTROLLED_MOVE_TOOL, controlled, "Biconmovetool.gif", "Controlled Move"); |
From: Michael L. <he...@us...> - 2007-11-09 13:58:42
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8985/src/net/sourceforge/bprocessor/gui Modified Files: PopupMenu.java Log Message: new implementation of make union Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/PopupMenu.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** PopupMenu.java 8 Nov 2007 09:19:58 -0000 1.68 --- PopupMenu.java 9 Nov 2007 13:58:45 -0000 1.69 *************** *** 10,14 **** import java.util.Collection; import java.util.HashMap; - import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; --- 10,13 ---- *************** *** 54,58 **** private static final boolean CHECKS = false; - private static final boolean GROUPS = true; /** * make a popup menu for a surface --- 53,56 ---- *************** *** 336,358 **** menu.add(simplify); ! AbstractAction makeUnion = new GeometricMenuAction(arguments, "Make Union") { ! public void actionPerformed(ActionEvent e) { ! Collection<Space> interior = new HashSet<Space>(); ! Space owner = null; ! ! for (Entity ent : entities) { ! if (ent instanceof Space) { ! interior.add((Space) ent); ! } ! } ! ! Space.makeUnion(interior); ! Project.getInstance().changed(owner); ! Project.getInstance().checkpoint(); ! } ! }; ! menu.add(makeUnion); ! if (GROUPS) { ! AbstractAction action = new GeometricMenuAction(arguments, "Group") { public void actionPerformed(ActionEvent event) { Mesh mesh = new Mesh(entities); --- 334,339 ---- menu.add(simplify); ! { ! AbstractAction action = new GeometricMenuAction(arguments, "Make Union") { public void actionPerformed(ActionEvent event) { Mesh mesh = new Mesh(entities); |
From: Michael L. <he...@us...> - 2007-11-09 13:58:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8976/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: new implementation of make union Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.204 retrieving revision 1.205 diff -C2 -d -r1.204 -r1.205 *** Space.java 8 Nov 2007 12:31:35 -0000 1.204 --- Space.java 9 Nov 2007 13:58:42 -0000 1.205 *************** *** 2835,2910 **** /** - * Make a union out of a collection of spaces - * -All boundary surfaces are found and kept as envelope<br> - * -All geometry are copied into the union - * @param interior The spaces to make a union of - */ - public static void makeUnion(Collection<Space> interior) { - Collection<Surface> boundary = new LinkedList<Surface>(); - Collection<Surface> innerSurfs = new HashSet<Surface>(); - Space owner = null; - for (Space s : interior) { - owner = s.getOwner(); - for (Surface surface : s.getEnvelope()) { - if (interior.contains(surface.getFrontDomain()) && - interior.contains(surface.getBackDomain())) { - innerSurfs.add(surface); - } else { - boundary.add(surface); - } - } - } - - Space union = owner.createUnion("unnamed"); - owner.add(union); - - for (Surface surface : boundary) { - Surface copy = surface.copy(union); - Space front = surface.getFrontDomain(); - if (!interior.contains(front)) { - copy.setFrontDomain(union.getEmpty()); - } else { - surface.setFrontDomain(union); - copy.setFrontDomain(front); - } - Space back = surface.getBackDomain(); - if (!interior.contains(back)) { - copy.setBackDomain(union.getEmpty()); - } else { - surface.setBackDomain(union); - copy.setBackDomain(back); - } - } - Set<Edge> danglingEdges = new HashSet<Edge>(); - for (Surface surface : innerSurfs) { - owner.remove(surface); - danglingEdges.addAll(surface.getEdges()); - union.add(surface); - } - - Set<Vertex> danglingVertex = new HashSet<Vertex>(); - for (Edge e : danglingEdges) { - if (e.getSurfaces().isEmpty()) { - danglingVertex.add(e.getFrom()); - danglingVertex.add(e.getTo()); - owner.remove(e); - union.add(e); - } - } - - for (Vertex v : danglingVertex) { - if (v.getEdges().isEmpty()) { - owner.remove(v); - union.add(v); - } - } - - for (Space space : interior) { - owner.elements.remove(space.getId()); - union.add(space); - } - } - - /** * Getter for anchor * @return The anchor --- 2835,2838 ---- |
From: Michael L. <he...@us...> - 2007-11-09 13:39:07
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv653/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Log Message: edge copying fixed Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** Edge.java 28 Oct 2007 22:45:37 -0000 1.98 --- Edge.java 9 Nov 2007 13:39:09 -0000 1.99 *************** *** 346,353 **** */ public Edge copy() { ! Edge edge = new Edge(); ! edge.setFrom(getFrom().copy()); ! edge.setTo(getTo().copy()); ! return edge; } --- 346,350 ---- */ public Edge copy() { ! return (Edge) copy(new HashMap()); } *************** *** 365,368 **** --- 362,367 ---- copy = new Edge((Vertex) from.copy(map), (Vertex) to.copy(map)); map.put(this, copy); + copy.smooth = smooth; + copy.strippled = strippled; } return copy; |
From: Michael L. <he...@us...> - 2007-11-09 12:23:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2120/src/net/sourceforge/bprocessor/gl/view Modified Files: ViewToolbarFactory.java View.java Display.java Log Message: implemented ability to turn edges off Index: ViewToolbarFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/ViewToolbarFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ViewToolbarFactory.java 12 Oct 2007 11:06:52 -0000 1.4 --- ViewToolbarFactory.java 9 Nov 2007 12:23:29 -0000 1.5 *************** *** 64,70 **** --- 64,98 ---- but.setToolTipText("Grid"); but.setSelected(true); + + + but = tb.registerAction(new ViewEdges(glv)); + but.setToolTipText("Edges"); + but.setSelected(true); } + class ViewEdges extends AbstractAction { + private GLView glv; + + ViewEdges(GLView glv) { + this.glv = glv; + ClassLoader cl = Thread.currentThread().getContextClassLoader(); + URL url = cl.getResource("Biconedges.gif"); + ImageIcon im = new ImageIcon(url); + putValue(Action.SMALL_ICON, im); + } + + /** {@inheritDoc} */ + public void actionPerformed(ActionEvent event) { + JToggleButton button = (JToggleButton) event.getSource(); + if (button.isSelected()) { + glv.getView().enableEdges(); + } else { + glv.getView().disableEdges(); + } + glv.repaint(); + } + } + class ViewGrid extends AbstractAction { private GLView glv; Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** Display.java 9 Nov 2007 10:42:16 -0000 1.50 --- Display.java 9 Nov 2007 12:23:29 -0000 1.51 *************** *** 63,66 **** --- 63,67 ---- private static boolean intersecting; private static boolean construction; + private static boolean edgesEnabled; private static int mode; private static boolean transparency; *************** *** 276,279 **** --- 277,298 ---- /** + * Returns true if edges are visible + * @return true if edges are visible + */ + public static boolean edgesEnabled() { + return edgesEnabled; + } + + /** + * Sets the edges flag specifying if edges + * are visible + * @param value new value of edges flag + */ + public static void edgesEnabled(boolean value) { + edgesEnabled = value; + } + + + /** * Returns the mode * @return the mode *************** *** 448,453 **** private static void paintSurfaces(Collection<Surface> surfaces, float[] color) { ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); ! gl.glPolygonOffset(1.0f, 1.0f); apply(color, 1.0f); for (Surface current : surfaces) { --- 467,474 ---- private static void paintSurfaces(Collection<Surface> surfaces, float[] color) { ! if (edgesEnabled) { ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); ! gl.glPolygonOffset(1.0f, 1.0f); ! } apply(color, 1.0f); for (Surface current : surfaces) { *************** *** 456,460 **** } } ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); } --- 477,483 ---- } } ! if (edgesEnabled) { ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); ! } } *************** *** 472,477 **** gl.glEnable(GL.GL_LIGHTING); gl.glShadeModel(GL.GL_SMOOTH); ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); ! gl.glPolygonOffset(1.0f, 1.0f); gl.glEnable(GL.GL_CULL_FACE); gl.glCullFace(GL.GL_BACK); --- 495,503 ---- gl.glEnable(GL.GL_LIGHTING); gl.glShadeModel(GL.GL_SMOOTH); ! ! if (edgesEnabled) { ! gl.glEnable(GL.GL_POLYGON_OFFSET_FILL); ! gl.glPolygonOffset(1.0f, 1.0f); ! } gl.glEnable(GL.GL_CULL_FACE); gl.glCullFace(GL.GL_BACK); *************** *** 498,502 **** } } ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); gl.glDisable(GL.GL_CULL_FACE); gl.glDisable(GL.GL_LIGHTING); --- 524,530 ---- } } ! if (edgesEnabled) { ! gl.glDisable(GL.GL_POLYGON_OFFSET_FILL); ! } gl.glDisable(GL.GL_CULL_FACE); gl.glDisable(GL.GL_LIGHTING); *************** *** 874,878 **** } } ! { Set<Edge> visible = new HashSet(); for (Surface current : surfaces) { --- 902,907 ---- } } ! ! if (edgesEnabled) { Set<Edge> visible = new HashSet(); for (Surface current : surfaces) { Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.255 retrieving revision 1.256 diff -C2 -d -r1.255 -r1.256 *** View.java 6 Nov 2007 18:27:00 -0000 1.255 --- View.java 9 Nov 2007 12:23:29 -0000 1.256 *************** *** 283,286 **** --- 283,288 ---- private boolean gridEnabled; + private boolean edgesEnabled; + private boolean showTransparent = true; *************** *** 440,443 **** --- 442,446 ---- noneColor = NONE_COLOR; gridEnabled = true; + edgesEnabled = true; tempConstructors = new HashSet<Constructor>(); tempEdges = new HashSet<Edge>(); *************** *** 535,538 **** --- 538,555 ---- /** + * Enable edges + */ + public void enableEdges() { + edgesEnabled = true; + } + + /** + * Disable edges + */ + public void disableEdges() { + edgesEnabled = false; + } + + /** * * *************** *** 615,618 **** --- 632,636 ---- Display.selecting(hitdetection); Display.construction(gridEnabled); + Display.edgesEnabled(edgesEnabled); Display.mode(drawMode); Display.transparency(showTransparent); |
From: Michael L. <he...@us...> - 2007-11-09 12:23:28
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2120/src/gfx Added Files: Biconedges.gif Log Message: implemented ability to turn edges off --- NEW FILE: Biconedges.gif --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-11-09 10:42:18
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26434/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: smooth edges rendered grey Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Display.java 6 Nov 2007 18:27:03 -0000 1.49 --- Display.java 9 Nov 2007 10:42:16 -0000 1.50 *************** *** 423,430 **** private static void split(Collection<Edge> edges, Collection<Edge> normal, ! Collection<Edge> stippled) { for (Edge current : edges) { if (current.getStrippled()) { stippled.add(current); } else { normal.add(current); --- 423,433 ---- private static void split(Collection<Edge> edges, Collection<Edge> normal, ! Collection<Edge> stippled, ! Collection<Edge> smooth) { for (Edge current : edges) { if (current.getStrippled()) { stippled.add(current); + } else if (current.isSmooth()) { + smooth.add(current); } else { normal.add(current); *************** *** 979,987 **** Collection<Edge> stippled = new LinkedList(); Collection<Edge> normal = new LinkedList(); if (space.isNet()) { stippled.addAll(edges); } else { ! split(edges, normal, stippled); } --- 982,991 ---- Collection<Edge> stippled = new LinkedList(); Collection<Edge> normal = new LinkedList(); + Collection<Edge> smooth = new LinkedList(); if (space.isNet()) { stippled.addAll(edges); } else { ! split(edges, normal, stippled, smooth); } *************** *** 1000,1003 **** --- 1004,1008 ---- } paintEdges(normal, color, size); + paintEdges(smooth, grey, 1.0f); paintStippled(stippled, middleblue, size); } *************** *** 1218,1223 **** Collection<Edge> stippled = new LinkedList(); Collection<Edge> normal = new LinkedList(); ! split(edges, normal, stippled); paintEdges(normal, black, 1.0f); paintStippled(stippled, middleblue, 1.0f); } --- 1223,1231 ---- Collection<Edge> stippled = new LinkedList(); Collection<Edge> normal = new LinkedList(); ! Collection<Edge> smooth = new LinkedList(); ! ! split(edges, normal, stippled, smooth); paintEdges(normal, black, 1.0f); + paintEdges(smooth, grey, 1.0f); paintStippled(stippled, middleblue, 1.0f); } |
From: Michael L. <he...@us...> - 2007-11-09 09:45:36
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4506/src/net/sourceforge/bprocessor/gl/tool Modified Files: OffsetTool.java ArcTool.java RectTool.java Pencil.java Log Message: checkpoint code cleanup Index: Pencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/Pencil.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Pencil.java 19 Oct 2007 11:01:15 -0000 1.19 --- Pencil.java 9 Nov 2007 09:45:32 -0000 1.20 *************** *** 99,103 **** (current.type() == Intersection.EDGE && eColl.contains(current.object()))); ! if (!Geometry.insertEdges(edges).isEmpty() || exsGeometry) { cleanUp(); return; --- 99,108 ---- (current.type() == Intersection.EDGE && eColl.contains(current.object()))); ! boolean finish = !Geometry.insertEdges(edges).isEmpty() || exsGeometry; ! ! Project.getInstance().changed(Project.getInstance()); ! Project.getInstance().checkpoint(); ! ! if (finish) { cleanUp(); return; Index: ArcTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ArcTool.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ArcTool.java 19 Sep 2007 20:57:47 -0000 1.18 --- ArcTool.java 9 Nov 2007 09:45:32 -0000 1.19 *************** *** 19,22 **** --- 19,23 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Geometry; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; import net.sourceforge.bprocessor.model.Vertex; *************** *** 190,193 **** --- 191,196 ---- public void onVertex() { Geometry.insertEdges(createArc(first.vertex(), current.vertex(), end.vertex(), false)); + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); first = null; end = null; Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** RectTool.java 25 Oct 2007 09:28:02 -0000 1.23 --- RectTool.java 9 Nov 2007 09:45:32 -0000 1.24 *************** *** 19,22 **** --- 19,23 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Geometry; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; import net.sourceforge.bprocessor.model.Surface; *************** *** 101,106 **** direction.scale((length - direction.length()) / direction.length()); movingEdge.move(direction.getX(), direction.getY(), direction.getZ()); ! List surfaces = Geometry.insertEdges(rectangle); ! System.out.println("surfaces: " + surfaces); cleanUp(); feedback(rectangle); --- 102,108 ---- direction.scale((length - direction.length()) / direction.length()); movingEdge.move(direction.getX(), direction.getY(), direction.getZ()); ! Geometry.insertEdges(rectangle); ! Project.getInstance().changed(Project.getInstance()); ! Project.getInstance().checkpoint(); cleanUp(); feedback(rectangle); *************** *** 187,190 **** --- 189,194 ---- } } + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); } cleanUp(); Index: OffsetTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/OffsetTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** OffsetTool.java 5 Oct 2007 13:30:43 -0000 1.20 --- OffsetTool.java 9 Nov 2007 09:45:32 -0000 1.21 *************** *** 29,32 **** --- 29,33 ---- import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Point; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; import net.sourceforge.bprocessor.model.Surface; *************** *** 290,293 **** --- 291,296 ---- private void endOffset() { Geometry.insertEdges(contour); + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); cleanUp(); } |
From: Michael L. <he...@us...> - 2007-11-09 09:45:32
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4494/src/net/sourceforge/bprocessor/gui/attrview Modified Files: OperationAttribute.java GenericPanel.java Log Message: checkpoint code cleanup Index: OperationAttribute.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/OperationAttribute.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** OperationAttribute.java 19 Oct 2007 08:28:33 -0000 1.1 --- OperationAttribute.java 9 Nov 2007 09:45:29 -0000 1.2 *************** *** 22,25 **** --- 22,26 ---- import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Operation; + import net.sourceforge.bprocessor.model.Project; /** *************** *** 142,145 **** --- 143,148 ---- Operation operation = (Operation) attribute.getValue(); operation.perform(); + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); } } Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** GenericPanel.java 19 Oct 2007 12:11:30 -0000 1.46 --- GenericPanel.java 9 Nov 2007 09:45:29 -0000 1.47 *************** *** 97,113 **** } private void handleString(Attribute attribute, JComponent where) { StringAttribute sa = new StringAttribute(attribute); ! sa.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(sa); where.add(new AttributeRow(sa)); --- 97,117 ---- } + private class GenericListener implements AttributeListener { + public void valueChanged(Attribute a) { + obj.setAttributes(attributes); + if (obj instanceof Entity) { + simpleUpdate = true; + ((Entity)obj).changed(); + } else if (obj instanceof Camera) { + Project.getInstance().changed((Camera)obj); + } + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); + } + } + private void handleString(Attribute attribute, JComponent where) { StringAttribute sa = new StringAttribute(attribute); ! sa.addStringAttributeListener(new GenericListener()); genAttributes.add(sa); where.add(new AttributeRow(sa)); *************** *** 131,145 **** private void handleDescription(Attribute attribute, JComponent where) { DescriptionAttribute da = new DescriptionAttribute(attribute); ! da.addDescriptionAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(da); where.add(new AttributeRow(da)); --- 135,139 ---- private void handleDescription(Attribute attribute, JComponent where) { DescriptionAttribute da = new DescriptionAttribute(attribute); ! da.addDescriptionAttributeListener(new GenericListener()); genAttributes.add(da); where.add(new AttributeRow(da)); *************** *** 148,162 **** private void handleMaterial(Attribute attribute, JComponent where) { MaterialAttribute ma = new MaterialAttribute(attribute); ! ma.addMaterialAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(ma); where.add(new AttributeRow(ma)); --- 142,146 ---- private void handleMaterial(Attribute attribute, JComponent where) { MaterialAttribute ma = new MaterialAttribute(attribute); ! ma.addMaterialAttributeListener(new GenericListener()); genAttributes.add(ma); where.add(new AttributeRow(ma)); *************** *** 165,179 **** private void handleBoolean(Attribute attribute, JComponent where) { BooleanAttribute ba = new BooleanAttribute(attribute); ! ba.addBooleanAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(ba); where.add(new AttributeRow(ba)); --- 149,153 ---- private void handleBoolean(Attribute attribute, JComponent where) { BooleanAttribute ba = new BooleanAttribute(attribute); ! ba.addBooleanAttributeListener(new GenericListener()); genAttributes.add(ba); where.add(new AttributeRow(ba)); *************** *** 184,198 **** private void handleClassification(Attribute attribute, JComponent where) { ClassificationTextAttribute catext = new ClassificationTextAttribute(attribute); ! catext.addClassificationAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(catext); where.add(new AttributeRow(catext)); --- 158,162 ---- private void handleClassification(Attribute attribute, JComponent where) { ClassificationTextAttribute catext = new ClassificationTextAttribute(attribute); ! catext.addClassificationAttributeListener(new GenericListener()); genAttributes.add(catext); where.add(new AttributeRow(catext)); *************** *** 212,215 **** --- 176,181 ---- Project.getInstance().changed((Camera)obj); } + Project.getInstance().changed(Project.getInstance()); + Project.getInstance().checkpoint(); } } *************** *** 221,235 **** private void handleLink(Attribute attribute, JComponent where) { LinkAttribute la = new LinkAttribute(attribute); ! la.addStringAttributeListener(new AttributeListener() { ! public void valueChanged(Attribute a) { ! obj.setAttributes(attributes); ! if (obj instanceof Entity) { ! simpleUpdate = true; ! ((Entity)obj).changed(); ! } else if (obj instanceof Camera) { ! Project.getInstance().changed((Camera)obj); ! } ! } ! }); genAttributes.add(la); where.add(new AttributeRow(la)); --- 187,191 ---- private void handleLink(Attribute attribute, JComponent where) { LinkAttribute la = new LinkAttribute(attribute); ! la.addStringAttributeListener(new GenericListener()); genAttributes.add(la); where.add(new AttributeRow(la)); |
From: Michael L. <he...@us...> - 2007-11-09 09:45:29
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4471/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Translate.java Rotate.java Command.java AxisRotate.java Scale.java Log Message: checkpoint code cleanup Index: Rotate.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Rotate.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Rotate.java 5 Nov 2007 18:09:53 -0000 1.5 --- Rotate.java 9 Nov 2007 09:45:25 -0000 1.6 *************** *** 104,109 **** } } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } --- 104,107 ---- Index: Translate.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Translate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Translate.java 16 Apr 2007 15:55:22 -0000 1.4 --- Translate.java 9 Nov 2007 09:45:25 -0000 1.5 *************** *** 105,110 **** } } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } --- 105,108 ---- Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** Geometry.java 24 Oct 2007 16:04:54 -0000 1.63 --- Geometry.java 9 Nov 2007 09:45:25 -0000 1.64 *************** *** 438,443 **** mesh = space.insert(mesh); result.addAll(mesh.surfaces()); - Project.getInstance().changed(Project.getInstance().getActiveSpace()); - Project.getInstance().checkpoint(); return result; } --- 438,441 ---- Index: AxisRotate.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/AxisRotate.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** AxisRotate.java 16 Apr 2007 15:55:22 -0000 1.4 --- AxisRotate.java 9 Nov 2007 09:45:25 -0000 1.5 *************** *** 128,133 **** } } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } --- 128,131 ---- Index: Command.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Command.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Command.java 8 Nov 2007 09:11:29 -0000 1.22 --- Command.java 9 Nov 2007 09:45:25 -0000 1.23 *************** *** 130,134 **** Surface face = new Surface(contour); owner.insert(face); - Project.getInstance().checkpoint(); } } --- 130,133 ---- *************** *** 545,550 **** space.insert(current); } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } } --- 544,547 ---- *************** *** 621,626 **** sides.add(bottom); space.insert(top); - Project.getInstance().changed(space); - Project.getInstance().checkpoint(); } } --- 618,621 ---- *************** *** 673,678 **** } world.insert(top); - Project.getInstance().changed(world); - Project.getInstance().checkpoint(); } } --- 668,671 ---- *************** *** 718,723 **** v1.set(v2); } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } } --- 711,714 ---- *************** *** 832,837 **** instance.setProto(space); world.add(instance); - proj.changed(world); - proj.checkpoint(); } } --- 823,826 ---- *************** *** 863,868 **** } world.add(created); - proj.changed(world); - proj.checkpoint(); } } --- 852,855 ---- Index: Scale.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Scale.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Scale.java 16 Apr 2007 15:55:22 -0000 1.5 --- Scale.java 9 Nov 2007 09:45:25 -0000 1.6 *************** *** 104,109 **** } } - Project.getInstance().changed(Project.getInstance()); - Project.getInstance().checkpoint(); } --- 104,107 ---- |
From: Michael L. <he...@us...> - 2007-11-09 09:45:29
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4471/src/net/sourceforge/bprocessor/model/modellor Modified Files: WindowModellor.java Log Message: checkpoint code cleanup Index: WindowModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor/WindowModellor.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WindowModellor.java 5 Nov 2007 10:18:50 -0000 1.3 --- WindowModellor.java 9 Nov 2007 09:45:25 -0000 1.4 *************** *** 207,211 **** Object value = a.getValue(); while (sit.hasNext()) { - Project.getInstance().checkpoint(); Surface s = (Surface)sit.next(); if (s.getName().equals(value)) { --- 207,210 ---- |
From: Michael L. <he...@us...> - 2007-11-09 08:04:55
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29555/src/etc Modified Files: bprocessor.xsd Log Message: Edge.smooth added to persistence Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** bprocessor.xsd 8 Nov 2007 12:31:36 -0000 1.36 --- bprocessor.xsd 9 Nov 2007 08:04:41 -0000 1.37 *************** *** 133,136 **** --- 133,137 ---- </xsd:sequence> <xsd:attribute name="constructor" type="xsd:boolean" use="required"/> + <xsd:attribute name="smooth" type="xsd:boolean" use="optional"/> </xsd:extension> </xsd:complexContent> |
From: Michael L. <he...@us...> - 2007-11-09 08:04:55
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29555/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: Edge.smooth added to persistence Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Persistence.java 8 Nov 2007 12:31:35 -0000 1.55 --- Persistence.java 9 Nov 2007 08:04:41 -0000 1.56 *************** *** 572,575 **** --- 572,576 ---- xmls.add(xml); edge.setStrippled(xml.isConstructor()); + edge.setSmooth(xml.isSmooth()); edge.setOwner(owner); return edge; *************** *** 1153,1156 **** --- 1154,1158 ---- map.put(edge, xml); xml.setConstructor(edge.getStrippled()); + xml.setSmooth(edge.isSmooth()); return xml; } |
From: Michael L. <he...@us...> - 2007-11-08 12:31:34
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4900/src/net/sourceforge/bprocessor/model Modified Files: Space.java Persistence.java Log Message: Removed level from persistense Removed building, floor, apartment from space Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Persistence.java 6 Nov 2007 19:00:43 -0000 1.54 --- Persistence.java 8 Nov 2007 12:31:35 -0000 1.55 *************** *** 917,921 **** xml.setName(space.getName()); xml.setType(space.getType()); - xml.setLevel(space.getLevel()); xml.setTransparent(space.isTransparent()); xml.setDescription(space.getDescription().toString()); --- 917,920 ---- Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.203 retrieving revision 1.204 diff -C2 -d -r1.203 -r1.204 *** Space.java 6 Nov 2007 19:00:43 -0000 1.203 --- Space.java 8 Nov 2007 12:31:35 -0000 1.204 *************** *** 50,54 **** /** union flag */ ! private boolean isUnion = false; /** net flag */ --- 50,54 ---- /** union flag */ ! private boolean isUnion; /** net flag */ *************** *** 66,70 **** /** Tell if the space is finished and therefore cannot be edited */ ! private boolean locked = false; /** If the constructionspace is transparent */ --- 66,70 ---- /** Tell if the space is finished and therefore cannot be edited */ ! private boolean locked; /** If the constructionspace is transparent */ *************** *** 127,139 **** private Modellor modellor; - /** the building the space belongs to */ - private String building = "0"; - /** the floor the space belongs to */ - private String floor = "0"; - /** the apartment the space belongs to */ - private String apartment = "0"; - /** the room the space belongs to */ - private String room = "0"; - private LinkedHashMap<String, Object> ownParameters = new LinkedHashMap<String, Object>(); --- 127,130 ---- *************** *** 1240,1251 **** changedType = true; } - } else if (a.getName().equals("Building")) { - setBuilding(((String)a.getValue().toString())); - } else if (a.getName().equals("Apartment")) { - setApartment(((String)a.getValue().toString())); - } else if (a.getName().equals("Floor")) { - setFloor(((String)a.getValue().toString())); - } else if (a.getName().equals("Room")) { - setRoom(((String)a.getValue().toString())); } else if (a.getName().equals("Transparent")) { setTransparent((((Boolean)a.getValue()).booleanValue())); --- 1231,1234 ---- *************** *** 1270,1274 **** ArrayList<Attribute> res = new ArrayList<Attribute>(); res.add(new Attribute("Name", getName())); - res.add(new Attribute("Level", "" + getLevel())); if (getOwner() == Project.getInstance().world()) { if (isConstructionSpace()) { --- 1253,1256 ---- *************** *** 1306,1315 **** } } - if (isFunctionalSpace()) { - res.add(new Attribute("Building", getBuilding(), true)); - res.add(new Attribute("Floor", getFloor(), true)); - res.add(new Attribute("Apartment", getApartment(), true)); - res.add(new Attribute("Room", getRoom(), true)); - } res.add(new Attribute("ID", getId() != null ? getId().toString() : "", false)); res.add(new Attribute("Owner", getOwner(), false)); --- 1288,1291 ---- *************** *** 2438,2519 **** return proto != null; } - - /** - * Set the level of the space MOSTLY FOR PERSISTENCE LAYER - * @param level the level - */ - protected void setLevel(int level) { - } - /** - * Get the apartment - * @return The apartment - * @hibernate.property - */ - public String getApartment() { - return apartment; - } - - /** - * Set the apartment - * @param apartment The apartment - */ - public void setApartment(String apartment) { - this.apartment = apartment; - } - - /** - * Get the building - * @return The building - * @hibernate.property - */ - public String getBuilding() { - return building; - } - - /** - * Set the building - * @param building The building - */ - public void setBuilding(String building) { - this.building = building; - } - - /** - * Get the floor - * @return The floor - * @hibernate.property - */ - public String getFloor() { - return floor; - } - - /** - * Set the floor - * @param floor The floor - */ - public void setFloor(String floor) { - this.floor = floor; - } - - /** - * Get the room - * @return The room - * @hibernate.property - */ - public String getRoom() { - return room; - } - - /** - * Set the room - * @param room The room - */ - public void setRoom(String room) { - this.room = room; - } - - /** * Return the level of the space as a string * @return The string representation of the space level --- 2414,2419 ---- |
From: Michael L. <he...@us...> - 2007-11-08 12:31:34
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4900/src/etc Modified Files: bprocessor.xsd Log Message: Removed level from persistense Removed building, floor, apartment from space Index: bprocessor.xsd =================================================================== RCS file: /cvsroot/bprocessor/model/src/etc/bprocessor.xsd,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** bprocessor.xsd 6 Nov 2007 19:00:43 -0000 1.35 --- bprocessor.xsd 8 Nov 2007 12:31:36 -0000 1.36 *************** *** 104,108 **** <xsd:attribute name="protoref" type="xsd:long" use="optional"/> <xsd:attribute name="transparent" type="xsd:boolean" use="required"/> - <xsd:attribute name="level" type="xsd:int" use="required"/> <xsd:attribute name="union" type="xsd:boolean" use="optional"/> </xsd:extension> --- 104,107 ---- |