bprocessor-commit Mailing List for B-processor (Page 121)
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...> - 2006-06-13 09:42:45
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10381/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Rearranged buttons in the toolbar Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** ToolFactory.java 12 Jun 2006 12:14:23 -0000 1.47 --- ToolFactory.java 13 Jun 2006 09:42:40 -0000 1.48 *************** *** 192,214 **** Toolbar tb = Toolbar.getInstance(); - tb.addSeparator(); selBut = this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); - this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); this.registerTool(Tool.RECT_TOOL, rect, "Brect.gif", "Rectangle"); moveBut = this.registerTool(Tool.MOVE_TOOL, move, "Biconmovetool.gif", "Move"); moveBut.addMouseListener(new MoveButtonMouseListener(moveBut)); rotBut = this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotobj.gif", "Rotation"); ! extrudBut = this.registerTool(Tool.EXTRUSION_TOOL, extrusion, ! "Biconextrudetool.gif", "Extrude"); ! clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Bclip.gif", "Clipping"); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, ! "Bicontapemes.gif", "Tape Measure"); this.registerTool(Tool.PROTRACTOR_TOOL, protractor, "Bprotrac.gif", "Protractor"); ! tb.addSeparator(); cRotBut = this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.gif", "Orbit"); --- 192,218 ---- Toolbar tb = Toolbar.getInstance(); selBut = this.registerTool(Tool.SELECT_TOOL, select, "Biconselecttool.gif", "Select"); pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); this.registerTool(Tool.RECT_TOOL, rect, "Brect.gif", "Rectangle"); + this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); + + tb.addSeparator(3); + extrudBut = this.registerTool(Tool.EXTRUSION_TOOL, extrusion, + "Biconextrudetool.gif", "Extrude"); moveBut = this.registerTool(Tool.MOVE_TOOL, move, "Biconmovetool.gif", "Move"); moveBut.addMouseListener(new MoveButtonMouseListener(moveBut)); rotBut = this.registerTool(Tool.ROTATION_TOOL, rotation, "Biconrotobj.gif", "Rotation"); ! ! tb.addSeparator(3); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, ! "Bicontapemes.gif", "Tape Measure"); this.registerTool(Tool.PROTRACTOR_TOOL, protractor, "Bprotrac.gif", "Protractor"); + clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, + "Bclip.gif", "Clipping"); ! ! tb.addSeparator(3); cRotBut = this.registerTool(Tool.CAMERA_TOOL, camera, "Biconrotcam.gif", "Orbit"); *************** *** 216,227 **** walkBut = this.registerTool(Tool.WALK_TOOL, walk, "Biconwalk.gif", "Walk"); - tb.addSeparator(); - Action zoomAction = new ToolAction(glv, 0, "Biconzomeall.gif") { ! public void actionPerformed(ActionEvent agr0) { ! Project.getInstance().getCurrentCamera().viewEntireModel(); ! this.glv.repaint(); ! } ! }; Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { --- 220,234 ---- walkBut = this.registerTool(Tool.WALK_TOOL, walk, "Biconwalk.gif", "Walk"); Action zoomAction = new ToolAction(glv, 0, "Biconzomeall.gif") { ! public void actionPerformed(ActionEvent agr0) { ! Project.getInstance().getCurrentCamera().viewEntireModel(); ! this.glv.repaint(); ! } ! }; ! ! ! Toolbar.getInstance().registerPushButtonAction(zoomAction); ! ! tb.addSeparator(10); Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { *************** *** 239,246 **** }; ! Toolbar.getInstance().registerPushButtonAction(zoomAction); ButtonGroup viewGroup = new ButtonGroup(); viewGroup.add(Toolbar.getInstance().registerAction(orthoAction)); ! viewGroup.add(Toolbar.getInstance().registerAction(perspAction)); } --- 246,255 ---- }; ! ButtonGroup viewGroup = new ButtonGroup(); + JToggleButton perspBut = Toolbar.getInstance().registerAction(perspAction); + viewGroup.add(perspBut); viewGroup.add(Toolbar.getInstance().registerAction(orthoAction)); ! perspBut.setSelected(true); } |
|
From: Michael L. <he...@us...> - 2006-06-13 09:42:43
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10381/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Rearranged buttons in the toolbar Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** View.java 6 Jun 2006 09:22:25 -0000 1.92 --- View.java 13 Jun 2006 09:42:40 -0000 1.93 *************** *** 389,403 **** Toolbar tb = Toolbar.getInstance(); ButtonGroup bg = new ButtonGroup(); ! JToggleButton but = tb.registerAction(new ViewWireframe(glv)); bg.add(but); ! but.setToolTipText("Wireframe"); but = tb.registerAction(new ViewSolid(glv)); bg.add(but); but.setToolTipText("Solid"); ! but = tb.registerAction(new ViewLighting(glv)); bg.add(but); ! but.setToolTipText("Shading"); ! but.setSelected(true); } --- 389,406 ---- Toolbar tb = Toolbar.getInstance(); + tb.addSeparator(3); ButtonGroup bg = new ButtonGroup(); ! JToggleButton but = tb.registerAction(new ViewLighting(glv)); bg.add(but); ! but.setToolTipText("Shading"); ! but.setSelected(true); but = tb.registerAction(new ViewSolid(glv)); bg.add(but); but.setToolTipText("Solid"); ! but = tb.registerAction(new ViewWireframe(glv)); bg.add(but); ! but.setToolTipText("Wireframe"); ! ! } |
|
From: Michael L. <he...@us...> - 2006-06-13 09:42:41
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10363/src/net/sourceforge/bprocessor/gui Modified Files: Toolbar.java Log Message: Rearranged buttons in the toolbar Index: Toolbar.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/Toolbar.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Toolbar.java 23 May 2006 16:43:10 -0000 1.5 --- Toolbar.java 13 Jun 2006 09:42:35 -0000 1.6 *************** *** 7,10 **** --- 7,12 ---- package net.sourceforge.bprocessor.gui; + import java.awt.Dimension; + import javax.swing.Action; import javax.swing.JToggleButton; *************** *** 71,77 **** /** * Add a separator to the toolbar */ ! public void addSeparator() { ! toolBar.addSeparator(); } } --- 73,80 ---- /** * Add a separator to the toolbar + * @param size size */ ! public void addSeparator(int size) { ! toolBar.addSeparator(new Dimension(size, 0)); } } |
|
From: rimestad <rim...@us...> - 2006-06-12 12:14:29
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18126/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Added new icons in toolFactory Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** ToolFactory.java 6 Jun 2006 09:28:04 -0000 1.46 --- ToolFactory.java 12 Jun 2006 12:14:23 -0000 1.47 *************** *** 197,202 **** pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); ! this.registerTool(Tool.ARC_TOOL, arc, "Biconarc.gif", "Arc"); ! this.registerTool(Tool.RECT_TOOL, rect, "Biconrect.gif", "Rectangle"); moveBut = this.registerTool(Tool.MOVE_TOOL, move, "Biconmovetool.gif", "Move"); moveBut.addMouseListener(new MoveButtonMouseListener(moveBut)); --- 197,202 ---- pencilBut = this.registerTool(Tool.PENCIL_TOOL, pencil, "Biconpentool.gif", "Pencil"); eraserBut = this.registerTool(Tool.ERASER_TOOL, eraser, "Biconeraser.gif", "Eraser"); ! this.registerTool(Tool.ARC_TOOL, arc, "Barc.gif", "Arc"); ! this.registerTool(Tool.RECT_TOOL, rect, "Brect.gif", "Rectangle"); moveBut = this.registerTool(Tool.MOVE_TOOL, move, "Biconmovetool.gif", "Move"); moveBut.addMouseListener(new MoveButtonMouseListener(moveBut)); *************** *** 205,212 **** "Biconextrudetool.gif", "Extrude"); clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Biconclipplane.gif", "Clipping"); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); ! this.registerTool(Tool.PROTRACTOR_TOOL, protractor, "Biconprotractor.gif", "Protractor"); tb.addSeparator(); --- 205,212 ---- "Biconextrudetool.gif", "Extrude"); clipBut = this.registerTool(Tool.CLIP_TOOL, clipplane, ! "Bclip.gif", "Clipping"); tmBut = this.registerTool(Tool.TAPE_MEASURE_TOOL, tapeMeasure, "Bicontapemes.gif", "Tape Measure"); ! this.registerTool(Tool.PROTRACTOR_TOOL, protractor, "Bprotrac.gif", "Protractor"); tb.addSeparator(); *************** *** 225,229 **** }; ! Action orthoAction = new ToolAction(glv, 0, "Biconortho.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.ORTHOGRAPHIC); --- 225,229 ---- }; ! Action orthoAction = new ToolAction(glv, 0, "Borto.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.ORTHOGRAPHIC); *************** *** 232,236 **** }; ! Action perspAction = new ToolAction(glv, 0, "Biconpersp.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.PERSPECTIVE); --- 232,236 ---- }; ! Action perspAction = new ToolAction(glv, 0, "Bpers.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.PERSPECTIVE); |
|
From: rimestad <rim...@us...> - 2006-06-12 12:14:28
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18126/src/gfx Modified Files: Biconzomeobj.gif Added Files: Barc.gif Brect.gif Bprotrac.gif Bclip.gif Bpers.gif Borto.gif Log Message: Added new icons in toolFactory --- NEW FILE: Brect.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Barc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Borto.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Bclip.gif --- (This appears to be a binary file; contents omitted.) Index: Biconzomeobj.gif =================================================================== RCS file: /cvsroot/bprocessor/gl/src/gfx/Biconzomeobj.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsHyma7M and /tmp/cvsV2agNl differ --- NEW FILE: Bprotrac.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Bpers.gif --- (This appears to be a binary file; contents omitted.) |
|
From: Nikolaj B. <nbr...@us...> - 2006-06-09 09:49:59
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25705/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Area of a surface is now calculated and displayed in attribute view. Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** Surface.java 7 Jun 2006 08:28:13 -0000 1.98 --- Surface.java 9 Jun 2006 09:49:56 -0000 1.99 *************** *** 1062,1065 **** --- 1062,1119 ---- } + + /** + * Get the area of the surface + * @return the area + */ + public double getArea() { + double area = 0; + int norm = 1; + double highest = normal().getX(); + if (Math.abs(highest) < Math.abs(normal().getY())) { + highest = normal().getY(); + norm = 2; + } + if (Math.abs(highest) < Math.abs(normal().getZ())) { + highest = normal().getZ(); + norm = 3; + } + Iterator it = getVertices().iterator(); + double firstx, firsty, prevx, prevy, thisx, thisy; + firstx = 0; + firsty = 0; + prevx = 0; + prevy = 0; + thisx = 0; + thisy = 0; + boolean first = true; + while (it.hasNext()) { + Vertex v = (Vertex) it.next(); + if (norm == 1) { + thisx = v.getY(); + thisy = v.getZ(); + } else if (norm == 2) { + thisx = v.getX(); + thisy = v.getZ(); + } else { + thisx = v.getX(); + thisy = v.getY(); + } + if (first) { + firstx = thisx; + firsty = thisy; + prevx = thisx; + prevy = thisy; + first = false; + } else { + area = area + (prevx * thisy - thisx * prevy); + } + prevx = thisx; + prevy = thisy; + } + area = Math.abs(0.5 * (area + thisx * firsty - firstx * thisy)) / Math.abs(highest); + return area; + } + /** * Returns the outward pointing normal to this Surface *************** *** 1342,1345 **** --- 1396,1400 ---- } } + res.add(new Attribute("Area", new Double(getArea()), false)); if (isInner()) { res.add(new Attribute("Exterior", getExterior(), false)); |
|
From: Michael L. <he...@us...> - 2006-06-07 08:28:19
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6828/src/net/sourceforge/bprocessor/model Modified Files: Surface.java Log Message: Fixed space assignment bug that caused surfaces to be removed from spaces in some cases where they should not be Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -d -r1.97 -r1.98 *** Surface.java 17 May 2006 12:20:39 -0000 1.97 --- Surface.java 7 Jun 2006 08:28:13 -0000 1.98 *************** *** 1007,1011 **** if (backDomain != back) { if (backDomain != null) { ! backDomain.removeSurface(this); } backDomain = back; --- 1007,1013 ---- if (backDomain != back) { if (backDomain != null) { ! if (backDomain != frontDomain) { ! backDomain.removeSurface(this); ! } } backDomain = back; *************** *** 1034,1038 **** if (frontDomain != front) { if (frontDomain != null) { ! frontDomain.removeSurface(this); } frontDomain = front; --- 1036,1042 ---- if (frontDomain != front) { if (frontDomain != null) { ! if (frontDomain != backDomain) { ! frontDomain.removeSurface(this); ! } } frontDomain = front; |
|
From: Michael L. <he...@us...> - 2006-06-07 08:22:41
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3768/src/net/sourceforge/bprocessor/model Modified Files: Geometry.java Space.java Log Message: Fixed a few bugs: - Length field apply crashed in ExtrudeTool - Deleted surfaces were added to the Void space Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Space.java 17 May 2006 17:05:45 -0000 1.36 --- Space.java 7 Jun 2006 08:22:37 -0000 1.37 *************** *** 559,568 **** if (back != null) { back.removeSurface(surface); ! surface.setBackDomain(empty); } Space front = surface.getFrontDomain(); if (front != null) { front.removeSurface(surface); ! surface.setFrontDomain(empty); } surfaces.remove(surface.getId()); --- 559,568 ---- if (back != null) { back.removeSurface(surface); ! surface.setBackDomain(null); } Space front = surface.getFrontDomain(); if (front != null) { front.removeSurface(surface); ! surface.setFrontDomain(null); } surfaces.remove(surface.getId()); Index: Geometry.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometry.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Geometry.java 5 Apr 2006 09:35:58 -0000 1.19 --- Geometry.java 7 Jun 2006 08:22:37 -0000 1.20 *************** *** 681,687 **** } if (exterior != null) { - Project.info(exterior + " contains " + surface); exterior.addHole(surface); - } { --- 681,685 ---- |
|
From: Michael L. <he...@us...> - 2006-06-07 08:22:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3754/src/net/sourceforge/bprocessor/gl/tool Modified Files: ExtrudeTool.java Log Message: Fixed a few bugs: - Length field apply crashed in ExtrudeTool - Deleted surfaces were added to the Void space Index: ExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrudeTool.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ExtrudeTool.java 3 May 2006 14:12:25 -0000 1.18 --- ExtrudeTool.java 7 Jun 2006 08:22:34 -0000 1.19 *************** *** 207,210 **** --- 207,211 ---- top = extrudeSurface.extrude(length, sides); if (extrudeAll) { + holeSides = new HashSet(); extrudeHoles(extrudeSurface, length); } |
|
From: rimestad <rim...@us...> - 2006-06-06 15:06:10
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26301/src/net/sourceforge/bprocessor/gl/tool Modified Files: ToolFactory.java Log Message: Ups should not be included multiextrudetool are not ready yet Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** ToolFactory.java 6 Jun 2006 09:22:25 -0000 1.45 --- ToolFactory.java 6 Jun 2006 09:28:04 -0000 1.46 *************** *** 183,187 **** move.setStrategy(vectorStrategy); rotation = new RotationTool(glv, pencilcursor); ! extrusion = new MultiExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasureTool(glv, pencilcursor); --- 183,187 ---- move.setStrategy(vectorStrategy); rotation = new RotationTool(glv, pencilcursor); ! extrusion = new ExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasureTool(glv, pencilcursor); |
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21461/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java MoveTool.java ToolFactory.java ClipplaneTool.java RotationTool.java SelectTool.java Log Message: Refactored clippingplanes to the model (still needs to do xml saving along with camera as well as display them on the attribute view) and changed the storing of clipping planes to the camera instead of View... Index: MoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** MoveTool.java 15 May 2006 14:55:41 -0000 1.57 --- MoveTool.java 6 Jun 2006 09:22:25 -0000 1.58 *************** *** 8,14 **** import net.sourceforge.bprocessor.gl.GLView; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.gl.model.Intersection; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; --- 8,14 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.model.Intersection; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; Index: ClipplaneTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ClipplaneTool.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ClipplaneTool.java 22 Feb 2006 09:02:45 -0000 1.6 --- ClipplaneTool.java 6 Jun 2006 09:22:25 -0000 1.7 *************** *** 8,13 **** import net.sourceforge.bprocessor.gl.GLView; ! import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; --- 8,14 ---- import net.sourceforge.bprocessor.gl.GLView; ! import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.CoordinateSystem; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 59,63 **** ClippingPlane cp = new ClippingPlane(system); ! (glv.getView()).addClippingPlane(cp); } } --- 60,67 ---- ClippingPlane cp = new ClippingPlane(system); ! if (Project.getInstance().getCurrentCamera().getClipplanes().size() < ! glv.getView().getMaxClipPlanes()) { ! Project.getInstance().getCurrentCamera().addClipplane(cp); ! } } } Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** ToolFactory.java 23 May 2006 16:41:44 -0000 1.44 --- ToolFactory.java 6 Jun 2006 09:22:25 -0000 1.45 *************** *** 183,187 **** move.setStrategy(vectorStrategy); rotation = new RotationTool(glv, pencilcursor); ! extrusion = new ExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasureTool(glv, pencilcursor); --- 183,187 ---- move.setStrategy(vectorStrategy); rotation = new RotationTool(glv, pencilcursor); ! extrusion = new MultiExtrudeTool(glv, pencilcursor); clipplane = new ClipplaneTool(glv, pencilcursor); tapeMeasure = new TapeMeasureTool(glv, pencilcursor); Index: SelectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectTool.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** SelectTool.java 22 Mar 2006 10:53:23 -0000 1.57 --- SelectTool.java 6 Jun 2006 09:22:25 -0000 1.58 *************** *** 8,15 **** import net.sourceforge.bprocessor.gl.GLView; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; --- 8,15 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.view.Transformation; import net.sourceforge.bprocessor.gl.view.View; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; *************** *** 200,204 **** vertices.add((Vertex) selected); } else if (selected instanceof ClippingPlane) { ! glv.getView().removeClippingPlane((ClippingPlane)selected); } } --- 200,204 ---- vertices.add((Vertex) selected); } else if (selected instanceof ClippingPlane) { ! Project.getInstance().getCurrentCamera().removeClipplane((ClippingPlane)selected); } } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -d -r1.69 -r1.70 *** AbstractTool.java 19 Apr 2006 16:13:54 -0000 1.69 --- AbstractTool.java 6 Jun 2006 09:22:25 -0000 1.70 *************** *** 8,11 **** --- 8,12 ---- import net.sourceforge.bprocessor.model.Camera; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; *************** *** 18,22 **** import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.gl.GLView; --- 19,22 ---- Index: RotationTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RotationTool.java 12 Mar 2006 12:33:01 -0000 1.13 --- RotationTool.java 6 Jun 2006 09:22:25 -0000 1.14 *************** *** 8,13 **** import net.sourceforge.bprocessor.gl.GLView; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; --- 8,13 ---- import net.sourceforge.bprocessor.gl.GLView; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; |
|
From: rimestad <rim...@us...> - 2006-06-06 09:22:34
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21509/src/net/sourceforge/bprocessor/model Modified Files: Camera.java Added Files: ClippingPlane.java Log Message: Refactored clippingplanes to the model (still needs to do xml saving along with camera as well as display them on the attribute view) and changed the storing of clipping planes to the camera instead of View... Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** Camera.java 23 May 2006 16:48:28 -0000 1.15 --- Camera.java 6 Jun 2006 09:22:31 -0000 1.16 *************** *** 8,11 **** --- 8,12 ---- import java.util.ArrayList; + import java.util.Collection; import java.util.Iterator; import java.util.List; *************** *** 55,58 **** --- 56,62 ---- private int type; + /** The list of clipplanes to this camera*/ + private ArrayList clipplanes; + /** * The constructor for the persistence layer *************** *** 75,78 **** --- 79,83 ---- this.roll = roll; this.focalwidth = 65; + this.clipplanes = new ArrayList(); if (type == ORTHOGRAPHIC || type == PERSPECTIVE) { this.type = type; *************** *** 503,505 **** --- 508,537 ---- return "Camera"; } + + /** + * Getter for the list of clippingplanes + * @return the list of clippingplanes + */ + public Collection getClipplanes() { + return clipplanes; + } + + /** + * Adds a clippingplane to the list of clippingplanes + * @param cp the clippingplane to add + */ + public void addClipplane(ClippingPlane cp) { + clipplanes.add(cp); + int num = clipplanes.indexOf(cp); + log.info("Got number " + num); + cp.setNumber(num); + } + + /** + * Remove the given clippingplane from the list of clippingplanes + * @param cp The clippingplane to remove + */ + public void removeClipplane(ClippingPlane cp) { + clipplanes.remove(cp); + } } --- NEW FILE: ClippingPlane.java --- //--------------------------------------------------------------------------------- // $Id: ClippingPlane.java,v 1.1 2006/06/06 09:22:31 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.util.Collection; import java.util.Iterator; import java.util.ArrayList; import java.util.Set; import java.util.HashSet; import org.apache.log4j.Logger; /** * The Clippingplane */ public class ClippingPlane extends Geometric { /** The logger */ private static Logger log = Logger.getLogger(ClippingPlane.class); /** The number clipping plane in the GL this one represents*/ private int number; /** The placement of the clippingplane */ private Plane plane; /** The coordinate sytem of the clipping plane */ private CoordinateSystem system; /** The corners */ private ArrayList corners; /** The silluet */ private ArrayList silluet; /** * The constructor * @param system The coordinatesystem the clippingplane is represented by */ public ClippingPlane(CoordinateSystem system) { this.system = system; update(); } /** * Getter for plan representing the clippingplane * @return The plane */ public Plane getPlane() { return plane; } /** * Getter for the origin * @return The origin */ public Vertex origin() { Vertex origin = origin = system.origin(); // FIXME Interning the origin to give it an ID.. // It needs an ID to be in a hashtable, but this // means that the origin point will be drawn an // clickable etc. if (origin.getId() == null) { //Project.getInstance().intern(origin); } return origin; } /** * gets the center * @return center */ public Vertex center() { return origin(); } /** * Update this clipping from the defining coordinatesystem attribute * */ public void update() { plane = system.plane(); findCorners(); } /** * Set the number clipping plane this plane represents in the GL * @param number The clipping plane number */ public void setNumber(int number) { this.number = number; } /** * Getter for the number attribute that represents the number * of the corrosponding clippingplane in GL * @return The number */ public int getNumber() { return number; } /** * Find intersections with all edges and return the vertices * @return The set of all intersection vertices */ public Collection findIntersections() { Collection edges = Project.getInstance().getEdges(); silluet = new ArrayList(); Collection res = new ArrayList(); Iterator it = edges.iterator(); while (it.hasNext()) { Edge e = (Edge)it.next(); Vertex v = plane.intersection(e); if (v != null) { res.add(v); } } Collection surfaces = Project.getInstance().getSurfaces(); it = surfaces.iterator(); while (it.hasNext()) { Surface s = (Surface)it.next(); Collection lines = s.getEdges(); Iterator iter = lines.iterator(); Vertex first = null; while (iter.hasNext()) { Edge e = (Edge)iter.next(); Vertex v = plane.intersection(e); if (v != null) { if (first == null) { first = v; } else { Edge newE = new Edge(first, v); newE.setConstructor(true); first = null; silluet.add(newE); break; } } } } return res; } /** * Find the 4 corners among intersections */ public void findCorners() { Collection c = findIntersections(); if (c.isEmpty()) { if (!corners.isEmpty()) { Vertex v1 = system.translate((Vertex)corners.get(0)); v1.setZ(0); Vertex v2 = system.translate((Vertex)corners.get(1)); v2.setZ(0); Vertex v3 = system.translate((Vertex)corners.get(2)); v3.setZ(0); Vertex v4 = system.translate((Vertex)corners.get(3)); v4.setZ(0); corners = new ArrayList(); corners.add(system.unTranslate(v1)); corners.add(system.unTranslate(v2)); corners.add(system.unTranslate(v3)); corners.add(system.unTranslate(v4)); } } else { Iterator it = c.iterator(); double minX = Integer.MAX_VALUE; double minY = Integer.MAX_VALUE; double maxX = Integer.MIN_VALUE; double maxY = Integer.MIN_VALUE; while (it.hasNext()) { Vertex v = (Vertex)it.next(); v = system.translate(v); if (v.getX() < minX) { minX = v.getX(); } if (v.getX() > maxX) { maxX = v.getX(); } if (v.getY() < minY) { minY = v.getY(); } if (v.getY() > maxY) { maxY = v.getY(); } } Vertex v1 = new Vertex(minX - 1, minY - 1, 0.0); Vertex v2 = new Vertex(minX - 1, maxY + 1, 0.0); Vertex v3 = new Vertex(maxX + 1, maxY + 1, 0.0); Vertex v4 = new Vertex(maxX + 1, minY - 1, 0.0); v1 = system.unTranslate(v1); v2 = system.unTranslate(v2); v3 = system.unTranslate(v3); v4 = system.unTranslate(v4); corners = new ArrayList(); corners.add(v1); corners.add(v2); corners.add(v3); corners.add(v4); } } /** * Getter for corners * @return The corners */ public Collection getCorners() { return corners; } /** * collects the vertices for this clipplane * @return the set of vertices */ public Set collect() { Set result = new HashSet(); result.add(origin()); return result; } /** * FIXME: empty implementation to make compile * (pfff make sure stuff compiles before you check in please) */ public void delete() { return; } /** * Makes a string representation of the clippingplane * @return The string representing til object */ public String toString() { double[] p = plane.getDoublev(); return "[" + p[0] + ", " + p[1] + ", " + p[2] + ", " + p[3] + "]"; } /** * Gettter for the intersected geometry * @return The intersection edges */ public Collection getLines() { return silluet; } } |
|
From: rimestad <rim...@us...> - 2006-06-06 09:22:34
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21461/src/net/sourceforge/bprocessor/gl/model Removed Files: ClippingPlane.java Log Message: Refactored clippingplanes to the model (still needs to do xml saving along with camera as well as display them on the attribute view) and changed the storing of clipping planes to the camera instead of View... --- ClippingPlane.java DELETED --- |
|
From: rimestad <rim...@us...> - 2006-06-06 09:22:32
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21461/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Refactored clippingplanes to the model (still needs to do xml saving along with camera as well as display them on the attribute view) and changed the storing of clipping planes to the camera instead of View... Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** View.java 18 May 2006 14:24:11 -0000 1.91 --- View.java 6 Jun 2006 09:22:25 -0000 1.92 *************** *** 9,16 **** import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.tool.SpaceTool; - import net.sourceforge.bprocessor.gl.model.ClippingPlane; import net.sourceforge.bprocessor.gl.model.Intersection; import net.sourceforge.bprocessor.gui.Toolbar; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Defaults; --- 9,16 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gl.tool.SpaceTool; import net.sourceforge.bprocessor.gl.model.Intersection; import net.sourceforge.bprocessor.gui.Toolbar; + import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.CoordinateSystem; import net.sourceforge.bprocessor.model.Defaults; *************** *** 263,269 **** /** The raster of transparent surfaces */ protected static byte[] seethrough = new byte[128]; - - /** The list of clipping planes */ - private List clippingPlanes; /** Indicating if the front space-label is selected */ --- 263,266 ---- *************** *** 294,297 **** --- 291,297 ---- private Set highligts; + /** Max number of clipplanes */ + private int maxClippingPlanes; + static { setTransparency(100); *************** *** 378,382 **** public View(GLView glv) { this.glv = glv; - clippingPlanes = new ArrayList(); bgColor = BACKGROUND_COLOR; lineColor = STD_LINE_COLOR; --- 378,381 ---- *************** *** 422,425 **** --- 421,428 ---- glu = gld.getGLU(); + int[] maxplanes = new int[1]; + gl.glGetIntegerv(GL.GL_MAX_CLIP_PLANES, maxplanes); + maxClippingPlanes = maxplanes[0]; + View.width = gld.getSize().getWidth(); View.height = gld.getSize().getHeight(); *************** *** 494,498 **** coords(); ! Iterator clipit = clippingPlanes.iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); --- 497,501 ---- coords(); ! Iterator clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); *************** *** 508,512 **** gl.glEnable(GL.GL_DEPTH_TEST); ! clipit = clippingPlanes.iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); --- 511,515 ---- gl.glEnable(GL.GL_DEPTH_TEST); ! clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); *************** *** 514,518 **** } ! clipit = clippingPlanes.iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); --- 517,521 ---- } ! clipit = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); *************** *** 1433,1437 **** if (selectMode == CLIPPLANES || selectMode == ALL) { { ! Iterator it = clippingPlanes.iterator(); while (it.hasNext()) { ClippingPlane cp = (ClippingPlane)it.next(); --- 1436,1440 ---- if (selectMode == CLIPPLANES || selectMode == ALL) { { ! Iterator it = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (it.hasNext()) { ClippingPlane cp = (ClippingPlane)it.next(); *************** *** 1440,1444 **** } { ! Iterator it = clippingPlanes.iterator(); while (it.hasNext()) { ClippingPlane cp = (ClippingPlane)it.next(); --- 1443,1447 ---- } { ! Iterator it = Project.getInstance().getCurrentCamera().getClipplanes().iterator(); while (it.hasNext()) { ClippingPlane cp = (ClippingPlane)it.next(); *************** *** 2064,2084 **** /** * Adds a clippingPlane to the view ! * @param cp The clippingPlane ! */ ! public void addClippingPlane(ClippingPlane cp) { ! int[] maxclip = new int[1]; ! gl.glGetIntegerv(GL.GL_MAX_CLIP_PLANES, maxclip); ! if (clippingPlanes.size() < maxclip[0] || maxclip[0] == 0) { ! cp.setNumber(clippingPlanes.size()); ! clippingPlanes.add(cp); ! } ! } ! ! /** ! * Remove the given clippingplane ! * @param cp The clippingplane to remove */ ! public void removeClippingPlane(ClippingPlane cp) { ! clippingPlanes.remove(cp); } --- 2067,2074 ---- /** * Adds a clippingPlane to the view ! * @return The maximum number of clipping planes in the GL */ ! public int getMaxClipPlanes() { ! return maxClippingPlanes; } |
|
From: Michael L. <he...@us...> - 2006-05-30 09:29:08
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8836/src/net/sourceforge/bprocessor/model Modified Files: Attribute.java Log Message: Improved handling of globals Index: Attribute.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Attribute.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Attribute.java 17 Mar 2006 09:30:34 -0000 1.9 --- Attribute.java 30 May 2006 09:28:57 -0000 1.10 *************** *** 7,10 **** --- 7,14 ---- package net.sourceforge.bprocessor.model; + import java.util.Iterator; + import java.util.LinkedList; + import java.util.List; + import org.apache.log4j.Logger; *************** *** 13,17 **** * shown in the attributeview in the gui */ ! public class Attribute { /** The logger */ private static Logger log = Logger.getLogger(Attribute.class); --- 17,21 ---- * shown in the attributeview in the gui */ ! public class Attribute implements Parametric { /** The logger */ private static Logger log = Logger.getLogger(Attribute.class); *************** *** 136,138 **** --- 140,178 ---- log.info(info); } + + /** + * Set attributes + * @param attributes List of attribute + */ + public void setAttributes(List attributes) { + Iterator iter = attributes.iterator(); + while (iter.hasNext()) { + Attribute a = (Attribute)iter.next(); + if (a.getName().equals("Name")) { + name = (String) a.getValue(); + } else if (a.getName().equals("Value")) { + value = a.getValue(); + } + } + Project.getInstance().changed(this); + } + + /** + * Get attributes + * @return List of attributes + */ + public List getAttributes() { + List attributes = new LinkedList(); + attributes.add(new Attribute("Name", name)); + attributes.add(new Attribute("Value", value)); + return attributes; + } + + /** + * Get general name + * @return String + */ + public String getGeneralName() { + return "Parameter"; + } } |
|
From: Michael L. <he...@us...> - 2006-05-30 09:29:06
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8867/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Improved handling of globals Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** GenericTreeView.java 24 May 2006 13:43:42 -0000 1.29 --- GenericTreeView.java 30 May 2006 09:29:02 -0000 1.30 *************** *** 38,41 **** --- 38,42 ---- import org.apache.log4j.Logger; + import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Camera; import net.sourceforge.bprocessor.model.Constraint; *************** *** 837,841 **** * ParameterBlockNode */ ! public class ParameterBlockNode extends EntityNode { /** */ private static final long serialVersionUID = 1L; --- 838,842 ---- * ParameterBlockNode */ ! public class ParameterBlockNode extends ContainerNode { /** */ private static final long serialVersionUID = 1L; *************** *** 852,855 **** --- 853,861 ---- super(object); this.name = name; + Iterator iter = object.getAttributes().iterator(); + while (iter.hasNext()) { + Attribute current = (Attribute) iter.next(); + add(new AttributeNode(current)); + } } *************** *** 864,867 **** --- 870,901 ---- /** + * AttributeNode + */ + public class AttributeNode extends EntityNode { + /** */ + private static final long serialVersionUID = 1L; + + /** Attribute */ + private Attribute attribute; + + /** + * Constructor + * @param object Attribute + */ + public AttributeNode(Attribute object) { + super(object); + attribute = object; + } + + /** + * Name + * @return String + */ + public String toString() { + return attribute.getName(); + } + } + + /** * ConstraintContainer */ *************** *** 886,889 **** --- 920,925 ---- } } + + /** * Selection Listener |
|
From: Michael L. <he...@us...> - 2006-05-30 09:29:01
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/constraints In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8836/src/net/sourceforge/bprocessor/model/constraints Modified Files: OffsetConstraint.java Log Message: Improved handling of globals Index: OffsetConstraint.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/constraints/OffsetConstraint.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** OffsetConstraint.java 16 May 2006 15:42:10 -0000 1.3 --- OffsetConstraint.java 30 May 2006 09:28:56 -0000 1.4 *************** *** 26,29 **** --- 26,30 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Parametric; + import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; *************** *** 59,66 **** ExpressionLexer lexer = new ExpressionLexer(input); ExpressionParser parser = new ExpressionParser(lexer); ! HashMap env = new HashMap(); ! env.put("pi", new Double(Math.PI)); ! env.put("e", new Double(Math.E)); ! env.put("wall", new Double(0.5)); double value = 1.0; try { --- 60,64 ---- ExpressionLexer lexer = new ExpressionLexer(input); ExpressionParser parser = new ExpressionParser(lexer); ! HashMap env = Project.getInstance().getGlobals().environment(); double value = 1.0; try { |
|
From: rimestad <rim...@us...> - 2006-05-24 19:37:46
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30959/src/net/sourceforge/bprocessor/gl/tool Modified Files: MultiExtrudeTool.java Log Message: fixed small calculation to the extrusion surface Index: MultiExtrudeTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MultiExtrudeTool.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** MultiExtrudeTool.java 15 May 2006 15:32:16 -0000 1.18 --- MultiExtrudeTool.java 24 May 2006 19:37:33 -0000 1.19 *************** *** 29,33 **** import net.sourceforge.bprocessor.model.Direction; import net.sourceforge.bprocessor.model.Edge; - import net.sourceforge.bprocessor.model.Plane; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; --- 29,32 ---- *************** *** 221,225 **** Direction d = (Direction)iter.next(); t = start.vertex().minus(d.getVertex()).dot(normal); ! log.info(d.getVertex() + " were " + t + " away"); double delta = t - to; Vertex movement = d.getDirection(); --- 220,224 ---- Direction d = (Direction)iter.next(); t = start.vertex().minus(d.getVertex()).dot(normal); ! log.info(d.getVertex() + " were " + t + " away from " + start); double delta = t - to; Vertex movement = d.getDirection(); *************** *** 241,245 **** t = start.vertex().minus(which.getVertex()).dot(normal); double delta = t - to; ! log.info(which.getVertex() + " were " + t + " away"); Vertex movement = which.getDirection(); Vertex v = movement.copy(); --- 240,244 ---- t = start.vertex().minus(which.getVertex()).dot(normal); double delta = t - to; ! log.info(which.getVertex() + " were " + t + " away from " + start); Vertex movement = which.getDirection(); Vertex v = movement.copy(); *************** *** 378,383 **** while (dirs.hasNext()) { Direction dir = (Direction)dirs.next(); ! Plane p = ((Surface)current.object()).plane(); ! Vertex v = p.intersection(dir.getVertex(), dir.getDirection()); if (v == null) { wereInside = false; --- 377,383 ---- while (dirs.hasNext()) { Direction dir = (Direction)dirs.next(); ! Surface s = (Surface)current.object(); ! Vertex v = s.intersection(new Edge(dir.getVertex(), ! dir.getDirection().minus(dir.getVertex()))); if (v == null) { wereInside = false; *************** *** 397,400 **** --- 397,401 ---- i++; } + return; } } |
|
From: Michael L. <he...@us...> - 2006-05-24 13:43:53
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29258/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java SpaceTreeView.java Log Message: Added globals to D-View and Project Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** GenericTreeView.java 17 May 2006 12:03:42 -0000 1.28 --- GenericTreeView.java 24 May 2006 13:43:42 -0000 1.29 *************** *** 44,47 **** --- 44,48 ---- import net.sourceforge.bprocessor.model.Modellor; import net.sourceforge.bprocessor.model.Observer; + import net.sourceforge.bprocessor.model.ParameterBlock; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Selection; *************** *** 446,450 **** Object object = this.getUserObject(); if (object != null) { ! AbstractAction copy = new EntityAction((Entity)object, "Copy") { public void actionPerformed(ActionEvent arg0) { if (entity != null) { --- 447,451 ---- Object object = this.getUserObject(); if (object != null) { ! AbstractAction copy = new EntityAction((Entity)object, "Duplicate") { public void actionPerformed(ActionEvent arg0) { if (entity != null) { *************** *** 462,466 **** }; pm.add(edit); ! AbstractAction flip = new EntityAction((Entity)object, "Rotate 90degrees CCW") { public void actionPerformed(ActionEvent arg0) { Space space = (Space)entity; --- 463,467 ---- }; pm.add(edit); ! AbstractAction flip = new EntityAction((Entity)object, "Rotate 90 degrees CCW") { public void actionPerformed(ActionEvent arg0) { Space space = (Space)entity; *************** *** 834,837 **** --- 835,867 ---- /** + * ParameterBlockNode + */ + public class ParameterBlockNode extends EntityNode { + /** */ + private static final long serialVersionUID = 1L; + + /** name */ + private String name; + + /** + * Constructor + * @param object ParameterBlock + * @param name String + */ + public ParameterBlockNode(String name, ParameterBlock object) { + super(object); + this.name = name; + } + + /** + * Name + * @return String + */ + public String toString() { + return name; + } + } + + /** * ConstraintContainer */ Index: SpaceTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/SpaceTreeView.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** SpaceTreeView.java 17 May 2006 12:03:42 -0000 1.10 --- SpaceTreeView.java 24 May 2006 13:43:42 -0000 1.11 *************** *** 40,46 **** Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new SpaceContainer("Functional", Project.getInstance().getConstructionSpaces())); ! root.add(new SpaceContainer("Construction", Project.getInstance().getFunctionalSpaces())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); root.add(new GeometryContainer("Geometry", Project.getInstance().world())); model.nodeStructureChanged(root); --- 40,47 ---- Object[] paths = findPaths(e); root.removeAllChildren(); ! root.add(new SpaceContainer("Construction", Project.getInstance().getConstructionSpaces())); ! root.add(new SpaceContainer("Functional", Project.getInstance().getFunctionalSpaces())); root.add(new ConstraintContainer("Constraints", Project.getInstance().getConstraints())); + root.add(new ParameterBlockNode("Globals", Project.getInstance().getGlobals())); root.add(new GeometryContainer("Geometry", Project.getInstance().world())); model.nodeStructureChanged(root); |
|
From: Michael L. <he...@us...> - 2006-05-24 13:43:53
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29250/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: Added globals to D-View and Project Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** SpaceTool.java 15 May 2006 12:08:03 -0000 1.20 --- SpaceTool.java 24 May 2006 13:43:39 -0000 1.21 *************** *** 177,192 **** ); menu.add(offsetItem); - - menu.addSeparator(); - - JMenuItem cylinderItem = new JMenuItem("Cylinder"); - cylinderItem.addActionListener(new MenuAction() { - public void actionPerformed(ActionEvent event) { - createCylinder(selection); - } - } - ); - menu.add(cylinderItem); - return menu; } --- 177,180 ---- *************** *** 448,452 **** } }); ! JMenuItem copySpaceItem = new JMenuItem("Copy Space"); copySpaceItem.addActionListener(new SpaceAction(space) { public void actionPerformed(ActionEvent arg0) { --- 436,440 ---- } }); ! JMenuItem copySpaceItem = new JMenuItem("Duplicate Space"); copySpaceItem.addActionListener(new SpaceAction(space) { public void actionPerformed(ActionEvent arg0) { *************** *** 460,464 **** }); ! JMenuItem flipSpaceItem = new JMenuItem("Rotate space 90degrees CCW"); flipSpaceItem.addActionListener(new SpaceAction(space) { public void actionPerformed(ActionEvent arg0) { --- 448,452 ---- }); ! JMenuItem flipSpaceItem = new JMenuItem("Rotate Space 90 degrees CCW"); flipSpaceItem.addActionListener(new SpaceAction(space) { public void actionPerformed(ActionEvent arg0) { *************** *** 504,508 **** menu.add(constMenu); menu.addSeparator(); ! menu.add(voidItem); menu.add(copySpaceItem); menu.add(editSpaceItem); --- 492,496 ---- menu.add(constMenu); menu.addSeparator(); ! //menu.add(voidItem); menu.add(copySpaceItem); menu.add(editSpaceItem); |
|
From: Michael L. <he...@us...> - 2006-05-24 13:43:45
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv29237/src/net/sourceforge/bprocessor/model Modified Files: Project.java Added Files: ParameterBlock.java Log Message: Added globals to D-View and Project --- NEW FILE: ParameterBlock.java --- //--------------------------------------------------------------------------------- // $Id: ParameterBlock.java,v 1.1 2006/05/24 13:43:36 henryml Exp $ // // Copyright (c) 2005 The BProcessor Team (http://bprocessor.sourceforge.net) // Released under the Lesser GNU Public License v2.1 //--------------------------------------------------------------------------------- package net.sourceforge.bprocessor.model; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; /** * ParameterBlock */ public class ParameterBlock implements Parametric { /** Parameters */ private List parameters; /** * Constructor ParameterBlock */ public ParameterBlock() { super(); parameters = new LinkedList(); } /** * setAttributes * @param attributes List of Attribute */ public void setAttributes(List attributes) { parameters = attributes; } /** * getAttributes * @return List if Attribute */ public List getAttributes() { return parameters; } /** * Put * @param key String * @param value double */ public void put(String key, double value) { parameters.add(new Attribute(key, new Double(value))); } /** * Get as environment * @return HashMap */ public HashMap environment() { HashMap env = new HashMap(); Iterator iter = parameters.iterator(); while (iter.hasNext()) { Attribute current = (Attribute) iter.next(); String key = current.getName(); Object value = current.getValue(); if (value instanceof Double) { env.put(key, value); } } return env; } /** * Name * @return String */ public String getGeneralName() { return "Parameters"; } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** Project.java 15 May 2006 10:32:10 -0000 1.57 --- Project.java 24 May 2006 13:43:36 -0000 1.58 *************** *** 50,53 **** --- 50,56 ---- private Collection constraints; + /** The globals */ + private ParameterBlock globals; + /** Has changes been made */ private boolean dirty; *************** *** 98,101 **** --- 101,106 ---- world.setId(new Long(0)); constraints = new LinkedList(); + globals = new ParameterBlock(); + globals.put("pi", Math.PI); } *************** *** 117,120 **** --- 122,142 ---- /** + * Set globals + * @param globals ParameterBlock + */ + public void setGlobals(ParameterBlock globals) { + this.globals = globals; + } + + + /** + * Get globals + * @return ParameterBlock + */ + public ParameterBlock getGlobals() { + return globals; + } + + /** * Add observer * @param observer The observer |
|
From: Nordholt <nor...@us...> - 2006-05-23 16:48:37
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv5166 Modified Files: Camera.java Log Message: fixed the view entire model method so it camera does not rotate (might rotatet 180 degrees if camera is behind the model) Index: Camera.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Camera.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Camera.java 17 May 2006 17:11:41 -0000 1.14 --- Camera.java 23 May 2006 16:48:28 -0000 1.15 *************** *** 406,420 **** double cameraDistance = maxDistance / Math.tan(Math.toRadians((this.getFocalwidth() / 2))); ! Vertex cameraPos = new Vertex(1, 1, 1); cameraPos.scale(cameraDistance / cameraPos.length()); cameraPos = cameraPos.add(modelCenter); ! setCenter(new double[] {modelCenter.getX(), modelCenter.getY(), modelCenter.getZ()}); setCamera(new double[] {cameraPos.getX(), cameraPos.getY(), ! cameraPos.getZ()}); ! setRoll(new double[] {-1, -1, 1}); ! } } --- 406,421 ---- double cameraDistance = maxDistance / Math.tan(Math.toRadians((this.getFocalwidth() / 2))); ! Vertex cameraPos = new Vertex(camera[0] - center[0], ! camera[1] - center[1], ! camera[2] - center[2]); cameraPos.scale(cameraDistance / cameraPos.length()); cameraPos = cameraPos.add(modelCenter); ! setCenter(new double[] {modelCenter.getX(), modelCenter.getY(), modelCenter.getZ()}); setCamera(new double[] {cameraPos.getX(), cameraPos.getY(), ! cameraPos.getZ()}); ! } } |
|
From: Nordholt <nor...@us...> - 2006-05-23 16:43:21
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2548 Modified Files: Toolbar.java Log Message: you can register a action as a psuh button in the toolbar Index: Toolbar.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/Toolbar.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Toolbar.java 30 Jan 2006 11:36:43 -0000 1.4 --- Toolbar.java 23 May 2006 16:43:10 -0000 1.5 *************** *** 10,13 **** --- 10,14 ---- import javax.swing.JToggleButton; import javax.swing.JPanel; + import javax.swing.JButton; import javax.swing.JToolBar; *************** *** 58,61 **** --- 59,73 ---- /** + * Register a toolbar action, with a push button. + * @param action The action + * @return The Button + */ + public JButton registerPushButtonAction(Action action) { + JButton tb = new JButton(action); + toolBar.add(tb); + return tb; + } + + /** * Add a separator to the toolbar */ |
|
From: Nordholt <nor...@us...> - 2006-05-23 16:41:48
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1709/tool Modified Files: ToolFactory.java Log Message: added icons for zoom to model, orthogonal and perspective buttons Index: ToolFactory.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ToolFactory.java,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** ToolFactory.java 17 May 2006 17:20:41 -0000 1.43 --- ToolFactory.java 23 May 2006 16:41:44 -0000 1.44 *************** *** 216,239 **** walkBut = this.registerTool(Tool.WALK_TOOL, walk, "Biconwalk.gif", "Walk"); ! tb.addSeparator(); ! Action zoomAction = new AbstractAction("Zoom to model") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().viewEntireModel(); } }; ! Action orthoAction = new AbstractAction("Orthogonal view") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.ORTHOGRAPHIC); } }; ! Action perspAction = new AbstractAction("Perspective view") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.PERSPECTIVE); } }; ! Toolbar.getInstance().registerAction(zoomAction); ButtonGroup viewGroup = new ButtonGroup(); viewGroup.add(Toolbar.getInstance().registerAction(orthoAction)); --- 216,243 ---- walkBut = this.registerTool(Tool.WALK_TOOL, walk, "Biconwalk.gif", "Walk"); ! tb.addSeparator(); ! Action zoomAction = new ToolAction(glv, 0, "Biconzomeall.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().viewEntireModel(); + this.glv.repaint(); } }; ! Action orthoAction = new ToolAction(glv, 0, "Biconortho.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.ORTHOGRAPHIC); + glv.repaint(); } }; ! ! Action perspAction = new ToolAction(glv, 0, "Biconpersp.gif") { public void actionPerformed(ActionEvent agr0) { Project.getInstance().getCurrentCamera().setType(Camera.PERSPECTIVE); + glv.repaint(); } }; ! Toolbar.getInstance().registerPushButtonAction(zoomAction); ButtonGroup viewGroup = new ButtonGroup(); viewGroup.add(Toolbar.getInstance().registerAction(orthoAction)); *************** *** 317,321 **** class ToolAction extends AbstractAction { /** glv */ ! private GLView glv; /** key */ --- 321,325 ---- class ToolAction extends AbstractAction { /** glv */ ! protected GLView glv; /** key */ |
|
From: Nordholt <nor...@us...> - 2006-05-23 16:37:19
|
Update of /cvsroot/bprocessor/gl/src/gfx In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32569 Added Files: Biconpersp.gif Biconortho.gif Log Message: adding icons persp and ortho --- NEW FILE: Biconortho.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Biconpersp.gif --- (This appears to be a binary file; contents omitted.) |