bprocessor-commit Mailing List for B-processor (Page 112)
Status: Pre-Alpha
Brought to you by:
henryml
You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(117) |
Aug
(151) |
Sep
(157) |
Oct
(81) |
Nov
(117) |
Dec
(119) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(183) |
Feb
(130) |
Mar
(117) |
Apr
(61) |
May
(82) |
Jun
(45) |
Jul
(149) |
Aug
(173) |
Sep
(199) |
Oct
(165) |
Nov
(107) |
Dec
(137) |
2007 |
Jan
(124) |
Feb
(58) |
Mar
(123) |
Apr
(80) |
May
(130) |
Jun
(64) |
Jul
(31) |
Aug
(42) |
Sep
(114) |
Oct
(167) |
Nov
(239) |
Dec
(200) |
2008 |
Jan
(43) |
Feb
(43) |
Mar
(4) |
Apr
(9) |
May
(5) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(13) |
Oct
(9) |
Nov
(12) |
Dec
|
2009 |
Jan
|
Feb
(20) |
Mar
(7) |
Apr
(12) |
May
(34) |
Jun
(72) |
Jul
|
Aug
(3) |
Sep
(31) |
Oct
(2) |
Nov
(8) |
Dec
(4) |
2010 |
Jan
(5) |
Feb
(32) |
Mar
(8) |
Apr
(7) |
May
(36) |
Jun
|
Jul
(11) |
Aug
(15) |
Sep
(7) |
Oct
(2) |
Nov
(13) |
Dec
(80) |
2011 |
Jan
|
Feb
|
Mar
(8) |
Apr
(12) |
May
(32) |
Jun
(9) |
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(8) |
2012 |
Jan
|
Feb
|
Mar
(3) |
Apr
(5) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(22) |
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: rimestad <rim...@us...> - 2006-08-10 13:14:23
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21923/src/net/sourceforge/bprocessor/gl/tool Modified Files: RectTool.java Log Message: fixed a problem with dragging when finishing the rectangle Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** RectTool.java 9 Aug 2006 16:14:20 -0000 1.13 --- RectTool.java 10 Aug 2006 13:14:21 -0000 1.14 *************** *** 177,181 **** */ protected void released(MouseEvent e) { ! if (dragging) { pressed(e); dragging = false; --- 177,181 ---- */ protected void released(MouseEvent e) { ! if (dragging && start != null) { pressed(e); dragging = false; |
From: rimestad <rim...@us...> - 2006-08-10 13:13:38
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21559/src/net/sourceforge/bprocessor/gl/tool Modified Files: SpaceTool.java Log Message: made own package for modellors and made them appear in the popupmenu in databaseview Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** SpaceTool.java 9 Aug 2006 15:15:03 -0000 1.24 --- SpaceTool.java 10 Aug 2006 13:13:35 -0000 1.25 *************** *** 30,35 **** import net.sourceforge.bprocessor.model.Constructor; import net.sourceforge.bprocessor.model.Edge; - import net.sourceforge.bprocessor.model.LayerModellor; - import net.sourceforge.bprocessor.model.Modellor; import net.sourceforge.bprocessor.model.Project; import net.sourceforge.bprocessor.model.Space; --- 30,33 ---- *************** *** 38,41 **** --- 36,41 ---- import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.constraints.OffsetConstraint; + import net.sourceforge.bprocessor.model.modellor.LayerModellor; + import net.sourceforge.bprocessor.model.modellor.Modellor; /** *************** *** 320,323 **** --- 320,329 ---- return null; } + + /** @see net.sourceforge.bprocessor.model.modellor.Modellor#newInstance(Space) */ + public Modellor newInstance(Space s) { + // TODO Auto-generated method stub + return null; + } } |
From: rimestad <rim...@us...> - 2006-08-10 13:13:34
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21548/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: made own package for modellors and made them appear in the popupmenu in databaseview Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** GenericTreeView.java 9 Aug 2006 18:14:09 -0000 1.34 --- GenericTreeView.java 10 Aug 2006 13:13:32 -0000 1.35 *************** *** 25,28 **** --- 25,29 ---- import javax.swing.ImageIcon; + import javax.swing.JOptionPane; import javax.swing.JPopupMenu; import javax.swing.JTree; *************** *** 44,48 **** import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; - import net.sourceforge.bprocessor.model.Modellor; import net.sourceforge.bprocessor.model.Observer; import net.sourceforge.bprocessor.model.ParameterBlock; --- 45,48 ---- *************** *** 53,56 **** --- 53,57 ---- import net.sourceforge.bprocessor.model.Vertex; import net.sourceforge.bprocessor.model.Geometry; + import net.sourceforge.bprocessor.model.modellor.Modellor; import net.sourceforge.bprocessor.gui.GUI; *************** *** 407,410 **** --- 408,428 ---- /** + * Actions for a entity + */ + public abstract class EntityModellorAction extends EntityAction { + /** The modellor number */ + protected Modellor which; + /** + * The constructor + * @param ent the entity + * @param m the modellor object + */ + public EntityModellorAction(Entity ent, Modellor m) { + super(ent, m.getName()); + this.which = m; + } + } + + /** * SpaceNode */ *************** *** 493,496 **** --- 511,538 ---- }; pm.add(flip); + // Adding all modellors + Collection c = Modellor.getRegisteredModellors(); + Iterator iter = c.iterator(); + while (iter.hasNext()) { + Modellor m = (Modellor)iter.next(); + AbstractAction modellor = new EntityModellorAction((Entity)object, m) { + public void actionPerformed(ActionEvent arg0) { + Space current = (Space)entity; + Modellor created = which.newInstance(current); + if (created != null) { + current.setModellor(created); + Selection.primary().clear(); + Selection.primary().add(created); + current.changed(); + } else { + JOptionPane.showMessageDialog( + null, + "The chosen space havn't been assigned to any surface", + "No envolope surface error", JOptionPane.ERROR_MESSAGE); + } + } + }; + pm.add(modellor); + } } return pm; |
From: rimestad <rim...@us...> - 2006-08-10 13:13:31
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21531/src/net/sourceforge/bprocessor/model/modellor Added Files: Modellor.java package.html LayerModellor.java Log Message: made own package for modellors and made them appear in the popupmenu in databaseview --- NEW FILE: package.html --- <body> Defines the package that contains the modellor in the model </body> --- NEW FILE: LayerModellor.java --- //--------------------------------------------------------------------------------- // $Id: LayerModellor.java,v 1.1 2006/08/10 13:13:26 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.modellor; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Set; import net.sourceforge.bprocessor.model.Attribute; import net.sourceforge.bprocessor.model.Space; import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; /** * Modellor */ public class LayerModellor extends Modellor { /** Default */ private static final long serialVersionUID = 1L; /** The default layer thickness */ private static final double STD_THICKNESS = 0.3; /** The space */ private Space space; /** The surface */ private Surface surface; /** The distance */ private double distance; /** * Constructor for LayerModellor * @param space The space to contain the layer * @param surface The surface to extrude * @param distance The distance of the xtrusion */ public LayerModellor(Space space, Surface surface, double distance) { super(); this.space = space; this.surface = surface; this.distance = distance; } /** * Empty Constructor */ public LayerModellor() { // TODO Auto-generated constructor stub } /** * Update the geometry. * @param entity The changed entity */ public void update(Object entity) { space.clear(); Surface bottom = surface.copy(space); if (surface.getBackDomain() == space) { bottom.flip(); } for (int i = 0; i < 3; i++) { Set sides = new HashSet(); bottom = bottom.extrude(distance, sides); bottom.flip(); } } /** * Return null as center * @return Null */ public Vertex center() { return null; } /** * Return name * @return Name */ public String getName() { return "Layer Modellor"; } /** * Set attributes * @param attributes The attributes */ public void setAttributes(List attributes) { Iterator iter = attributes.iterator(); while (iter.hasNext()) { Attribute current = (Attribute) iter.next(); if (current.getName().equals("Thickness")) { Double thickness = (Double) current.getValue(); distance = thickness.doubleValue(); space.changed(); } else if (current.getName().equals("Surface")) { Iterator it = space.getEnvelope().iterator(); Surface chosen = null; while (it.hasNext()) { Surface cur = (Surface)it.next(); if (cur.getName().equalsIgnoreCase((String)current.getValue())) { chosen = cur; } } if (chosen != null) { surface = chosen; } } } } /** * Get attributes * @return The attributes */ public List getAttributes() { LinkedList attributes = new LinkedList(); attributes.add(new Attribute("Name", "Layer 1")); attributes.add(new Attribute("Classification", "?")); attributes.add(new Attribute("Specification", "?")); attributes.add(new Attribute("Surface", surface.getName())); attributes.add(new Attribute("Thickness", new Double(distance))); attributes.add(new Attribute("Top Offset", new Double(0))); attributes.add(new Attribute("Bottom Offset", new Double(0))); return attributes; } /** * Delete the entity */ public void delete() { space.clear(); } /** @see net.sourceforge.bprocessor.model.modellor.Modellor#newInstance(Space) */ public Modellor newInstance(Space s) { Iterator iter = s.getEnvelope().iterator(); if (iter.hasNext()) { Surface sur = (Surface)iter.next(); return new LayerModellor(s, sur, STD_THICKNESS); } else { return null; } } } --- NEW FILE: Modellor.java --- //--------------------------------------------------------------------------------- // $Id: Modellor.java,v 1.1 2006/08/10 13:13:25 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.modellor; import java.util.Collection; import java.util.LinkedList; import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Observer; import net.sourceforge.bprocessor.model.Parametric; import net.sourceforge.bprocessor.model.Space; /** * The modellor interface, can generate surfaces from parameters * established at the creation of the Modellor. */ public abstract class Modellor extends Entity implements Observer, Parametric { /** The registered modellors */ private static LinkedList modellors; static { modellors = new LinkedList(); } /** * Register a modellor to the possible choices of modellors * @param m The modellor */ public static void registerModellor(Modellor m) { modellors.add(m); } /** * Return a list of all the registered modellors * @return A collection of the modellors */ public static Collection getRegisteredModellors() { return modellors; } /** * Remove all registered modellors */ public static void clearModellors() { modellors.clear(); } /** * De-register a modellor from the system * @param m The modellor to remove from the registry * @return True if it succedes */ public static boolean removeModellor(Modellor m) { return modellors.remove(m); } /** * Generate a list of surfaces. * @param entity Changed entity */ public abstract void update(Object entity); /** * @see net.sourceforge.bprocessor.model.Parametric#getGeneralName() */ public String getGeneralName() { return "Modellor"; } /** * Create a new instance of the modellor, based on a space * @param s The space the modellor should reside in * @return The created modellor object for the given space */ public abstract Modellor newInstance(Space s); } |
From: rimestad <rim...@us...> - 2006-08-10 13:13:28
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21531/src/net/sourceforge/bprocessor/model Modified Files: Space.java Project.java Removed Files: Modellor.java LayerModellor.java Log Message: made own package for modellors and made them appear in the popupmenu in databaseview --- Modellor.java DELETED --- Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** Space.java 8 Aug 2006 15:15:05 -0000 1.45 --- Space.java 10 Aug 2006 13:13:26 -0000 1.46 *************** *** 18,21 **** --- 18,23 ---- import java.util.Map; + import net.sourceforge.bprocessor.model.modellor.Modellor; + import org.apache.log4j.Logger; --- LayerModellor.java DELETED --- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** Project.java 31 Jul 2006 11:29:40 -0000 1.68 --- Project.java 10 Aug 2006 13:13:26 -0000 1.69 *************** *** 18,21 **** --- 18,23 ---- import java.util.Stack; + import net.sourceforge.bprocessor.model.modellor.LayerModellor; + import net.sourceforge.bprocessor.model.modellor.Modellor; import net.sourceforge.bprocessor.model.xml.Bmodel; *************** *** 113,116 **** --- 115,119 ---- globals = new ParameterBlock(); globals.put("pi", Math.PI); + Modellor.registerModellor(new LayerModellor()); } *************** *** 187,190 **** --- 190,194 ---- world.add(cs); this.setActiveCoordinateSystem(cs); + cs.setActive(true); changed(this); } |
From: rimestad <rim...@us...> - 2006-08-10 13:13:23
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21515/src/net/sourceforge/bprocessor/model/modellor Log Message: Directory /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/modellor added to the repository |
From: Michael L. <he...@us...> - 2006-08-10 13:08:07
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19188/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Refactoring selection mechanism Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.133 retrieving revision 1.134 diff -C2 -d -r1.133 -r1.134 *** View.java 10 Aug 2006 10:10:49 -0000 1.133 --- View.java 10 Aug 2006 13:08:01 -0000 1.134 *************** *** 68,71 **** --- 68,80 ---- private static Logger log = Logger.getLogger(View.class); + /** OBJECTS flag */ + public static final int OBJECTS = 1; + + /** INTERSECTIONS flag */ + public static final int INTERSECTIONS = 2; + + /** HANDLES flag */ + public static final int HANDLES = 3; + /** IGNORE */ public static final boolean IGNORE = true; *************** *** 271,276 **** private int selectMode; ! /** Are intersections wanted in hit-detection? */ ! private boolean selectIntersections; /** Excluded for hit-detection */ --- 280,285 ---- private int selectMode; ! /** What type of entities should be selected */ ! private int selectionMode; /** Excluded for hit-detection */ *************** *** 1861,1868 **** dist = (current.getOrigin().minus(v)).length() * scale; } ! if (selectIntersections) { if (current.isEditable()) { ! pushName(gl, current.getOrigin()); ! drawVertexHit(current.getOrigin()); popName(gl); } --- 1870,1878 ---- dist = (current.getOrigin().minus(v)).length() * scale; } ! if (selectionMode == INTERSECTIONS) { if (current.isEditable()) { ! Vertex origin = current.getOriginHandle(); ! pushName(gl, origin); ! drawVertexHit(origin); popName(gl); } *************** *** 1870,1879 **** Line line = (Line) current; Edge guide = line.edge(View.gridSize() * 2); - if (current.isEditable()) { - Vertex tip = line.tip(dist / 10); - pushName(gl, tip); - drawVertexHit(tip); - popName(gl); - } if (current.isActive()) { pushName(gl, guide); --- 1880,1883 ---- *************** *** 2411,2420 **** * @param y y-coordinate of the point * @param unWantedEntities the collection of unwanted entities ! * @param intersections Are intersections wanted * @param xy The default plane to intersect with * @return entity under the point. */ public Object getObjectAtPoint(double x, double y, ! Collection unWantedEntities, boolean intersections, Plane xy) { this.x = x; this.y = y; --- 2415,2424 ---- * @param y y-coordinate of the point * @param unWantedEntities the collection of unwanted entities ! * @param mode Are intersections wanted * @param xy The default plane to intersect with * @return entity under the point. */ public Object getObjectAtPoint(double x, double y, ! Collection unWantedEntities, int mode, Plane xy) { this.x = x; this.y = y; *************** *** 2422,2431 **** picking = 10; selectMode = ALL; ! selectIntersections = intersections; excluded = unWantedEntities; glv.repaint(true); ! Object object = processSelect(unWantedEntities, intersections, xy); clearNames(); return object; --- 2426,2436 ---- picking = 10; selectMode = ALL; ! selectionMode = mode; ! excluded = unWantedEntities; glv.repaint(true); ! Object object = processSelect(unWantedEntities, mode == INTERSECTIONS, xy); clearNames(); return object; *************** *** 2436,2443 **** * @param x the x coordinate of the point in mouse coordinates * @param y the y coordinate of the point in mouse coordinates * @return The object under the point, null if no object is there */ ! public Object getObjectAtPoint(double x, double y) { ! return getObjectAtPoint(x, y, new HashSet(), false, new Plane(0, 0, 1, 0)); } --- 2441,2449 ---- * @param x the x coordinate of the point in mouse coordinates * @param y the y coordinate of the point in mouse coordinates + * @param mode mode * @return The object under the point, null if no object is there */ ! public Object getObjectAtPoint(double x, double y, int mode) { ! return getObjectAtPoint(x, y, new HashSet(), mode, new Plane(0, 0, 1, 0)); } |
From: Michael L. <he...@us...> - 2006-08-10 13:08:04
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19188/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java SelectStrategy.java AbstractPencil.java AlternateMoveTool.java Log Message: Refactoring selection mechanism Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** AbstractPencil.java 9 Aug 2006 16:14:20 -0000 1.54 --- AbstractPencil.java 10 Aug 2006 13:08:01 -0000 1.55 *************** *** 174,178 **** intersection = (Intersection) glv.getView().getObjectAtPoint(e.getX(), e.getY(), ! unwanted, true, work); if (constrain) { if (lockingEdge != null) { --- 174,178 ---- intersection = (Intersection) glv.getView().getObjectAtPoint(e.getX(), e.getY(), ! unwanted, View.INTERSECTIONS, work); if (constrain) { if (lockingEdge != null) { *************** *** 903,906 **** --- 903,907 ---- affected.addAll(edges); affected.addAll(surfaces); + affected.addAll(moveElements); { Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.91 retrieving revision 1.92 diff -C2 -d -r1.91 -r1.92 *** AbstractTool.java 9 Aug 2006 15:15:03 -0000 1.91 --- AbstractTool.java 10 Aug 2006 13:08:01 -0000 1.92 *************** *** 375,379 **** previousPos[0] = pressPos[0]; previousPos[1] = pressPos[1]; ! Object o = glv.getView().getObjectAtPoint(e.getX(), e.getY()); if (e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(dragCursor); --- 375,379 ---- previousPos[0] = pressPos[0]; previousPos[1] = pressPos[1]; ! Object o = glv.getView().getObjectAtPoint(e.getX(), e.getY(), View.OBJECTS); if (e.getButton() == MouseEvent.BUTTON2) { glv.setCursor(dragCursor); *************** *** 524,534 **** /** * Find the object under the mouse and set target * @param event The MouseEvent */ ! protected void findTarget(MouseEvent event) { int x = event.getX(); int y = event.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y); } --- 524,543 ---- /** * Find the object under the mouse and set target + * @param mode mode * @param event The MouseEvent */ ! protected void findTarget(MouseEvent event, int mode) { int x = event.getX(); int y = event.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y, mode); ! } ! ! /** ! * ! * @param event The MouseEvent ! */ ! protected void findTarget(MouseEvent event) { ! findTarget(event, View.OBJECTS); } *************** *** 542,546 **** int y = event.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y, ignore, false, new Plane(0, 0, 1, 0)); } --- 551,555 ---- int y = event.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y, ignore, View.OBJECTS, new Plane(0, 0, 1, 0)); } Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SelectStrategy.java 9 Aug 2006 18:10:37 -0000 1.3 --- SelectStrategy.java 10 Aug 2006 13:08:01 -0000 1.4 *************** *** 100,104 **** y = e.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y); if (e.getClickCount() >= 2) { if (target instanceof Surface) { --- 100,104 ---- y = e.getY(); View view = glv.getView(); ! target = view.getObjectAtPoint(x, y, View.OBJECTS); if (e.getClickCount() >= 2) { if (target instanceof Surface) { Index: AlternateMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AlternateMoveTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** AlternateMoveTool.java 9 Aug 2006 09:45:06 -0000 1.2 --- AlternateMoveTool.java 10 Aug 2006 13:08:01 -0000 1.3 *************** *** 17,20 **** --- 17,21 ---- import net.sourceforge.bprocessor.gl.GLView; + import net.sourceforge.bprocessor.gl.view.View; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Project; *************** *** 86,89 **** --- 87,93 ---- feedback.add(edge); feedback(feedback); + + Project.info("make current " + current); + makeTarget(current); updateConstructors(); *************** *** 107,111 **** if (start == null) { if (selection.isEmpty()) { ! findTarget(e); glv.getView().makeTarget(target); } else { --- 111,115 ---- if (start == null) { if (selection.isEmpty()) { ! findTarget(e, View.OBJECTS); glv.getView().makeTarget(target); } else { *************** *** 120,123 **** --- 124,128 ---- active = prepare(e); if (active) { + Project.info("excluding " + affected); excluded(affected); } *************** *** 148,151 **** --- 153,157 ---- } else { entities = new HashSet(); + Project.info("adding selection " + selection); entities.addAll(selection); } |
From: Michael L. <he...@us...> - 2006-08-10 13:07:59
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19179/src/net/sourceforge/bprocessor/model Modified Files: Selection.java Constructor.java Log Message: Refactoring selection mechanism Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Constructor.java 31 Jul 2006 11:25:51 -0000 1.7 --- Constructor.java 10 Aug 2006 13:07:57 -0000 1.8 *************** *** 75,78 **** --- 75,86 ---- /** + * A handle for origin + * @return Vertex + */ + public Vertex getOriginHandle() { + return new Handle(origin.getX(), origin.getY(), origin.getZ()); + } + + /** * Setter for origin * @param origin the new origin *************** *** 120,122 **** --- 128,172 ---- getOrigin().add(new Vertex(x, y, z)); } + + /** + * Handle + */ + protected class Handle extends Vertex { + /** */ + private static final long serialVersionUID = 1L; + + /** + * Constructor for Handle + * @param x X + * @param y Y + * @param z Z + */ + public Handle(double x, double y, double z) { + super(x, y, z); + } + + /** + * Update the direction based on the placement of the tip + */ + public void update() { + origin.setX(getX()); + origin.setY(getY()); + origin.setZ(getZ()); + } + + /** + * Return the line + * @return parent + */ + public Geometric parent() { + return Constructor.this; + } + + /** + * @return String + */ + public String toString() { + return "Handle{" + parent() + "}"; + } + } } Index: Selection.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Selection.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Selection.java 9 Aug 2006 15:14:58 -0000 1.11 --- Selection.java 10 Aug 2006 13:07:57 -0000 1.12 *************** *** 264,266 **** --- 264,273 ---- return center; } + + /** + * @return String + */ + public String toString() { + return selection.toString(); + } } |
From: Michael L. <he...@us...> - 2006-08-10 10:10:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv15574/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Removed unused code Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.132 retrieving revision 1.133 diff -C2 -d -r1.132 -r1.133 *** View.java 10 Aug 2006 09:59:56 -0000 1.132 --- View.java 10 Aug 2006 10:10:49 -0000 1.133 *************** *** 2495,2522 **** return selection; } - - /** - * Gets id of any Vertices under a point. For use in selection. - * @param x the x coordinate of the point in mouse coordinates - * @param y the y coordinate of the point in mouse coordinates - * @return The object under the point, null if no object is there - */ - public List getVertexAtPoint(double x, double y) { - this.x = x; - this.y = y; - - picking = 10; - selectMode = VERTICES; - glv.repaint(true); - - List selection = new LinkedList(); - Object object = processSelect(new HashSet(), false, new Plane(0, 0, 1, 0)); - if (object != null) { - selection.add(object); - } - clearNames(); - return selection; - } - /** --- 2495,2498 ---- |
From: Michael L. <he...@us...> - 2006-08-10 09:59:59
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv11312/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Made line selectable by clicking on edge Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.131 retrieving revision 1.132 diff -C2 -d -r1.131 -r1.132 *** View.java 9 Aug 2006 18:10:36 -0000 1.131 --- View.java 10 Aug 2006 09:59:56 -0000 1.132 *************** *** 1104,1108 **** drawVector(l.getOrigin(), l.tip(dist / 16)); } ! if (l.isActive() && active) { drawConstructorLine(l.getOrigin(), l.getDirection(), dist); } --- 1104,1108 ---- drawVector(l.getOrigin(), l.tip(dist / 16)); } ! if (l.isActive()) { drawConstructorLine(l.getOrigin(), l.getDirection(), dist); } |
From: rimestad <rim...@us...> - 2006-08-09 18:14:13
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1163/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Shouldn't have been comitted Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** GenericTreeView.java 9 Aug 2006 18:12:09 -0000 1.33 --- GenericTreeView.java 9 Aug 2006 18:14:09 -0000 1.34 *************** *** 281,285 **** */ public JPopupMenu menu() { ! return new JPopupMenu("Test"); } } --- 281,285 ---- */ public JPopupMenu menu() { ! return null; } } |
From: rimestad <rim...@us...> - 2006-08-09 18:12:21
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv339/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Now the right click on menus work on windows machines, on windows the isPopuptrigger only works on mouseRelease ???? Wierd but it works Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** GenericTreeView.java 31 Jul 2006 17:10:33 -0000 1.32 --- GenericTreeView.java 9 Aug 2006 18:12:09 -0000 1.33 *************** *** 281,285 **** */ public JPopupMenu menu() { ! return null; } } --- 281,285 ---- */ public JPopupMenu menu() { ! return new JPopupMenu("Test"); } } *************** *** 1022,1025 **** --- 1022,1041 ---- */ public void mousePressed(MouseEvent e) { + react(e); + } + + /** + * Mouse releashed + * @param e MouseEvent + */ + public void mouseReleased(MouseEvent e) { + react(e); + } + + /** + * Do the thing + * @param e the MouseEvent + */ + private void react(MouseEvent e) { TreePath path = getPathForLocation(e.getX(), e.getY()); if (path != null) { *************** *** 1035,1039 **** } } ! } } --- 1051,1055 ---- } } ! } } |
From: rimestad <rim...@us...> - 2006-08-09 18:10:39
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32003/src/net/sourceforge/bprocessor/gl/tool Modified Files: SelectStrategy.java Log Message: Added active to clippingplane as well so that it is now possible to disable a clippingplane, Added to Select double clicking of constructors and clippingplanes to negate the active boolean of the object. Changed the drawing of planes to be with constructor colors, (THERE ARE STILL ONE THING WITH THE GRID NOW IT IS CLIPPED BY THE CLIPPING PLANE COULD BE OK???) Index: SelectStrategy.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SelectStrategy.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SelectStrategy.java 3 Aug 2006 14:35:28 -0000 1.2 --- SelectStrategy.java 9 Aug 2006 18:10:37 -0000 1.3 *************** *** 16,19 **** --- 16,21 ---- 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.Constructor; import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Selection; *************** *** 99,110 **** View view = glv.getView(); target = view.getObjectAtPoint(x, y); ! ! if (e.getClickCount() >= 2 && target instanceof Surface) { ! Surface surface = (Surface) target; ! if (surface.getBackDomain() != null) { ! selection.addAll(surface.getBackDomain().getEnvelope()); ! } ! if (surface.getFrontDomain() != null) { ! selection.addAll(surface.getFrontDomain().getEnvelope()); } } else { --- 101,119 ---- View view = glv.getView(); target = view.getObjectAtPoint(x, y); ! if (e.getClickCount() >= 2) { ! if (target instanceof Surface) { ! Surface surface = (Surface) target; ! if (surface.getBackDomain() != null) { ! selection.addAll(surface.getBackDomain().getEnvelope()); ! } ! if (surface.getFrontDomain() != null) { ! selection.addAll(surface.getFrontDomain().getEnvelope()); ! } ! } else if (target instanceof Constructor) { ! Constructor c = (Constructor)target; ! c.setActive(!c.isActive()); ! } else if (target instanceof ClippingPlane) { ! ClippingPlane cp = (ClippingPlane)target; ! cp.setActive(!cp.isActive()); } } else { |
From: rimestad <rim...@us...> - 2006-08-09 18:10:39
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32003/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Added active to clippingplane as well so that it is now possible to disable a clippingplane, Added to Select double clicking of constructors and clippingplanes to negate the active boolean of the object. Changed the drawing of planes to be with constructor colors, (THERE ARE STILL ONE THING WITH THE GRID NOW IT IS CLIPPED BY THE CLIPPING PLANE COULD BE OK???) Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** View.java 9 Aug 2006 13:46:18 -0000 1.130 --- View.java 9 Aug 2006 18:10:36 -0000 1.131 *************** *** 551,556 **** while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); ! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev()); ! gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber()); } --- 551,558 ---- while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); ! if (cp.isActive()) { ! gl.glClipPlane(GL.GL_CLIP_PLANE0 + cp.getNumber(), cp.getPlane().getDoublev()); ! gl.glEnable(GL.GL_CLIP_PLANE0 + cp.getNumber()); ! } } *************** *** 565,569 **** while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); ! gl.glDisable(GL.GL_CLIP_PLANE0 + cp.getNumber()); } --- 567,573 ---- while (clipit.hasNext()) { ClippingPlane cp = (ClippingPlane)clipit.next(); ! if (cp.isActive()) { ! gl.glDisable(GL.GL_CLIP_PLANE0 + cp.getNumber()); ! } } *************** *** 1120,1153 **** Vertex i = cs.getI(); Vertex j = cs.getJ(); ! if (colorize) { ! gl.glColor3fv(X_AXIS_COLOR); ! } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), i, dist); ! } ! if (cs.isActive() && active) { ! drawConstructorLine(cs.getOrigin(), i, dist); ! } ! if (colorize) { ! gl.glColor3fv(Y_AXIS_COLOR); ! } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), j, dist); ! } ! if (cs.isActive() && active) { ! drawConstructorLine(cs.getOrigin(), j, dist); ! } ! if (!cs.onlyPlane()) { ! Vertex n = cs.getN(); if (colorize) { ! gl.glColor3fv(Z_AXIS_COLOR); } if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), n, dist); } if (cs.isActive() && active) { ! drawConstructorLine(cs.getOrigin(), n, dist); } - } else { if (cs.isActive() && active) { Vertex origin = cs.getOrigin(); --- 1124,1143 ---- Vertex i = cs.getI(); Vertex j = cs.getJ(); ! if (cs.onlyPlane()) { if (colorize) { ! gl.glColor3fv(CONSTRUCTOR_COLOR); } if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), i, dist); } if (cs.isActive() && active) { ! drawConstructorLine(cs.getOrigin(), i, dist); ! } ! if (cs.isEditable()) { ! drawConstructorVector(cs.getOrigin(), j, dist); ! } ! if (cs.isActive() && active) { ! drawConstructorLine(cs.getOrigin(), j, dist); } if (cs.isActive() && active) { Vertex origin = cs.getOrigin(); *************** *** 1174,1177 **** --- 1164,1196 ---- gl.glDisable(GL.GL_POLYGON_STIPPLE); } + } else { + if (colorize) { + gl.glColor3fv(X_AXIS_COLOR); + } + if (cs.isEditable()) { + drawConstructorVector(cs.getOrigin(), i, dist); + } + if (cs.isActive() && active) { + drawConstructorLine(cs.getOrigin(), i, dist); + } + if (colorize) { + gl.glColor3fv(Y_AXIS_COLOR); + } + if (cs.isEditable()) { + drawConstructorVector(cs.getOrigin(), j, dist); + } + if (cs.isActive() && active) { + drawConstructorLine(cs.getOrigin(), j, dist); + } + Vertex n = cs.getN(); + if (colorize) { + gl.glColor3fv(Z_AXIS_COLOR); + } + if (cs.isEditable()) { + drawConstructorVector(cs.getOrigin(), n, dist); + } + if (cs.isActive() && active) { + drawConstructorLine(cs.getOrigin(), n, dist); + } } } |
From: rimestad <rim...@us...> - 2006-08-09 18:10:33
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31983/src/net/sourceforge/bprocessor/model Modified Files: ClippingPlane.java Log Message: Added active to clippingplane as well so that it is now possible to disable a clippingplane, Added to Select double clicking of constructors and clippingplanes to negate the active boolean of the object. Changed the drawing of planes to be with constructor colors, (THERE ARE STILL ONE THING WITH THE GRID NOW IT IS CLIPPED BY THE CLIPPING PLANE COULD BE OK???) Index: ClippingPlane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ClippingPlane.java 3 Aug 2006 14:35:21 -0000 1.5 --- ClippingPlane.java 9 Aug 2006 18:10:31 -0000 1.6 *************** *** 37,40 **** --- 37,43 ---- private Plane plane; + /** If the clippingplane is on or off */ + private boolean isActive; + /** * The constructor *************** *** 43,46 **** --- 46,50 ---- public ClippingPlane(CoordinateSystem system) { this.cs = system; + this.isActive = true; plane = cs.plane(); update(); *************** *** 258,260 **** --- 262,278 ---- } } + + /** + * @return Returns the isActive. + */ + public boolean isActive() { + return isActive; + } + + /** + * @param isActive The isActive to set. + */ + public void setActive(boolean isActive) { + this.isActive = isActive; + } } |
From: rimestad <rim...@us...> - 2006-08-09 18:06:59
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30362/src/net/sourceforge/bprocessor/model Modified Files: LayerModellor.java Log Message: Is allready parametric through moddelor Index: LayerModellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/LayerModellor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** LayerModellor.java 12 Apr 2006 14:29:27 -0000 1.9 --- LayerModellor.java 9 Aug 2006 18:06:54 -0000 1.10 *************** *** 17,21 **** * Modellor */ ! public class LayerModellor extends Modellor implements Parametric { /** Default */ private static final long serialVersionUID = 1L; --- 17,21 ---- * Modellor */ ! public class LayerModellor extends Modellor { /** Default */ private static final long serialVersionUID = 1L; |
From: rimestad <rim...@us...> - 2006-08-09 16:14:22
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16073/src/net/sourceforge/bprocessor/gl/tool Modified Files: RectTool.java AbstractPencil.java Log Message: Made abstracttool insertEdge force that the inserted edges are at least longer than 0.0 and required in RectTool that the start and current point are different before creating a rect... removes the dragging error Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** RectTool.java 9 Aug 2006 09:46:10 -0000 1.12 --- RectTool.java 9 Aug 2006 16:14:20 -0000 1.13 *************** *** 150,156 **** lastCurrent = start.vertex(); } else if (baseEdge == null) { ! setUpRectangle(); } else { ! insertEdges(rectangle); cleanUp(); feedback(rectangle); --- 150,160 ---- lastCurrent = start.vertex(); } else if (baseEdge == null) { ! if (start.vertex().distance(current.vertex()) > 0.0) { ! setUpRectangle(); ! } } else { ! if (baseEdge.getLength() > 0.0 && movingEdge.getLength() > 0.0) { ! insertEdges(rectangle); ! } cleanUp(); feedback(rectangle); Index: AbstractPencil.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractPencil.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** AbstractPencil.java 4 Aug 2006 11:48:11 -0000 1.53 --- AbstractPencil.java 9 Aug 2006 16:14:20 -0000 1.54 *************** *** 251,262 **** * @param edge Edge * @param split Split ! * @return Edge from model */ public Edge insertEdge(Edge edge, boolean split) { Edge actual = edge; Vertex from = insertVertex(edge.getFrom(), split); Vertex to = insertVertex(edge.getTo(), split); edge.setFrom(from); edge.setTo(to); { Collection edges = mesh().getEdges(); --- 251,268 ---- * @param edge Edge * @param split Split ! * @return Edge from model null if to and from were the same */ public Edge insertEdge(Edge edge, boolean split) { Edge actual = edge; + if (edge.getLength() == 0) { + return null; + } Vertex from = insertVertex(edge.getFrom(), split); Vertex to = insertVertex(edge.getTo(), split); edge.setFrom(from); edge.setTo(to); + if (edge.getLength() == 0.0) { + return null; + } { Collection edges = mesh().getEdges(); *************** *** 297,306 **** Edge current = (Edge) iter.next(); Edge edge = insertEdge(current, false); ! actual.add(edge); } - Surface surface = new Surface(actual); - mesh().insert(surface); - holeAnalysis(surface); - closed = true; } else { List actual = new LinkedList(); --- 303,316 ---- Edge current = (Edge) iter.next(); Edge edge = insertEdge(current, false); ! if (edge != null) { ! actual.add(edge); ! } ! } ! if (actual.size() > 3) { ! Surface surface = new Surface(actual); ! mesh().insert(surface); ! holeAnalysis(surface); ! closed = true; } } else { List actual = new LinkedList(); *************** *** 309,313 **** Edge current = (Edge) iter.next(); Edge edge = insertEdge(current, true); ! actual.add(edge); } closed = Geometry.insert(actual); --- 319,325 ---- Edge current = (Edge) iter.next(); Edge edge = insertEdge(current, true); ! if (edge != null) { ! actual.add(edge); ! } } closed = Geometry.insert(actual); |
From: rimestad <rim...@us...> - 2006-08-09 15:15:09
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23780/src/net/sourceforge/bprocessor/gl/tool Modified Files: AbstractTool.java SpaceTool.java RotationTool.java Log Message: REfactored center to Geometry and made Modellor implement Parametric as well Index: SpaceTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/SpaceTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** SpaceTool.java 24 Jul 2006 13:41:14 -0000 1.23 --- SpaceTool.java 9 Aug 2006 15:15:03 -0000 1.24 *************** *** 309,312 **** --- 309,323 ---- return; } + + /** @see net.sourceforge.bprocessor.model.Parametric#setAttributes(List) */ + public void setAttributes(List attributes) { + // TODO Auto-generated method stub + } + + /** @see net.sourceforge.bprocessor.model.Parametric#getGeneralName() */ + public List getAttributes() { + // TODO Auto-generated method stub + return null; + } } Index: AbstractTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AbstractTool.java,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -d -r1.90 -r1.91 *** AbstractTool.java 3 Aug 2006 14:29:33 -0000 1.90 --- AbstractTool.java 9 Aug 2006 15:15:03 -0000 1.91 *************** *** 10,14 **** import net.sourceforge.bprocessor.model.ClippingPlane; import net.sourceforge.bprocessor.model.Edge; - import net.sourceforge.bprocessor.model.Entity; import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Geometric; --- 10,13 ---- *************** *** 187,192 **** if (it.hasNext()) { Object o = it.next(); ! if (o instanceof Entity) { ! Vertex v = ((Entity)o).center(); center = new double[] {v.getX(), v.getY(), v.getZ()}; } --- 186,191 ---- if (it.hasNext()) { Object o = it.next(); ! if (o instanceof Geometric) { ! Vertex v = ((Geometric)o).center(); center = new double[] {v.getX(), v.getY(), v.getZ()}; } Index: RotationTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RotationTool.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** RotationTool.java 3 Aug 2006 14:35:28 -0000 1.15 --- RotationTool.java 9 Aug 2006 15:15:03 -0000 1.16 *************** *** 12,15 **** --- 12,16 ---- import net.sourceforge.bprocessor.model.Edge; import net.sourceforge.bprocessor.model.Entity; + import net.sourceforge.bprocessor.model.Geometric; import net.sourceforge.bprocessor.model.Geometry; import net.sourceforge.bprocessor.model.Plane; *************** *** 142,146 **** } // make selection ! if (target != null && target instanceof Entity) { if (target instanceof Edge && ((Edge)target).getStrippled()) { // If it is a constructor it should not be rotateable --- 143,147 ---- } // make selection ! if (target != null && target instanceof Geometric) { if (target instanceof Edge && ((Edge)target).getStrippled()) { // If it is a constructor it should not be rotateable *************** *** 151,159 **** // find the size of the handles ! center = ((Entity)target).center(); dist = 0; gatherInformation(center, vertices); ! drawCircles(((Entity)target).center(), dist); } else { // There were nothing selected --- 152,160 ---- // find the size of the handles ! center = ((Geometric)target).center(); dist = 0; gatherInformation(center, vertices); ! drawCircles(((Geometric)target).center(), dist); } else { // There were nothing selected |
From: rimestad <rim...@us...> - 2006-08-09 15:15:08
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv23759/src/net/sourceforge/bprocessor/model Modified Files: Modellor.java Geometric.java Selection.java Entity.java Log Message: REfactored center to Geometry and made Modellor implement Parametric as well Index: Modellor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Modellor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Modellor.java 11 Feb 2006 15:02:21 -0000 1.4 --- Modellor.java 9 Aug 2006 15:14:58 -0000 1.5 *************** *** 13,17 **** * established at the creation of the Modellor. */ ! public abstract class Modellor extends Entity implements Observer { /** * Generate a list of surfaces. --- 13,17 ---- * established at the creation of the Modellor. */ ! public abstract class Modellor extends Entity implements Observer, Parametric { /** * Generate a list of surfaces. Index: Entity.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Entity.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Entity.java 4 Jul 2006 09:36:54 -0000 1.8 --- Entity.java 9 Aug 2006 15:14:58 -0000 1.9 *************** *** 49,58 **** Project.getInstance().changed(this); } - - /** - * Return the center for the entity - * @return The center as a vertex - */ - public abstract Vertex center(); /** --- 49,52 ---- Index: Selection.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Selection.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Selection.java 3 Jul 2006 14:25:07 -0000 1.10 --- Selection.java 9 Aug 2006 15:14:58 -0000 1.11 *************** *** 257,262 **** if (it.hasNext()) { Object o = it.next(); ! if (o instanceof Entity) { ! Vertex v = ((Entity)o).center(); center = v; } --- 257,262 ---- if (it.hasNext()) { Object o = it.next(); ! if (o instanceof Geometric) { ! Vertex v = ((Geometric)o).center(); center = v; } Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Geometric.java 23 Jul 2006 09:17:36 -0000 1.8 --- Geometric.java 9 Aug 2006 15:14:58 -0000 1.9 *************** *** 69,71 **** --- 69,77 ---- } + + /** + * Return the center for the entity + * @return The center as a vertex + */ + public abstract Vertex center(); } |
From: Michael L. <he...@us...> - 2006-08-09 13:46:21
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19422/src/net/sourceforge/bprocessor/gl/view Modified Files: View.java Log Message: Small change to drawing lines Index: View.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/view/View.java,v retrieving revision 1.129 retrieving revision 1.130 diff -C2 -d -r1.129 -r1.130 *** View.java 8 Aug 2006 13:01:10 -0000 1.129 --- View.java 9 Aug 2006 13:46:18 -0000 1.130 *************** *** 1098,1102 **** Line l = (Line)constructor; if (l.isEditable()) { ! drawConstructorVector(l.getOrigin(), l.getDirection(), dist); } if (l.isActive() && active) { --- 1098,1102 ---- Line l = (Line)constructor; if (l.isEditable()) { ! drawVector(l.getOrigin(), l.tip(dist / 16)); } if (l.isActive() && active) { *************** *** 1196,1208 **** */ private void drawConstructorVector(Vertex from, Vertex direction, double dist) { - gl.glLineWidth(2); Vertex d = direction.copy(); d.scale(dist / 16); Vertex to = from.add(d); gl.glBegin(GL.GL_LINES); gl.glVertex3d(from.getX(), from.getY(), from.getZ()); gl.glVertex3d(to.getX(), to.getY(), to.getZ()); gl.glEnd(); ! gl.glEnable(GL.GL_LIGHTING); GLUquadric quad = glu.gluNewQuadric(); --- 1196,1237 ---- */ private void drawConstructorVector(Vertex from, Vertex direction, double dist) { Vertex d = direction.copy(); d.scale(dist / 16); Vertex to = from.add(d); + drawVectorBase(from, to); + drawVectorTip(from, to); + } + + /** + * Draw a vector + * @param from Vertex (base) + * @param to Vertex (tip) + */ + private void drawVector(Vertex from, Vertex to) { + drawVectorBase(from, to); + drawVectorTip(from, to); + } + + /** + * Draw vector base + * @param from Vertex + * @param to Vertex + */ + private void drawVectorBase(Vertex from, Vertex to) { + gl.glLineWidth(2); gl.glBegin(GL.GL_LINES); gl.glVertex3d(from.getX(), from.getY(), from.getZ()); gl.glVertex3d(to.getX(), to.getY(), to.getZ()); gl.glEnd(); ! } ! ! /** ! * Draw vector tip ! * @param from Vertex ! * @param to Vertex ! */ ! private void drawVectorTip(Vertex from, Vertex to) { ! Vertex direction = to.minus(from); ! double dist = direction.length() * 16; gl.glEnable(GL.GL_LIGHTING); GLUquadric quad = glu.gluNewQuadric(); |
From: Michael L. <he...@us...> - 2006-08-09 13:46:18
|
Update of /cvsroot/bprocessor/tools/checkstyle In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv19404/checkstyle Modified Files: checkstyle.xml Log Message: Small change to drawing lines Index: checkstyle.xml =================================================================== RCS file: /cvsroot/bprocessor/tools/checkstyle/checkstyle.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** checkstyle.xml 10 Jul 2006 13:29:56 -0000 1.3 --- checkstyle.xml 9 Aug 2006 13:46:14 -0000 1.4 *************** *** 116,120 **** </module> <module name="FileLength"> ! <property name="max" value="3000"/> </module> <module name="ParameterNumber"> --- 116,120 ---- </module> <module name="FileLength"> ! <property name="max" value="4000"/> </module> <module name="ParameterNumber"> |
From: Nordholt <nor...@us...> - 2006-08-09 09:46:16
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv17229/src/net/sourceforge/bprocessor/gl/tool Modified Files: RectTool.java Log Message: constructors now moves to the last point clicked Index: RectTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/RectTool.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** RectTool.java 31 Jul 2006 14:06:56 -0000 1.11 --- RectTool.java 9 Aug 2006 09:46:10 -0000 1.12 *************** *** 117,120 **** --- 117,121 ---- rectangle.add(movingEdge); rectangle.add(new Edge(movingEdge.getTo(), start.vertex())); + start = current; feedback(rectangle); } |
From: Nordholt <nor...@us...> - 2006-08-09 09:45:24
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16653/src/net/sourceforge/bprocessor/gl/tool Modified Files: AlternateMoveTool.java Log Message: Fixed crashing when trying to drag nothing. Made able to drag Index: AlternateMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/AlternateMoveTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** AlternateMoveTool.java 4 Aug 2006 11:48:11 -0000 1.1 --- AlternateMoveTool.java 9 Aug 2006 09:45:06 -0000 1.2 *************** *** 27,31 **** public class AlternateMoveTool extends AbstractPencil { /** Entities */ ! protected Set entities; /** Vertices */ --- 27,31 ---- public class AlternateMoveTool extends AbstractPencil { /** Entities */ ! protected Set entities = new HashSet(); /** Vertices */ *************** *** 33,37 **** /** Affected */ ! private Set affected; /** From */ --- 33,37 ---- /** Affected */ ! private Set affected = new HashSet(); /** From */ *************** *** 47,50 **** --- 47,53 ---- private boolean active; + /** dragging flag */ + private boolean dragging = false; + /** * Constructor for MoveTool *************** *** 177,180 **** --- 180,187 ---- */ protected void dragged(MouseEvent e) { + if (!dragging) { + dragging = true; + } + moved(e); } *************** *** 183,186 **** --- 190,197 ---- */ protected void released(MouseEvent e) { + if (dragging) { + dragging = false; + pressed(e); + } } *************** *** 189,198 **** */ public void cleanUp() { ! entities = null; ! affected = null; from = null; to = null; last = null; active = false; excluded(new LinkedList()); super.cleanUp(); --- 200,210 ---- */ public void cleanUp() { ! entities = new HashSet(); ! affected = new HashSet(); from = null; to = null; last = null; active = false; + dragging = false; excluded(new LinkedList()); super.cleanUp(); |
From: Nordholt <nor...@us...> - 2006-08-08 15:15:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16686/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: corrected a precision error and prevented nullpointer exception when extruding in the isClosed mechanism Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Space.java 31 Jul 2006 17:16:13 -0000 1.44 --- Space.java 8 Aug 2006 15:15:05 -0000 1.45 *************** *** 1436,1440 **** } else { closed = false; ! } } return closed; --- 1436,1440 ---- } else { closed = false; ! } } return closed; *************** *** 1471,1476 **** if (Math.abs(angle) < 0.00001 && spaceVector.dot(j) < 0) { colourable = true; ! } ! } return colourable; } --- 1471,1476 ---- if (Math.abs(angle) < 0.00001 && spaceVector.dot(j) < 0) { colourable = true; ! } ! } return colourable; } *************** *** 1488,1491 **** --- 1488,1494 ---- Vertex j = startSurface.normal(); + if (j == null) { + return null; + } if (startSurface.getFrontDomain() == this) { j.scale(1 / j.length()); *************** *** 1511,1515 **** Surface neighbour = null; double minAngle = (Math.PI * 2 + 1); ! double angle = minAngle; while (it.hasNext()) { Surface s = (Surface)it.next(); --- 1514,1520 ---- Surface neighbour = null; double minAngle = (Math.PI * 2 + 1); ! double angle = minAngle; ! boolean foundAngle = false; ! boolean hadEx = false; while (it.hasNext()) { Surface s = (Surface)it.next(); *************** *** 1517,1531 **** LinkedList l = new LinkedList(s.getEdges()); Vertex notShared = findNextVertex(sharedEdge, sharedVertex, l); ! angle = findAngle(sharedVertex, notShared, cs); ! if (angle < minAngle && colourable(s, angle, i, j)) { ! minAngle = angle; ! neighbour = s; ! } ! if (s.getExterior() != null) { ! angle = (angle + Math.PI) % (2 * Math.PI); ! if (angle < minAngle && colourable(s.getExterior(), ! angle, i, j)) { minAngle = angle; ! neighbour = s.getExterior(); } } --- 1522,1542 ---- LinkedList l = new LinkedList(s.getEdges()); Vertex notShared = findNextVertex(sharedEdge, sharedVertex, l); ! if (notShared != null) { ! angle = findAngle(sharedVertex, notShared, cs); ! if (angle < minAngle) { ! foundAngle = true; ! } ! if (angle < minAngle && colourable(s, angle, i, j)) { minAngle = angle; ! neighbour = s; ! } ! if (s.getExterior() != null) { ! hadEx = true; ! angle = (angle + Math.PI) % (2 * Math.PI); ! if (angle < minAngle && colourable(s.getExterior(), ! angle, i, j)) { ! minAngle = angle; ! neighbour = s.getExterior(); ! } } } *************** *** 1550,1554 **** projEdgeDir.scale(1 / projEdgeDir.length()); Vertex xAxis = coordinateSystem.getI().copy(); ! double angle = Math.acos(xAxis.dot(projEdgeDir)); if (coordinateSystem.translate(projNotShared).getY() >= 0) { angle = Math.PI - angle; --- 1561,1571 ---- projEdgeDir.scale(1 / projEdgeDir.length()); Vertex xAxis = coordinateSystem.getI().copy(); ! double cosAngle = xAxis.dot(projEdgeDir); ! if (cosAngle > 1 && cosAngle < 1.001) { ! cosAngle = 1; ! } else if (cosAngle < -1 && cosAngle > -1.001) { ! cosAngle = -1; ! } ! double angle = Math.acos(cosAngle); if (coordinateSystem.translate(projNotShared).getY() >= 0) { angle = Math.PI - angle; |