bprocessor-commit Mailing List for B-processor (Page 28)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Michael L. <he...@us...> - 2007-12-28 11:17:05
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8519/src/net/sourceforge/bprocessor/gui/attrview Modified Files: GenericPanel.java Log Message: adjusted move tool Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** GenericPanel.java 27 Dec 2007 23:14:30 -0000 1.52 --- GenericPanel.java 28 Dec 2007 11:17:09 -0000 1.53 *************** *** 8,12 **** import java.awt.BorderLayout; - import java.awt.Color; import java.awt.Dimension; import java.awt.event.ItemEvent; --- 8,11 ---- *************** *** 23,27 **** import javax.swing.JLabel; import javax.swing.JPanel; - import javax.swing.border.Border; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; --- 22,25 ---- *************** *** 68,73 **** public GenericPanel(Parametric param) { super(new BorderLayout()); - Border border = BorderFactory.createLineBorder(Color.black); - this.setBorder(border); this.content = Box.createVerticalBox(); obj = param; --- 66,69 ---- |
From: Michael L. <he...@us...> - 2007-12-28 11:17:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8347/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Display.java Log Message: adjusted move tool Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Display.java 20 Dec 2007 11:44:57 -0000 1.74 --- Display.java 28 Dec 2007 11:17:05 -0000 1.75 *************** *** 369,372 **** --- 369,407 ---- /** + * disable all clipping planes + */ + private static void disableClipplanes() { + Collection<ClippingPlane> clips = Project.getInstance().getCurrentCamera().getClipplanes(); + for (ClippingPlane current : clips) { + if (current.isActive()) { + gl.glDisable(GL.GL_CLIP_PLANE0 + current.getNumber()); + if (current.isSlice()) { + gl.glDisable(GL.GL_CLIP_PLANE5); + } + } + } + } + + /** + * Turn all clipplanes on + */ + private static void enableClipplanes() { + Collection<ClippingPlane> clips = Project.getInstance().getCurrentCamera().getClipplanes(); + for (ClippingPlane current : clips) { + if (current.isActive()) { + gl.glClipPlane(GL.GL_CLIP_PLANE0 + current.getNumber(), current.getPlane().getDoublev(), 0); + gl.glEnable(GL.GL_CLIP_PLANE0 + current.getNumber()); + if (current.isSlice()) { + gl.glClipPlane(GL.GL_CLIP_PLANE5, current.getPlane().negate().getDoublev(), 0); + gl.glEnable(GL.GL_CLIP_PLANE5); + current.getPlane().negate(); + } + } + } + } + + + + /** * Drawing methods. */ *************** *** 1069,1073 **** --- 1104,1110 ---- } if (space == active && construction()) { + disableClipplanes(); selectConstructors(constructors); + enableClipplanes(); } } else { *************** *** 1085,1093 **** if (space == active) { if (construction()) { gl.glDepthMask(false); draw(grid); gl.glDepthMask(true); paintConstructors(constructors); ! } } --- 1122,1131 ---- if (space == active) { if (construction()) { + disableClipplanes(); gl.glDepthMask(false); draw(grid); gl.glDepthMask(true); paintConstructors(constructors); ! enableClipplanes(); } } *************** *** 1188,1192 **** private static void hilite(Collection<Geometric> geometrics) { gl.glEnable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(redish, 0); gl.glLineWidth(3.0f); gl.glEnable(GL.GL_POLYGON_STIPPLE); --- 1226,1230 ---- private static void hilite(Collection<Geometric> geometrics) { gl.glEnable(GL.GL_DEPTH_TEST); ! gl.glColor3fv(View.SELECTED_COLOR, 0); gl.glLineWidth(3.0f); gl.glEnable(GL.GL_POLYGON_STIPPLE); *************** *** 1209,1213 **** Space space = (Space) current; Collection<Edge> edges = space.hiliteEdges(); ! paintEdges(edges, redish, 2.0f); } } --- 1247,1251 ---- Space space = (Space) current; Collection<Edge> edges = space.hiliteEdges(); ! paintEdges(edges, View.SELECTED_COLOR, 2.0f); } } *************** *** 1232,1236 **** } if (current.getOwner() != null) { ! paint((Vertex) current, redish, size); } else { if (targetColor != null) { --- 1270,1274 ---- } if (current.getOwner() != null) { ! paint((Vertex) current, View.SELECTED_COLOR, size); } else { if (targetColor != null) { *************** *** 1328,1332 **** Collection<Constructor> constructors = new LinkedList(); Collection<Vertex> vertices = new LinkedList(); - Collection<ClippingPlane> clips = Project.getInstance().getCurrentCamera().getClipplanes(); for (Geometric current : extras) { if (current instanceof Edge) { --- 1366,1369 ---- *************** *** 1350,1353 **** --- 1387,1392 ---- paintStippled(stippled, middleblue, 1.0f); } + + disableClipplanes(); if (selecting()) { selectConstructors(constructors); *************** *** 1355,1358 **** --- 1394,1398 ---- paintConstructors(constructors); } + enableClipplanes(); if (selecting()) { *************** *** 1373,1384 **** drawGlos(glos); } - - if (selecting()) { - // selectClips(clips); - } - } if (!selecting()) { Collection<Geometric> geometrics = new HashSet(); geometrics.addAll(Selection.primary()); --- 1413,1420 ---- drawGlos(glos); } } if (!selecting()) { + disableClipplanes(); Collection<Geometric> geometrics = new HashSet(); geometrics.addAll(Selection.primary()); *************** *** 1398,1401 **** --- 1434,1438 ---- gl.glPopMatrix(); } + enableClipplanes(); } } Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.272 retrieving revision 1.273 diff -C2 -d -r1.272 -r1.273 *** View.java 13 Dec 2007 12:00:49 -0000 1.272 --- View.java 28 Dec 2007 11:17:05 -0000 1.273 *************** *** 110,114 **** /** Used for selected objects */ ! public static final float[] SELECTED_COLOR = new float[] {1.0f, 0.4f, 1.0f}; /** Used for clipping planes */ --- 110,115 ---- /** Used for selected objects */ ! public static final float[] SELECTED_COLOR = new float[] {0.7f, 0.3f, 0.1f}; ! /** Used for clipping planes */ *************** *** 680,683 **** --- 681,685 ---- gl.glDisable(GL.GL_DEPTH_TEST); pushName(gl, current); + gl.glColor3fv(SELECTED_COLOR, 0); drawClipplane(current); popName(gl); |
From: Michael L. <he...@us...> - 2007-12-28 11:17:02
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8347/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: adjusted move tool Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** FinalMoveTool.java 20 Dec 2007 15:36:51 -0000 1.49 --- FinalMoveTool.java 28 Dec 2007 11:17:05 -0000 1.50 *************** *** 24,27 **** --- 24,28 ---- import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.gui.GUI; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Direction; *************** *** 179,182 **** --- 180,189 ---- Vertex original = originals.get(current); current.set(original.add(delta)); + current.update(); + } + for (Geometric current : geometrics) { + if (current instanceof ClippingPlane) { + current.update(); + } } } *************** *** 187,190 **** --- 194,198 ---- Vertex original = originals.get(current); current.set(original); + current.update(); } } *************** *** 501,505 **** actual.addAll(Selection.primary()); } ! activate(actual, intersection); } else { finish(); --- 509,515 ---- actual.addAll(Selection.primary()); } ! if (actual.size() > 0) { ! activate(actual, intersection); ! } } else { finish(); *************** *** 608,661 **** */ public void activate(Collection<? extends Geometric> geoms, Intersection intersection) { ! current = intersection; start = current; geometrics = (Collection<Geometric>)geoms; owner = Project.getInstance().getActiveSpace(); - for (Geometric current : geometrics) { - if (current.getOwner() != owner) { - GUI.getInstance().alert("All objects must belong to active space"); - cleanUp(); - return; - } - } - if (!geometrics.isEmpty()) { - if (copy) { - mesh = new Mesh(geometrics); - mesh = mesh.copy(new HashMap()); - geometrics = mesh.geometrics(); - Project.getInstance().getActiveSpace().addProtected(geometrics); - } else { - mesh = null; - } ! vertices = Geometry.collect(geometrics); ! mover = new VectorMove(vertices); ! ! affected = getAffected(geometrics); ! ! if (geometrics.size() == 1) { ! Geometric work = geometrics.iterator().next(); ! if (work instanceof Instance) { ! Instance space = (Instance)work; ! if (space.isInstance()) { ! CoordinateSystem anchor = null; ! for (CoordinateSystem currentSystem : space.getProto().getCoordinateSystems()) { ! anchor = currentSystem; ! break; ! } ! if (anchor == null) { ! anchor = Project.getInstance().getActiveCoordinateSystem().copy(); ! } ! mover = new InstanceMove(space, anchor); ! } } } - updateFeedback(); - setTip(secondClickTip()); - } else { - geometrics = null; } } } --- 618,658 ---- */ public void activate(Collection<? extends Geometric> geoms, Intersection intersection) { ! current = intersection.copy(); start = current; geometrics = (Collection<Geometric>)geoms; owner = Project.getInstance().getActiveSpace(); + if (copy) { + mesh = new Mesh(geometrics); + mesh = mesh.copy(new HashMap()); + geometrics = mesh.geometrics(); + Project.getInstance().getActiveSpace().addProtected(geometrics); + } else { + mesh = null; + } ! vertices = Geometry.collect(geometrics); ! mover = new VectorMove(vertices); ! ! affected = getAffected(geometrics); ! ! if (geometrics.size() == 1) { ! Geometric work = geometrics.iterator().next(); ! if (work instanceof Instance) { ! Instance space = (Instance)work; ! CoordinateSystem anchor = null; ! for (CoordinateSystem currentSystem : space.getProto().getCoordinateSystems()) { ! anchor = currentSystem; ! break; } + if (anchor == null) { + anchor = Project.getInstance().getActiveCoordinateSystem().copy(); + } + mover = new InstanceMove(space, anchor); } } + updateFeedback(); + setTip(secondClickTip()); } } |
From: Michael L. <he...@us...> - 2007-12-27 23:14:35
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13943/src/net/sourceforge/bprocessor/gui/attrview Modified Files: AttributeView.java GenericPanel.java Log Message: New icons and reorganized toolbar Index: GenericPanel.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/GenericPanel.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** GenericPanel.java 18 Dec 2007 15:06:45 -0000 1.51 --- GenericPanel.java 27 Dec 2007 23:14:30 -0000 1.52 *************** *** 8,11 **** --- 8,12 ---- import java.awt.BorderLayout; + import java.awt.Color; import java.awt.Dimension; import java.awt.event.ItemEvent; *************** *** 22,25 **** --- 23,27 ---- import javax.swing.JLabel; import javax.swing.JPanel; + import javax.swing.border.Border; import javax.swing.border.EtchedBorder; import javax.swing.border.TitledBorder; *************** *** 66,69 **** --- 68,73 ---- public GenericPanel(Parametric param) { super(new BorderLayout()); + Border border = BorderFactory.createLineBorder(Color.black); + this.setBorder(border); this.content = Box.createVerticalBox(); obj = param; Index: AttributeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/attrview/AttributeView.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** AttributeView.java 9 Dec 2007 08:26:44 -0000 1.43 --- AttributeView.java 27 Dec 2007 23:14:30 -0000 1.44 *************** *** 49,53 **** public AttributeView() { super(new BorderLayout()); ! setMinimumSize(new Dimension(140, 240)); setPreferredSize(new Dimension(275, 448)); Selection.primary().addObserver(this); --- 49,53 ---- public AttributeView() { super(new BorderLayout()); ! setMinimumSize(new Dimension(20, 240)); setPreferredSize(new Dimension(275, 448)); Selection.primary().addObserver(this); |
From: Michael L. <he...@us...> - 2007-12-27 23:14:35
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13943/src/net/sourceforge/bprocessor/gui Modified Files: Toolbar.java GUI.java Log Message: New icons and reorganized toolbar Index: Toolbar.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/Toolbar.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Toolbar.java 21 Jul 2006 15:15:01 -0000 1.7 --- Toolbar.java 27 Dec 2007 23:14:30 -0000 1.8 *************** *** 14,17 **** --- 14,18 ---- import javax.swing.JButton; import javax.swing.JToolBar; + import javax.swing.ToolTipManager; import org.apache.log4j.Logger; *************** *** 34,37 **** --- 35,39 ---- */ private Toolbar() { + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); toolBar = new JToolBar(); add(toolBar); Index: GUI.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/GUI.java,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** GUI.java 18 Dec 2007 23:19:28 -0000 1.92 --- GUI.java 27 Dec 2007 23:14:30 -0000 1.93 *************** *** 140,143 **** --- 140,145 ---- setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); instance = this; + ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); + System.out.println("enabled " + ToolTipManager.sharedInstance().isLightWeightPopupEnabled()); createMenus(); createMainView(); *************** *** 688,691 **** --- 690,695 ---- splitPaneLeftRight = new JSplitPane(); + System.out.println("divider " + splitPaneLeftRight.getDividerSize()); + splitPaneLeftRight.setDividerSize(7); splitPaneLeftRight.setRightComponent(splitPaneMiddleRight); |
From: Michael L. <he...@us...> - 2007-12-27 23:14:29
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13919/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: New icons and reorganized toolbar Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** ToolFactory.java 21 Dec 2007 12:06:55 -0000 1.101 --- ToolFactory.java 27 Dec 2007 23:14:24 -0000 1.102 *************** *** 59,139 **** private static ToolFactory factory; ! /** select tool */ ! private AbstractTool select; private AbstractTool assign; - /** Alternate Move Tool */ - private AbstractTool alternate; - - /** Alternate Move Tool */ - private AbstractTool controlled; - - /** Extrusion tool */ - private ExtrusionTool extrude; - - /** pencil tool */ private Pencil pencil; - - /** eraser tool */ private EraserTool eraser; ! ! /** arc tool */ ! private ArcTool arc; ! ! /** pencil tool */ ! private ClipplaneTool clipplane; ! ! /** rotation tool */ ! private CameraTool camera; ! ! /** Camera fly tool */ ! private CameraFlyTool fly; ! ! /** Camera walktool */ ! private CameraWalkTool walk; ! ! /** Tape measure tool */ ! private AbstractPencil tapeMeasure; ! private AbstractTool protractor; ! ! /** Constructor tool */ ! private ConstructorTool constructor; ! ! /** The previous tool */ ! private Tool previousTool; ! ! /** The current tool */ ! private Tool currentTool; ! ! /** The Offset tool */ private OffsetTool offset; ! /** The Alternative Rect tool */ ! private RectTool altRect; ! ! /** The Rotation tool */ ! private RotationTool rotation; ! /** The tool for binding constructors and geometry together */ private RelationTool relation; ! /** The tool for focusing on objects */ ! private FocusTool focusTool; ! ! /** The tool for moving alternatively */ ! private AltMoveTool altMoveTool; ! private FinalMoveTool finalMoveTool; ! ! /** The tool for moving edges alternatively */ ! private EdgeMoveTool edgeMoveTool; ! ! /** Tool for navigating in the model */ ! private PanTool panTool; ! private ZoomTool zoomTool; ! ! private ExtendTool extendTool; protected static Cursor errorCursor; --- 59,91 ---- private static ToolFactory factory; ! private Tool previousTool; ! private Tool currentTool; + private AbstractTool select; private AbstractTool assign; private Pencil pencil; private EraserTool eraser; ! private AbstractPencil ruler; private AbstractTool protractor; ! private FinalMoveTool moving; ! private RotationTool rotation; private OffsetTool offset; + private ExtrusionTool extrude; ! private RectTool rectangle; ! private ArcTool arc; ! private ExtendTool extend; ! private ConstructorTool constructor; private RelationTool relation; ! private FocusTool focus; ! private ClipplaneTool clipplane; ! private CameraTool orbit; ! private PanTool pan; ! private ZoomTool zoom; ! protected static Cursor errorCursor; *************** *** 164,176 **** Cursor rotationCursor = Toolkit.getDefaultToolkit().createCustomCursor(rotationImage, new Point(7, 8), "Rotation"); ! /*url = cl.getResource("Biconfly.gif"); ! Image flyImage = Toolkit.getDefaultToolkit().getImage(url); ! Cursor flyCursor = ! Toolkit.getDefaultToolkit().createCustomCursor(flyImage, new Point(7, 8), "Fly"); ! url = cl.getResource("Biconwalk.gif"); ! Image walkImage = Toolkit.getDefaultToolkit().getImage(url); ! Cursor walkCursor = ! Toolkit.getDefaultToolkit().createCustomCursor(walkImage, new Point(7, 8), "Walk"); ! url = cl.getResource("Bcursoradd.gif");*/ Image arrowAddImage = Toolkit.getDefaultToolkit().getImage(url); Cursor arrowAddCursor = --- 116,120 ---- Cursor rotationCursor = Toolkit.getDefaultToolkit().createCustomCursor(rotationImage, new Point(7, 8), "Rotation"); ! Image arrowAddImage = Toolkit.getDefaultToolkit().getImage(url); Cursor arrowAddCursor = *************** *** 184,187 **** --- 128,132 ---- Cursor zoomCursor = Toolkit.getDefaultToolkit().createCustomCursor(zoomImage, new Point(7, 8), "Zoom"); + select = new SelectTool(editor, null); assign = new SpaceTool(editor, null); *************** *** 191,259 **** rotation = new RotationTool(editor, null); extrude = new ExtrusionTool(editor, pencilcursor); ! extendTool = new ExtendTool(editor, pencilcursor); clipplane = new ClipplaneTool(editor, pencilcursor); ! tapeMeasure = new TapeMeasure(editor, pencilcursor); protractor = new Protractor(editor, pencilcursor); relation = new RelationTool(editor, arrowAddCursor); ! camera = new CameraTool(editor, rotationCursor); constructor = new ConstructorTool(editor, pencilcursor); offset = new OffsetTool(editor, pencilcursor); ! altRect = new RectTool(editor, pencilcursor); ! focusTool = new FocusTool(editor, null); ! finalMoveTool = new FinalMoveTool(editor, pencilcursor); ! panTool = new PanTool(editor, panCursor); ! zoomTool = new ZoomTool(editor, zoomCursor); Toolbar tb = Toolbar.getInstance(); ! JToggleButton selBut = ! this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); ! selBut.setMnemonic(KeyEvent.VK_Q); registerTool(Tool.ASSIGN_TOOL, assign, "assign-icon-3.png", "Assign"); - JToggleButton pencilBut = - this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); - pencilBut.setMnemonic(KeyEvent.VK_W); - JToggleButton rect = - this.registerTool(Tool.ALT_RECT_TOOL, altRect, "Biconaltrect.gif", "Rectangle"); - rect.setMnemonic(KeyEvent.VK_S); - JToggleButton arcb = this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); - arcb.setMnemonic(KeyEvent.VK_Z); - JToggleButton eraserBut = - this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); - eraserBut.setMnemonic(KeyEvent.VK_A); - tb.addSeparator(5); - JToggleButton offBut = - this.registerTool(Tool.OFFSET_TOOL, offset, "Biconoffset.gif", "Offset"); - JToggleButton extrudeBut = - registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); - extrudeBut.setMnemonic(KeyEvent.VK_V); - registerTool(Tool.EXTEND_TOOL, extendTool, - "Biconextrudetool2.gif", "Extend"); ! JToggleButton moveBut = ! registerTool(Tool.FINAL_MOVE_TOOL, finalMoveTool, "Bmovetool.gif", "Final Move"); ! moveBut.setMnemonic(KeyEvent.VK_M); ! JToggleButton rotationBut = ! this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotate.png", "Rotate"); ! tb.addSeparator(5); ! registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); ! registerTool(Tool.PROTRACTOR_TOOL, protractor, "Bprotrac.gif", "Protractor"); ! registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "Biconconstructor.gif", "Constructor"); ! registerTool(Tool.RELATION_TOOL, relation, "chaintool.gif", "Create relation"); ! tb.addSeparator(5); ! JToggleButton cRotBut = ! this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.png", "Orbit (Space)"); ! this.registerTool(Tool.PAN_TOOL, panTool, "Bicondrag.gif", "Pan"); ! this.registerTool(Tool.ZOOM_TOOL, zoomTool, "Biconzomeinout.gif", "Zoom in/out"); ! //flyBut = this.registerTool(Tool.FLY_TOOL, fly, "Biconfly.gif", "Fly"); ! //walkBut = this.registerTool(Tool.WALK_TOOL, walk, "Biconwalk.gif", "Walk"); ! this.registerTool(Tool.FOCUS_TOOL, focusTool, "Biconzomeselect.gif", "Focus on surface"); - JToggleButton clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, - "Bclip.gif", "Clipping"); tb.addSeparator(10); --- 136,202 ---- rotation = new RotationTool(editor, null); extrude = new ExtrusionTool(editor, pencilcursor); ! extend = new ExtendTool(editor, pencilcursor); clipplane = new ClipplaneTool(editor, pencilcursor); ! ruler = new TapeMeasure(editor, pencilcursor); protractor = new Protractor(editor, pencilcursor); relation = new RelationTool(editor, arrowAddCursor); ! orbit = new CameraTool(editor, rotationCursor); constructor = new ConstructorTool(editor, pencilcursor); offset = new OffsetTool(editor, pencilcursor); ! rectangle = new RectTool(editor, pencilcursor); ! focus = new FocusTool(editor, null); ! moving = new FinalMoveTool(editor, pencilcursor); ! pan = new PanTool(editor, panCursor); ! zoom = new ZoomTool(editor, zoomCursor); Toolbar tb = Toolbar.getInstance(); ! registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); registerTool(Tool.ASSIGN_TOOL, assign, "assign-icon-3.png", "Assign"); ! tb.addSeparator(10); ! registerTool(Tool.PENCIL_TOOL, pencil, "pen-icon.png", "Pencil"); ! registerTool(Tool.ERASER_TOOL, eraser, "eraser-icon.png", "Eraser"); ! tb.addSeparator(2); + registerTool(Tool.TAPE_MEASURE_TOOL, ruler, "ruler-icon.png", "Ruler"); + registerTool(Tool.PROTRACTOR_TOOL, protractor, "protractor-icon.png", "Protractor"); ! tb.addSeparator(2); ! ! registerTool(Tool.FINAL_MOVE_TOOL, moving, "Biconmovetool.gif", "Move"); ! registerTool(Tool.ROTATION_TOOL, rotation, "rotation-icon.png", "Rotate"); + tb.addSeparator(2); + + registerTool(Tool.OFFSET_TOOL, offset, "offset-icon.png", "Offset"); + registerTool(Tool.EXTRUSION_TOOL, extrude, "Biconextrudetool.gif", "Extrude"); + + tb.addSeparator(10); + + registerTool(Tool.ALT_RECT_TOOL, rectangle, "Biconaltrect.gif", "Rectangle"); + registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); + + tb.addSeparator(2); + + registerTool(Tool.EXTEND_TOOL, extend, "Biconextrudetool2.gif", "Extend"); + + tb.addSeparator(10); + + registerTool(Tool.CONSTRUCTOR_TOOL, constructor, "constructor-icon.png", "Constructor"); + registerTool(Tool.RELATION_TOOL, relation, "chaintool.gif", "Relate"); + + tb.addSeparator(10); + + registerTool(Tool.FOCUS_TOOL, focus, "Biconzomeselect.gif", "Focus"); + registerTool(Tool.CLIP_TOOL, clipplane, "Bclip.gif", "Section"); + + tb.addSeparator(10); + + registerTool(Tool.CAMERA_TOOL, orbit, "Biconrotcam.png", "Orbit"); + registerTool(Tool.PAN_TOOL, pan, "Bicondrag.gif", "Pan"); + registerTool(Tool.ZOOM_TOOL, zoom, "Biconzomeinout.gif", "Zoom"); tb.addSeparator(10); *************** *** 290,294 **** } }; ! Toolbar.getInstance().registerPushButtonAction(topAction, "See from above"); Action zoomAction = new ToolAction(editor, 0, "Biconzomeall.gif") { public void actionPerformed(ActionEvent agr0) { --- 233,237 ---- } }; ! Toolbar.getInstance().registerPushButtonAction(topAction, "Top"); Action zoomAction = new ToolAction(editor, 0, "Biconzomeall.gif") { public void actionPerformed(ActionEvent agr0) { *************** *** 307,311 **** ! tb.addSeparator(5); ButtonGroup viewGroup = new ButtonGroup(); JToggleButton perspBut = Toolbar.getInstance().registerAction(perspAction); --- 250,254 ---- ! tb.addSeparator(10); ButtonGroup viewGroup = new ButtonGroup(); JToggleButton perspBut = Toolbar.getInstance().registerAction(perspAction); |
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13919/src/gfx Added Files: constructor-icon.png protractor-icon.png ruler-icon.png offset-icon.png pen-icon.png eraser-icon.png rotation-icon.png Log Message: New icons and reorganized toolbar --- NEW FILE: offset-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: pen-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: eraser-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: protractor-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: rotation-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ruler-icon.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: constructor-icon.png --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-12-21 12:07:01
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12207/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: new rotate icon Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.100 retrieving revision 1.101 diff -C2 -d -r1.100 -r1.101 *** ToolFactory.java 21 Dec 2007 07:42:31 -0000 1.100 --- ToolFactory.java 21 Dec 2007 12:06:55 -0000 1.101 *************** *** 234,238 **** moveBut.setMnemonic(KeyEvent.VK_M); JToggleButton rotationBut = ! this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotaxe.gif", "Rotate"); tb.addSeparator(5); --- 234,238 ---- moveBut.setMnemonic(KeyEvent.VK_M); JToggleButton rotationBut = ! this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotate.png", "Rotate"); tb.addSeparator(5); |
From: Michael L. <he...@us...> - 2007-12-21 12:06:52
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12207/src/gfx Added Files: Biconrotate.png Log Message: new rotate icon --- NEW FILE: Biconrotate.png --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-12-21 07:42:28
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8224/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: new icon for rotate camera Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** ToolFactory.java 20 Dec 2007 20:27:32 -0000 1.99 --- ToolFactory.java 21 Dec 2007 07:42:31 -0000 1.100 *************** *** 244,248 **** JToggleButton cRotBut = ! this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.gif", "Orbit (Space)"); this.registerTool(Tool.PAN_TOOL, panTool, "Bicondrag.gif", "Pan"); this.registerTool(Tool.ZOOM_TOOL, zoomTool, "Biconzomeinout.gif", "Zoom in/out"); --- 244,248 ---- JToggleButton cRotBut = ! this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.png", "Orbit (Space)"); this.registerTool(Tool.PAN_TOOL, panTool, "Bicondrag.gif", "Pan"); this.registerTool(Tool.ZOOM_TOOL, zoomTool, "Biconzomeinout.gif", "Zoom in/out"); |
From: Michael L. <he...@us...> - 2007-12-21 07:42:28
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8224/src/gfx Added Files: Biconrotcam.png Log Message: new icon for rotate camera --- NEW FILE: Biconrotcam.png --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-12-20 20:27:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8395/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Yet another new assign icon Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** ToolFactory.java 19 Dec 2007 09:03:45 -0000 1.98 --- ToolFactory.java 20 Dec 2007 20:27:32 -0000 1.99 *************** *** 209,213 **** this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); selBut.setMnemonic(KeyEvent.VK_Q); ! registerTool(Tool.ASSIGN_TOOL, assign, "Biconassigntool2.gif", "Assign"); JToggleButton pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); --- 209,213 ---- this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); selBut.setMnemonic(KeyEvent.VK_Q); ! registerTool(Tool.ASSIGN_TOOL, assign, "assign-icon-3.png", "Assign"); JToggleButton pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); |
From: Michael L. <he...@us...> - 2007-12-20 20:27:35
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8395/src/gfx Added Files: assign-icon-3.png Log Message: Yet another new assign icon --- NEW FILE: assign-icon-3.png --- (This appears to be a binary file; contents omitted.) |
From: Michael L. <he...@us...> - 2007-12-20 15:36:53
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23937/src/net/sourceforge/bprocessor/model Modified Files: Mesh.java Container.java Log Message: Alt-move now duplicates unions and instances Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Mesh.java 20 Dec 2007 14:19:55 -0000 1.29 --- Mesh.java 20 Dec 2007 15:36:55 -0000 1.30 *************** *** 128,131 **** --- 128,132 ---- public Collection<Geometric> geometrics() { Collection<Geometric> result = new LinkedList(); + result.addAll(elements); result.addAll(surfaces); result.addAll(edges); Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Container.java 20 Dec 2007 14:19:55 -0000 1.10 --- Container.java 20 Dec 2007 15:36:55 -0000 1.11 *************** *** 890,893 **** --- 890,895 ---- } else if (geometric instanceof Vertex) { removeProtected((Vertex) geometric); + } else if (geometric instanceof Space) { + remove((Space) geometric); } } *************** *** 959,962 **** --- 961,966 ---- } else if (geometric instanceof Vertex) { addProtected((Vertex) geometric); + } else if (geometric instanceof Space) { + add((Space) geometric); } } *************** *** 1115,1118 **** --- 1119,1127 ---- Geometry.holeAnalysis(current); } + + for (Space element : mesh.elements()) { + add(element); + } + return new Mesh(surfaces, edges, vertices); } |
From: Michael L. <he...@us...> - 2007-12-20 15:36:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23928/src/net/sourceforge/bprocessor/gl/tool Modified Files: FinalMoveTool.java Log Message: Alt-move now duplicates unions and instances Index: FinalMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/FinalMoveTool.java,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** FinalMoveTool.java 20 Dec 2007 09:37:44 -0000 1.48 --- FinalMoveTool.java 20 Dec 2007 15:36:51 -0000 1.49 *************** *** 462,467 **** Vertex v = direction.copy(); v.scaleIt(i); ! Mesh copy = mesh.copyAndAssign(new HashMap()); ! for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); current.setY(current.getY() + v.getY()); --- 462,467 ---- Vertex v = direction.copy(); v.scaleIt(i); ! Mesh copy = mesh.copy(new HashMap()); ! for (Vertex current : Geometry.collect(copy.geometrics())) { current.setX(current.getX() + v.getX()); current.setY(current.getY() + v.getY()); *************** *** 477,482 **** v.scaleIt(d / v.length()); ! Mesh copy = mesh.copyAndAssign(new HashMap()); ! for (Vertex current : copy.vertices()) { current.setX(current.getX() + v.getX()); current.setY(current.getY() + v.getY()); --- 477,482 ---- v.scaleIt(d / v.length()); ! Mesh copy = mesh.copy(new HashMap()); ! for (Vertex current : Geometry.collect(copy.geometrics())) { current.setX(current.getX() + v.getX()); current.setY(current.getY() + v.getY()); *************** *** 623,627 **** if (copy) { mesh = new Mesh(geometrics); ! mesh = mesh.copyAndAssign(new HashMap()); geometrics = mesh.geometrics(); Project.getInstance().getActiveSpace().addProtected(geometrics); --- 623,627 ---- if (copy) { mesh = new Mesh(geometrics); ! mesh = mesh.copy(new HashMap()); geometrics = mesh.geometrics(); Project.getInstance().getActiveSpace().addProtected(geometrics); |
From: Michael L. <he...@us...> - 2007-12-20 14:19:52
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26410/src/net/sourceforge/bprocessor/model Modified Files: Instance.java Space.java Mesh.java Entity.java Container.java Log Message: Mesh.copy now works with instances Index: Instance.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Instance.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Instance.java 19 Dec 2007 11:39:04 -0000 1.7 --- Instance.java 20 Dec 2007 14:19:55 -0000 1.8 *************** *** 121,123 **** --- 121,141 ---- return edges; } + + /** + * {@inheritDoc} + */ + public Space shallowCopy() { + Instance copy = new Instance(name); + copy.classification = classification; + copy.container = container; + copy.description = description; + copy.isNet = isNet; + copy.isUnion = isUnion; + copy.transparent = transparent; + copy.type = type; + copy.anchor = anchor.copy(); + copy.proto = proto; + return copy; + } + } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.230 retrieving revision 1.231 diff -C2 -d -r1.230 -r1.231 *** Space.java 18 Dec 2007 08:02:53 -0000 1.230 --- Space.java 20 Dec 2007 14:19:55 -0000 1.231 *************** *** 16,19 **** --- 16,20 ---- import java.util.LinkedList; import java.util.List; + import java.util.Map; import java.util.Set; *************** *** 648,662 **** * @return new space */ ! public Container shallowCopy() { ! Container copy = new Container(); ! copy.classification = classification; ! copy.container = container; ! copy.description = description; ! copy.name = name; ! copy.isNet = isNet; ! copy.isUnion = isUnion; ! copy.transparent = transparent; ! copy.type = type; ! return copy; } --- 649,662 ---- * @return new space */ ! public Space shallowCopy() { ! return null; ! } ! ! /** ! * ! * @param map map ! * @param to to ! */ ! public void copyInterior(Map map, Space to) { } Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Mesh.java 20 Dec 2007 12:26:24 -0000 1.28 --- Mesh.java 20 Dec 2007 14:19:55 -0000 1.29 *************** *** 9,13 **** import java.util.Collection; - import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; --- 9,12 ---- *************** *** 22,26 **** private Collection<Edge> edges; private Collection<Surface> surfaces; ! private Collection<Container> elements; /** --- 21,25 ---- private Collection<Edge> edges; private Collection<Surface> surfaces; ! private Collection<Space> elements; /** *************** *** 53,57 **** * @param vertices Collection of vertices */ ! public Mesh(Collection<Container> elements, Collection<Surface> surfaces, Collection<Edge> edges, --- 52,56 ---- * @param vertices Collection of vertices */ ! public Mesh(Collection<Space> elements, Collection<Surface> surfaces, Collection<Edge> edges, *************** *** 71,78 **** Collection<Edge> edges = new HashSet<Edge>(); Collection<Surface> surfaces = new HashSet<Surface>(); ! Collection<Container> elements = new HashSet<Container>(); for (Geometric current : geometrics) { ! if (current instanceof Container) { ! elements.add((Container) current); } else if (current instanceof Surface) { surfaces.add((Surface) current); --- 70,77 ---- Collection<Edge> edges = new HashSet<Edge>(); Collection<Surface> surfaces = new HashSet<Surface>(); ! Collection<Space> elements = new HashSet<Space>(); for (Geometric current : geometrics) { ! if (current instanceof Space) { ! elements.add((Space) current); } else if (current instanceof Surface) { surfaces.add((Surface) current); *************** *** 119,123 **** * @return elements */ ! public Collection<Container> elements() { return elements; } --- 118,122 ---- * @return elements */ ! public Collection<Space> elements() { return elements; } *************** *** 146,157 **** } - private static HashMap map(Collection<? extends Entity> entities) { - HashMap map = new HashMap(); - for (Entity current : entities) { - map.put(current.getId(), current); - } - return map; - } - /** * @param owner Container --- 145,148 ---- *************** *** 294,299 **** public Mesh copy(Map map) { Mesh copy = copyGeometry(map); ! for (Container current : elements) { ! Container shallow = current.shallowCopy(); map.put(current, shallow); copy.elements().add(shallow); --- 285,290 ---- public Mesh copy(Map map) { Mesh copy = copyGeometry(map); ! for (Space current : elements) { ! Space shallow = current.shallowCopy(); map.put(current, shallow); copy.elements().add(shallow); *************** *** 316,328 **** } } ! for (Container current : elements) { ! Container container = (Container) map.get(current); ! Mesh mesh = current.mesh().copy(map); ! mesh.identify(container); ! container.setElements(map(mesh.elements)); ! container.setSurfaces(map(mesh.surfaces)); ! container.setEdges(map(mesh.edges)); ! container.setVertices(map(mesh.vertices)); ! container.setEmpty((Container) map.get(current.empty)); } return copy; --- 307,313 ---- } } ! for (Space current : elements) { ! Space to = (Space) map.get(current); ! current.copyInterior(map, to); } return copy; Index: Entity.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Entity.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Entity.java 19 Oct 2007 12:11:34 -0000 1.22 --- Entity.java 20 Dec 2007 14:19:55 -0000 1.23 *************** *** 11,16 **** --- 11,18 ---- import java.util.Collections; import java.util.Comparator; + import java.util.HashMap; import java.util.Iterator; import java.util.List; + import java.util.Map; import org.apache.log4j.Logger; *************** *** 86,89 **** --- 88,104 ---- Collections.sort(entities, comparator); } + + /** + * Returns a map of the specified entities + * @param entities collection of entities + * @return map binding ids to entities + */ + public static Map<Long, ? extends Entity> asMap(Collection<? extends Entity> entities) { + HashMap map = new HashMap(); + for (Entity current : entities) { + map.put(current.getId(), current); + } + return map; + } /** Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Container.java 20 Dec 2007 10:24:18 -0000 1.9 --- Container.java 20 Dec 2007 14:19:55 -0000 1.10 *************** *** 1446,1450 **** */ public Mesh mesh() { ! Collection<Container> elements = (Collection) getElements(); Collection<Surface> surfaces = getSurfaces(); Collection<Edge> edges = getEdges(); --- 1446,1450 ---- */ public Mesh mesh() { ! Collection<Space> elements = (Collection) getElements(); Collection<Surface> surfaces = getSurfaces(); Collection<Edge> edges = getEdges(); *************** *** 1452,1454 **** --- 1452,1486 ---- return new Mesh(elements, surfaces, edges, vertices); } + /** + * {@inheritDoc} + */ + public Space shallowCopy() { + Container copy = new Container(); + copy.classification = classification; + copy.container = container; + copy.description = description; + copy.name = name; + copy.isNet = isNet; + copy.isUnion = isUnion; + copy.transparent = transparent; + copy.type = type; + return copy; + } + + /** + * + * @param map map + * @param to to + */ + public void copyInterior(Map map, Space to) { + Container container = (Container) to; + Mesh mesh = mesh().copy(map); + mesh.identify(container); + container.setElements((HashMap) Entity.asMap(mesh.elements())); + container.setSurfaces((HashMap) Entity.asMap(mesh.surfaces())); + container.setEdges((HashMap) Entity.asMap(mesh.edges())); + container.setVertices((HashMap) Entity.asMap(mesh.vertices())); + container.setEmpty((Container) map.get(empty)); + } + } |
From: Michael L. <he...@us...> - 2007-12-20 14:19:47
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26402/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Mesh.copy now works with instances Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PopupMenu.java 20 Dec 2007 11:43:57 -0000 1.4 --- PopupMenu.java 20 Dec 2007 14:19:51 -0000 1.5 *************** *** 48,51 **** --- 48,52 ---- import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; + import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.SurfaceAnalysis; *************** *** 507,511 **** union.add(current); } ! for (Container current : copy.elements()) { union.add(current); } --- 508,512 ---- union.add(current); } ! for (Space current : copy.elements()) { union.add(current); } |
From: Michael L. <he...@us...> - 2007-12-20 12:51:06
|
Update of /cvsroot/bprocessor/gui/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv24151/src/gfx Modified Files: Biconassigntool2.gif Log Message: Yet another assign tool icon Index: Biconassigntool2.gif =================================================================== RCS file: /cvsroot/bprocessor/gui/src/gfx/Biconassigntool2.gif,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 Binary files /tmp/cvsjigfGz and /tmp/cvsTzgfO1 differ |
From: Michael L. <he...@us...> - 2007-12-20 12:26:24
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv14720/src/net/sourceforge/bprocessor/model Modified Files: Mesh.java Log Message: Improved copy Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Mesh.java 20 Dec 2007 10:24:18 -0000 1.27 --- Mesh.java 20 Dec 2007 12:26:24 -0000 1.28 *************** *** 9,12 **** --- 9,13 ---- import java.util.Collection; + import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; *************** *** 134,153 **** } ! /** ! * ! */ ! public void identify() { long count = 1; ! for (Edge current : edges) { if (current.id == null) { current.setId(Long.valueOf(count++)); } } ! count = 1; ! for (Vertex current : vertices) { ! if (current.id == null) { ! current.setId(Long.valueOf(count++)); ! } } } --- 135,165 ---- } ! ! private static void identify(Container owner, Collection<? extends Geometric> geometrics) { long count = 1; ! for (Geometric current : geometrics) { if (current.id == null) { + current.setOwner(owner); current.setId(Long.valueOf(count++)); } } ! } ! ! private static HashMap map(Collection<? extends Entity> entities) { ! HashMap map = new HashMap(); ! for (Entity current : entities) { ! map.put(current.getId(), current); } + return map; + } + + /** + * @param owner Container + */ + public void identify(Container owner) { + identify(owner, elements); + identify(owner, surfaces); + identify(owner, edges); + identify(owner, vertices); } *************** *** 307,323 **** Container container = (Container) map.get(current); Mesh mesh = current.mesh().copy(map); ! for (Space e : mesh.elements) { ! container.add(e); ! } ! for (Surface s : mesh.surfaces) { ! container.add(s); ! } ! for (Edge e : mesh.edges) { ! container.add(e); ! } ! for (Vertex v : mesh.vertices) { ! container.add(v); ! } ! } return copy; --- 319,328 ---- Container container = (Container) map.get(current); Mesh mesh = current.mesh().copy(map); ! mesh.identify(container); ! container.setElements(map(mesh.elements)); ! container.setSurfaces(map(mesh.surfaces)); ! container.setEdges(map(mesh.edges)); ! container.setVertices(map(mesh.vertices)); ! container.setEmpty((Container) map.get(current.empty)); } return copy; |
From: rimestad <rim...@us...> - 2007-12-20 11:44:59
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31116/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractPencil.java Log Message: changed visuals for constructors Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** AbstractPencil.java 18 Dec 2007 23:41:36 -0000 1.103 --- AbstractPencil.java 20 Dec 2007 11:44:57 -0000 1.104 *************** *** 461,469 **** CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); if (start != null) { ! constructors.add(cs.copy(start.vertex().copy())); } if (incident != null) { if (start == null || (!start.equalEps(incident))) { ! constructors.add(cs.copy(incident.vertex().copy())); } } --- 461,475 ---- CoordinateSystem cs = Project.getInstance().getActiveCoordinateSystem(); if (start != null) { ! CoordinateSystem startCS = cs.copy(start.vertex().copy()); ! startCS.setEditable(false); ! startCS.setActive(true); ! constructors.add(startCS); } if (incident != null) { if (start == null || (!start.equalEps(incident))) { ! CoordinateSystem incidentCS = cs.copy(incident.vertex().copy()); ! incidentCS.setEditable(false); ! incidentCS.setActive(true); ! constructors.add(incidentCS); } } |
From: rimestad <rim...@us...> - 2007-12-20 11:44:59
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31116/src/net/sourceforge/bprocessor/gl/view Modified Files: Display.java Log Message: changed visuals for constructors Index: Display.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/Display.java,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** Display.java 18 Dec 2007 13:11:14 -0000 1.73 --- Display.java 20 Dec 2007 11:44:57 -0000 1.74 *************** *** 81,84 **** --- 81,85 ---- private static float[] black = new float[] {0.0f, 0.0f, 0.0f}; private static float[] grey = new float[] {0.8f, 0.8f, 0.8f}; + private static float[] darkgrey = new float[] {0.4f, 0.4f, 0.4f}; private static float[] blueish = new float[] {0.1f, 0.2f, 0.5f}; private static float[] redish = new float[] {0.5f, 0.2f, 0.1f}; *************** *** 669,681 **** Vertex j = system.getJ(); Vertex n = system.getN(); ! Line xaxis = new Line(origin, i); ! xaxis.setEditable(system.isEditable()); ! Line yaxis = new Line(origin, j); ! yaxis.setEditable(system.isEditable()); ! Line zaxis = new Line(origin, n); ! zaxis.setEditable(system.isEditable()); ! paint(xaxis, red); ! paint(yaxis, green); ! paint(zaxis, blue); } --- 670,685 ---- Vertex j = system.getJ(); Vertex n = system.getN(); ! Line xaxis = new Line(origin, i, system.isActive(), system.isEditable()); ! Line yaxis = new Line(origin, j, system.isActive(), system.isEditable()); ! Line zaxis = new Line(origin, n, system.isActive(), system.isEditable()); ! if (system.isActive()) { ! paint(xaxis, red); ! paint(yaxis, green); ! paint(zaxis, blue); ! } else { ! paint(xaxis, darkgrey); ! paint(yaxis, darkgrey); ! paint(zaxis, darkgrey); ! } } *************** *** 685,694 **** Vertex j = system.getJ(); Vertex n = system.getN(); ! Line xaxis = new Line(origin, i); ! xaxis.setEditable(system.isEditable()); ! Line yaxis = new Line(origin, j); ! yaxis.setEditable(system.isEditable()); ! Line zaxis = new Line(origin, n); ! zaxis.setEditable(system.isEditable()); draw(xaxis); --- 689,695 ---- Vertex j = system.getJ(); Vertex n = system.getN(); ! Line xaxis = new Line(origin, i, system.isActive(), system.isEditable()); ! Line yaxis = new Line(origin, j, system.isActive(), system.isEditable()); ! Line zaxis = new Line(origin, n, system.isActive(), system.isEditable()); draw(xaxis); *************** *** 708,716 **** private static void draw(Line line) { Edge edge = line.edge(grid.size()); ! ! gl.glDepthMask(false); draw(edge); ! gl.glDepthMask(true); ! if (line.isEditable()) { Vertex from = line.getOrigin(); --- 709,717 ---- private static void draw(Line line) { Edge edge = line.edge(grid.size()); ! ! //gl.glDepthMask(false); draw(edge); ! //gl.glDepthMask(true); ! if (line.isEditable()) { Vertex from = line.getOrigin(); |
From: rimestad <rim...@us...> - 2007-12-20 11:44:40
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31107/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectTool.java Log Message: dont show empty menu Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** SelectTool.java 18 Dec 2007 23:19:33 -0000 1.71 --- SelectTool.java 20 Dec 2007 11:44:40 -0000 1.72 *************** *** 97,101 **** } } ! if (menu != null) { editor.popup(menu, event.getX(), event.getY()); } --- 97,101 ---- } } ! if (menu != null && menu.getComponentCount() > 0) { editor.popup(menu, event.getX(), event.getY()); } |
From: rimestad <rim...@us...> - 2007-12-20 11:44:24
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30701/src/net/sourceforge/bprocessor/gl/view Modified Files: PopupMenu.java Log Message: Removed dead code Index: PopupMenu.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/PopupMenu.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PopupMenu.java 20 Dec 2007 09:37:43 -0000 1.3 --- PopupMenu.java 20 Dec 2007 11:43:57 -0000 1.4 *************** *** 846,855 **** return menuFor(c); } - - - - /** {@inheritDoc} */ - public JPopupMenu menuFor(Attribute attribute) { - return getAttributeMenu(attribute); - } } --- 846,848 ---- |
From: Michael L. <he...@us...> - 2007-12-20 10:42:25
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4354/src/net/sourceforge/bprocessor/gl Modified Files: Editor.java Log Message: Multi is default Index: Editor.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/Editor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Editor.java 20 Dec 2007 09:37:44 -0000 1.12 --- Editor.java 20 Dec 2007 10:42:10 -0000 1.13 *************** *** 66,70 **** * */ ! private static boolean multi; /** GL canvas */ --- 66,70 ---- * */ ! private static boolean multi = true; /** GL canvas */ |
From: Michael L. <he...@us...> - 2007-12-20 10:24:21
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29621/src/net/sourceforge/bprocessor/model Modified Files: Mesh.java Container.java Log Message: improvement to copy, but not done Index: Mesh.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Mesh.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Mesh.java 13 Dec 2007 12:00:32 -0000 1.26 --- Mesh.java 20 Dec 2007 10:24:18 -0000 1.27 *************** *** 304,307 **** --- 304,324 ---- } } + for (Container current : elements) { + Container container = (Container) map.get(current); + Mesh mesh = current.mesh().copy(map); + for (Space e : mesh.elements) { + container.add(e); + } + for (Surface s : mesh.surfaces) { + container.add(s); + } + for (Edge e : mesh.edges) { + container.add(e); + } + for (Vertex v : mesh.vertices) { + container.add(v); + } + + } return copy; } Index: Container.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Container.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Container.java 19 Dec 2007 11:39:04 -0000 1.8 --- Container.java 20 Dec 2007 10:24:18 -0000 1.9 *************** *** 58,62 **** --- 58,65 ---- public Container() { super(); + container = true; initializeContainers(); + empty = new Container("Void", FUNCTIONAL, false); + ((Container) this).add(empty); } *************** *** 1437,1439 **** --- 1440,1454 ---- return edges; } + + /** + * + * @return mesh + */ + public Mesh mesh() { + Collection<Container> elements = (Collection) getElements(); + Collection<Surface> surfaces = getSurfaces(); + Collection<Edge> edges = getEdges(); + Collection<Vertex> vertices = getVertices(); + return new Mesh(elements, surfaces, edges, vertices); + } } |