bprocessor-commit Mailing List for B-processor (Page 106)
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-09-06 09:49:08
|
Update of /cvsroot/bprocessor/bscript/src In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1549/src Added Files: build.xml Log Message: Base version --- NEW FILE: build.xml --- <project name="src" default="compile" basedir="."> <path id="build.path"> <fileset dir="${lib.dir}"> <include name="**/*.jar"/> </fileset> <pathelement location="."/> <pathelement location="${build.dir}"/> </path> <target name="init"> <mkdir dir="${build.dir}"/> </target> <target name="compile" depends="dep"> <javac srcdir="${src.dir}" destdir="${build.dir}" deprecation="yes" debug="yes" target="1.2" source="1.3" includes="net/**"> <classpath refid="build.path"/> </javac> </target> <target name="dep" depends="init"> <depend srcdir="${src.dir}" destdir="${build.dir}" cache="${build.dir}/depcache" closure="yes" /> </target> </project> |
Update of /cvsroot/bprocessor/bscript/src/net/sourceforge/bprocessor/model/evaluator In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1549/src/net/sourceforge/bprocessor/model/evaluator Added Files: Primitive.java Operation.java Literal.java package.html Variable.java Function.java Log Message: Base version --- NEW FILE: Variable.java --- //--------------------------------------------------------------------------------- // $Id: Variable.java,v 1.1 2006/09/06 09:49:05 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.evaluator; /** * Variable */ public class Variable extends Operation { /** id */ private String id; /** * Constructor * @param id String */ public Variable(String id) { super(); this.id = id; } } --- NEW FILE: Primitive.java --- //--------------------------------------------------------------------------------- // $Id: Primitive.java,v 1.1 2006/09/06 09:49:05 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.evaluator; /** * Primitive */ public class Primitive extends Operation { /** add */ public static final int ADD = 1; /** sub */ public static final int SUB = 2; /** mul */ public static final int MUL = 3; /** div */ public static final int DIV = 4; /** neg */ public static final int NEG = 5; /** opcode */ private int opcode; /** * Constructor * @param opcode int */ public Primitive(int opcode) { super(); this.opcode = opcode; } } --- NEW FILE: package.html --- <body> Defines the package that contains the modellor in the model </body> --- NEW FILE: Literal.java --- //--------------------------------------------------------------------------------- // $Id: Literal.java,v 1.1 2006/09/06 09:49:05 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.evaluator; /** * Literal */ public class Literal extends Operation { /** value */ private Object value; /** * Constructor * @param value Object */ public Literal(Object value) { super(); this.value = value; } } --- NEW FILE: Operation.java --- //--------------------------------------------------------------------------------- // $Id: Operation.java,v 1.1 2006/09/06 09:49:05 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.evaluator; /** * Operation * */ public class Operation { /** * Constructor */ public Operation() { super(); } } --- NEW FILE: Function.java --- //--------------------------------------------------------------------------------- // $Id: Function.java,v 1.1 2006/09/06 09:49:05 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.evaluator; import java.util.LinkedList; import java.util.List; /** * Function */ public class Function { /** operations */ private List operations; /** * Constructor */ public Function() { super(); operations = new LinkedList(); } /** * Append operation * @param operation Operation */ public void append(Operation operation) { operations.add(operation); } } |
From: Michael L. <he...@us...> - 2006-09-06 09:49:02
|
Update of /cvsroot/bprocessor/bscript/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1256/src/net/sourceforge/bprocessor/model Log Message: Directory /cvsroot/bprocessor/bscript/src/net/sourceforge/bprocessor/model added to the repository |
From: Michael L. <he...@us...> - 2006-09-06 09:49:02
|
Update of /cvsroot/bprocessor/bscript/src/net/sourceforge/bprocessor/model/evaluator In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1256/src/net/sourceforge/bprocessor/model/evaluator Log Message: Directory /cvsroot/bprocessor/bscript/src/net/sourceforge/bprocessor/model/evaluator added to the repository |
From: Michael L. <he...@us...> - 2006-09-06 09:49:01
|
Update of /cvsroot/bprocessor/bscript/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1256/src/etc Log Message: Directory /cvsroot/bprocessor/bscript/src/etc added to the repository |
From: Michael L. <he...@us...> - 2006-09-06 09:48:20
|
Update of /cvsroot/bprocessor/bscript In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1199/bscript Log Message: Directory /cvsroot/bprocessor/bscript added to the repository |
From: rimestad <rim...@us...> - 2006-09-05 13:54:08
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3875/src/net/sourceforge/bprocessor/facade/modellor Modified Files: WindowModellor.java Log Message: changed so that update now work and fixed cleanUp() Index: WindowModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/WindowModellor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** WindowModellor.java 29 Aug 2006 10:04:03 -0000 1.4 --- WindowModellor.java 5 Sep 2006 13:54:06 -0000 1.5 *************** *** 137,141 **** */ public void update(Object entity) { ! if (entity == surface || entity == this) { System.out.println("did a update on the surface"); cleanUp(); --- 137,142 ---- */ public void update(Object entity) { ! System.out.println("Should update"); ! if (entity == space || entity == this || entity == surface) { System.out.println("did a update on the surface"); cleanUp(); *************** *** 209,224 **** */ private void cleanUp() { ! Iterator iter = elements.iterator(); ! while (iter.hasNext()) { ! Entity e = (Entity)iter.next(); ! e.delete(); ! } ! elements.clear(); ! ! iter = space.getElements().iterator(); ! while (iter.hasNext()) { ! Space s = (Space)iter.next(); ! space.remove(s); ! } } --- 210,214 ---- */ private void cleanUp() { ! space.clear(); } |
From: rimestad <rim...@us...> - 2006-09-05 13:52:50
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3115/src/net/sourceforge/bprocessor/model/test Added Files: VertexTest.java Log Message: added some testes for vertex (still need many) and made some changes to line canMove method (works ok but not perfect) --- NEW FILE: VertexTest.java --- package net.sourceforge.bprocessor.model.test; import net.sourceforge.bprocessor.model.Vertex; import junit.framework.TestCase; public class VertexTest extends TestCase { /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.move(double, double, double)' */ public void testMove() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.canMove(double, double, double, Collection)' */ public void testCanMove() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.scale(double)' */ public void testScale() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.minus(Vertex)' */ public void testMinus() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.add(Vertex)' */ public void testAdd() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.cross(Vertex)' */ public void testCross() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.dot(Vertex)' */ public void testDot() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.length()' */ public void testLength() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.distance(Vertex)' */ public void testDistance() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.determinant(Vertex, Vertex)' */ public void testDeterminant() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.isZero()' */ public void testIsZero() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.equalEps(Vertex)' */ public void testEqualEps() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.coincides(Vertex)' */ public void testCoincides() { Vertex v1 = new Vertex(10, 0, 0); Vertex v2 = new Vertex(5, 5, 0); assertFalse(v1.coincides(v2)); assertFalse(v2.coincides(v1)); v2 = new Vertex(10, 0, 0); assertTrue(v1.coincides(v2)); assertTrue(v2.coincides(v1)); } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.normalize()' */ public void testNormalize() { } /* * Test method for 'net.sourceforge.bprocessor.model.Vertex.projectOnto(Vertex)' */ public void testProjectOnto() { Vertex v1 = new Vertex(10, 0, 0); Vertex v2 = new Vertex(5, 5, 0); Vertex res = v2.projectOnto(v1); assertTrue(res.coincides(new Vertex(5, 0, 0))); v1 = new Vertex(0, 10, 0); res = v2.projectOnto(v1); assertTrue(res.coincides(new Vertex(0, 5, 0))); v1 = new Vertex(0, 0, 10); res = v2.projectOnto(v1); assertTrue(res.coincides(new Vertex(0, 0, 0))); } } |
From: rimestad <rim...@us...> - 2006-09-05 13:52:50
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv3115/src/net/sourceforge/bprocessor/model Modified Files: Line.java Log Message: added some testes for vertex (still need many) and made some changes to line canMove method (works ok but not perfect) Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Line.java 5 Sep 2006 11:01:37 -0000 1.22 --- Line.java 5 Sep 2006 13:52:46 -0000 1.23 *************** *** 402,414 **** /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ public void move(double x, double y, double z) { ! Vertex move = new Vertex(x, y, z); ! if (constraint != null) { ! move = move.projectOnto(constraint.getDirection()); ! if (!constraint.coincides(getOrigin().add(move))) { ! // If the movement is outside the constraint don't move the edge ! move = new Vertex(0, 0, 0); ! } ! } ! getOrigin().move(move.getX(), move.getY(), move.getZ()); } --- 402,406 ---- /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ public void move(double x, double y, double z) { ! getOrigin().move(x, y, z); } *************** *** 416,420 **** public Vertex canMove(double x, double y, double z, Collection entities) { // TODO Think it through ! return new Vertex(x, y, z); } } --- 408,426 ---- public Vertex canMove(double x, double y, double z, Collection entities) { // TODO Think it through ! Vertex move = new Vertex(x, y, z); ! if (constraint != null) { ! move = move.projectOnto(constraint.getDirection()); ! Vertex to = getOrigin().add(move); ! if (!constraint.coincides(to)) { ! Vertex where = to.minus(constraint.getFrom()); ! Vertex where2 = to.minus(constraint.getTo()); ! if (where.length() > where2.length()) { ! where = where2; ! } ! log.info("there were so long " + where); ! move = where.minus(move); ! } ! } ! return move; } } |
From: Michael L. <he...@us...> - 2006-09-05 12:52:20
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10746/src/net/sourceforge/bprocessor/model/test Modified Files: EdgeTest.java Log Message: started work on new scripting language Index: EdgeTest.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test/EdgeTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EdgeTest.java 5 Sep 2006 11:02:04 -0000 1.3 --- EdgeTest.java 5 Sep 2006 12:52:09 -0000 1.4 *************** *** 224,228 **** /** * Test the offset method in edge with backward direction, gives a ! * offset that acts opposite on the distance variable */ public void testOffset6() { --- 224,228 ---- /** * Test the offset method in edge with backward direction, gives a ! * offset that acts opposite on the distance variable */ public void testOffset6() { |
From: Michael L. <he...@us...> - 2006-09-05 12:52:17
|
Update of /cvsroot/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10746 Modified Files: build.xml Log Message: started work on new scripting language Index: build.xml =================================================================== RCS file: /cvsroot/bprocessor/model/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.xml 10 Aug 2006 15:37:27 -0000 1.15 --- build.xml 5 Sep 2006 12:52:09 -0000 1.16 *************** *** 86,89 **** --- 86,90 ---- </classpath> </antlr> + </target> |
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/evaluator In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10746/src/net/sourceforge/bprocessor/model/evaluator Added Files: Function.java Variable.java Primitive.java Literal.java Operation.java package.html Log Message: started work on new scripting language --- NEW FILE: Variable.java --- //--------------------------------------------------------------------------------- // $Id: Variable.java,v 1.1 2006/09/05 12:52:09 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.evaluator; /** * Variable */ public class Variable { /** id */ private String id; /** * Constructor * @param id String */ public Variable(String id) { super(); this.id = id; } } --- NEW FILE: Primitive.java --- //--------------------------------------------------------------------------------- // $Id: Primitive.java,v 1.1 2006/09/05 12:52:09 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.evaluator; /** * Primitive */ public class Primitive extends Operation { /** add */ public static final int ADD = 1; /** sub */ public static final int SUB = 2; /** mul */ public static final int MUL = 3; /** div */ public static final int DIV = 4; /** neg */ public static final int NEG = 5; /** opcode */ private int opcode; /** * Constructor * @param opcode int */ public Primitive(int opcode) { super(); this.opcode = opcode; } } --- NEW FILE: package.html --- <body> Defines the package that contains the modellor in the model </body> --- NEW FILE: Literal.java --- //--------------------------------------------------------------------------------- // $Id: Literal.java,v 1.1 2006/09/05 12:52:09 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.evaluator; /** * Literal */ public class Literal extends Operation { /** value */ private Object value; /** * Constructor * @param value Object */ public Literal(Object value) { super(); this.value = value; } } --- NEW FILE: Operation.java --- //--------------------------------------------------------------------------------- // $Id: Operation.java,v 1.1 2006/09/05 12:52:09 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.evaluator; /** * Operation * */ public class Operation { /** * Constructor */ public Operation() { super(); } } --- NEW FILE: Function.java --- //--------------------------------------------------------------------------------- // $Id: Function.java,v 1.1 2006/09/05 12:52:08 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.evaluator; import java.util.LinkedList; import java.util.List; /** * Function */ public class Function { /** operations */ private List operations; /** * Constructor */ public Function() { super(); operations = new LinkedList(); } /** * Append operation * @param operation Operation */ public void append(Operation operation) { operations.add(operation); } } |
From: Michael L. <he...@us...> - 2006-09-05 12:52:11
|
Update of /cvsroot/bprocessor/model/src/etc In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10746/src/etc Added Files: bscript.g Log Message: started work on new scripting language --- NEW FILE: bscript.g --- header { package net.sourceforge.bprocessor.model.parser; import net.sourceforge.bprocessor.model.evaluator.*; } class ScriptLexer extends Lexer; options { k=2; // needed for newline junk charVocabulary='\u0000'..'\u007F'; // allow ascii } StartTerm: '(' ; EndTerm: ')' ; Plus : '+' ; Minus : '-' ; Multiply : '*' ; Divide : '/' ; Period : '.' ; End : ';' ; protected Letter : Upper | Lower ; protected Upper : 'A' .. 'Z' ; protected Lower : 'a' .. 'z' ; protected Digit : '0'..'9' ; protected Integer : (Digit)+ ; protected Real : Integer Period Integer ; Number : (Integer Period Integer) => Real | ( Integer ) => Integer ; Identifier : (Letter | '_' ) ( Letter | Digit | '_' )* ; WhiteSpace : ( ' ' | '\r' '\n' | '\n' | '\t' ) {$setType(Token.SKIP);} ; class ScriptParser extends Parser; program[Function env] : expression[env] End ; expression[Function env] : term[env] ( Plus term[env] { env.append(new Primitive(Primitive.ADD)); } | Minus term[env] { env.append(new Primitive(Primitive.SUB)); } )* ; term[Function env] : atom[env] ( Multiply atom[env] { env.append(new Primitive(Primitive.MUL)); } | Divide atom[env] { env.append(new Primitive(Primitive.DIV)); } )* ; atom[Function env] : literal[env] | variable[env] | StartTerm expression[env] EndTerm | unary[env] ; unary[Function env] : Plus atom[env] | Minus atom[env] { env.append(new Primitive(Primitive.NEG)); } ; literal[Function env] : n:Number { env.append(new Literal(new Double(n.getText()))); } ; variable[Function env] : i:Identifier { env.append(new Variable(i.getText())); } ; |
From: Michael L. <he...@us...> - 2006-09-05 12:52:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/evaluator In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10439/src/net/sourceforge/bprocessor/model/evaluator Log Message: Directory /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/evaluator added to the repository |
From: rimestad <rim...@us...> - 2006-09-05 11:37:47
|
Update of /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv12577/src/net/sourceforge/bprocessor/facade/modellor Modified Files: FacadeModellor.java Log Message: added the facade to main Index: FacadeModellor.java =================================================================== RCS file: /cvsroot/bprocessor/facade/src/net/sourceforge/bprocessor/facade/modellor/FacadeModellor.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** FacadeModellor.java 31 Aug 2006 11:24:55 -0000 1.7 --- FacadeModellor.java 5 Sep 2006 11:37:45 -0000 1.8 *************** *** 135,139 **** } ! /** Removes a set of constructors from the facade * @param cons the constructors --- 135,139 ---- } ! /** Removes a set of constructors from the facade * @param cons the constructors *************** *** 257,261 **** space.setModellor(null); } ! /** * Creates the frame for this facade based on frame thickness and depth. --- 257,261 ---- space.setModellor(null); } ! /** * Creates the frame for this facade based on frame thickness and depth. *************** *** 322,326 **** } } ! /** * Removes the current frame so a new one can be created. --- 322,326 ---- } } ! /** * Removes the current frame so a new one can be created. *************** *** 349,359 **** Edge horEdge = null; while (it.hasNext() && ! (vertEdge == null || ! horEdge == null)) { Edge e = (Edge)it.next(); if (Math.abs(e.getDirection().dot(new Vertex(0, 0, 1))) < 0.0001) { horEdge = e; } else if (Math.abs(e.getDirection().dot(new Vertex(1, 0, 0))) < 0.0001 && ! Math.abs(e.getDirection().dot(new Vertex(0, 1, 0))) < 0.0001) { vertEdge = e; } --- 349,359 ---- Edge horEdge = null; while (it.hasNext() && ! (vertEdge == null || ! horEdge == null)) { Edge e = (Edge)it.next(); if (Math.abs(e.getDirection().dot(new Vertex(0, 0, 1))) < 0.0001) { horEdge = e; } else if (Math.abs(e.getDirection().dot(new Vertex(1, 0, 0))) < 0.0001 && ! Math.abs(e.getDirection().dot(new Vertex(0, 1, 0))) < 0.0001) { vertEdge = e; } *************** *** 379,383 **** lengthV += (vertPostWidth / 2); offset.scale(lengthV / offset.length()); ! Line l = new Line(cross.add(offset), vertDir.copy(), true); lengthV += (intervalV + (vertPostWidth / 2)); vertCons.add(l); --- 379,383 ---- lengthV += (vertPostWidth / 2); offset.scale(lengthV / offset.length()); ! Line l = new Line(cross.add(offset), vertDir.copy(), horEdge, true, true); lengthV += (intervalV + (vertPostWidth / 2)); vertCons.add(l); *************** *** 391,395 **** lengthH += (horPostWidth / 2); offset.scale(lengthH / offset.length()); ! Line l = new Line(cross.add(offset), horDir.copy(), true); lengthH += (intervalH + (horPostWidth / 2)); horCons.add(l); --- 391,395 ---- lengthH += (horPostWidth / 2); offset.scale(lengthH / offset.length()); ! Line l = new Line(cross.add(offset), horDir.copy(), vertEdge, true, true); lengthH += (intervalH + (horPostWidth / 2)); horCons.add(l); *************** *** 399,410 **** offset = vertDir.copy(); offset.scale(frameThickness / offset.length()); ! topBound = new Line(cross.add(offset), horDir); offset.scale((vertEdge.getLength() - frameThickness) / offset.length()); ! bottomBound = new Line(cross.add(offset), horDir); offset = horDir.copy(); offset.scale(frameThickness / offset.length()); ! leftBound = new Line(cross.add(offset), vertDir); offset.scale((horEdge.getLength() - frameThickness) / offset.length()); ! rightBound = new Line(cross.add(offset), vertDir); } } --- 399,410 ---- offset = vertDir.copy(); offset.scale(frameThickness / offset.length()); ! topBound = new Line(cross.add(offset), horDir, vertEdge, true, true); offset.scale((vertEdge.getLength() - frameThickness) / offset.length()); ! bottomBound = new Line(cross.add(offset), horDir, vertEdge, true, true); offset = horDir.copy(); offset.scale(frameThickness / offset.length()); ! leftBound = new Line(cross.add(offset), vertDir, horEdge, true, true); offset.scale((horEdge.getLength() - frameThickness) / offset.length()); ! rightBound = new Line(cross.add(offset), vertDir, horEdge, true, true); } } *************** *** 434,438 **** } } ! /** * Runs through the horizontal constructors to create holes for windows. --- 434,438 ---- } } ! /** * Runs through the horizontal constructors to create holes for windows. *************** *** 454,458 **** createHole(oldV, currentV, oldH, bottomBound); } ! /** * Creates a hole based on four boundry lines --- 454,458 ---- createHole(oldV, currentV, oldH, bottomBound); } ! /** * Creates a hole based on four boundry lines |
From: rimestad <rim...@us...> - 2006-09-05 11:02:10
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30683/src/net/sourceforge/bprocessor/model/test Modified Files: EdgeTest.java Log Message: Added a test of coincides Index: EdgeTest.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/test/EdgeTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EdgeTest.java 28 Aug 2006 16:44:41 -0000 1.2 --- EdgeTest.java 5 Sep 2006 11:02:04 -0000 1.3 *************** *** 223,227 **** /** ! * Test the offset method in edge with backward direction */ public void testOffset6() { --- 223,228 ---- /** ! * Test the offset method in edge with backward direction, gives a ! * offset that acts opposite on the distance variable */ public void testOffset6() { *************** *** 240,260 **** edges.add(e1); Surface s = new Surface(edges); ! List offset = Edge.offset(edges, s, -1); Edge e = (Edge)offset.get(0); ! assertEquals(2.0, e.getFrom().getX(), 0.0001); assertEquals(1.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(1); ! assertEquals(2.0, e.getFrom().getX(), 0.0001); assertEquals(2.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(2); ! assertEquals(1.0, e.getFrom().getX(), 0.0001); assertEquals(2.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(3); ! assertEquals(1.0, e.getFrom().getX(), 0.0001); assertEquals(1.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); } } --- 241,279 ---- edges.add(e1); Surface s = new Surface(edges); ! List offset = Edge.offset(edges, s, 1); Edge e = (Edge)offset.get(0); ! assertEquals(1.0, e.getFrom().getX(), 0.0001); assertEquals(1.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(1); ! assertEquals(1.0, e.getFrom().getX(), 0.0001); assertEquals(2.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(2); ! assertEquals(2.0, e.getFrom().getX(), 0.0001); assertEquals(2.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); e = (Edge)offset.get(3); ! assertEquals(2.0, e.getFrom().getX(), 0.0001); assertEquals(1.0, e.getFrom().getY(), 0.0001); assertEquals(0.0, e.getFrom().getZ(), 0.0001); } + + /** Test the coinside method in edge */ + public void testCoincides() { + Vertex v1 = new Vertex(0, 0, 0); + Vertex v2 = new Vertex(10, 0, 0); + Edge e = new Edge(v1, v2); + assertTrue(e.coincides(v1)); + assertTrue(e.coincides(v2)); + assertTrue(e.coincides(new Vertex(5, 0, 0))); + assertFalse(e.coincides(new Vertex(-3, 0, 0))); + assertFalse(e.coincides(new Vertex(15, 0, 0))); + + v2.setY(10); + assertTrue(e.coincides(new Vertex(5, 5, 0))); + assertFalse(e.coincides(new Vertex(10, 5, 0))); + assertFalse(e.coincides(new Vertex(-1, -1, 0))); + assertFalse(e.coincides(new Vertex(14, 14, 0))); + } } |
From: rimestad <rim...@us...> - 2006-09-05 11:01:51
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30487/src/net/sourceforge/bprocessor/gl/tool Modified Files: MoveTool.java VectorMoveTool.java ControlledMoveTool.java Log Message: Added canMove to all geometric objects that are supposed to given a direction check how much of is is leagal to move. Made vectorMove check the geometry for the possible move distance before moving. The move method in the movetools now return a vector that is the actual moved vector. When there are only one selected object then the object is moved otherwise the collection of affected vertices are. Index: ControlledMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ControlledMoveTool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ControlledMoveTool.java 21 Aug 2006 14:25:13 -0000 1.3 --- ControlledMoveTool.java 5 Sep 2006 11:01:43 -0000 1.4 *************** *** 225,233 **** /** ! * Move the vertices ! * @param objects Collection of geometric objects ! * @param delta Vertex (vector) */ ! public void move(Collection objects, Vertex delta) { if (slideMap != null && slideMap.keySet().containsAll(vertices)) { Vertex directionCopy = direction.copy(); --- 225,231 ---- /** ! * @see net.sourceforge.bprocessor.gl.tool.MoveTool#move(Collection, Vertex) */ ! public Vertex move(Collection objects, Vertex delta) { if (slideMap != null && slideMap.keySet().containsAll(vertices)) { Vertex directionCopy = direction.copy(); *************** *** 265,269 **** --- 263,269 ---- Project.getInstance().changed(vertices); } + return delta; } + return new Vertex(0, 0, 0); } Index: MoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/MoveTool.java,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -d -r1.66 -r1.67 *** MoveTool.java 28 Aug 2006 05:53:53 -0000 1.66 --- MoveTool.java 5 Sep 2006 11:01:43 -0000 1.67 *************** *** 31,35 **** * Move Tool */ ! public class MoveTool extends AbstractPencil { /** Entities */ protected Set entities = new HashSet(); --- 31,35 ---- * Move Tool */ ! public abstract class MoveTool extends AbstractPencil { /** Entities */ protected Set entities = new HashSet(); *************** *** 69,76 **** * @param objects Collection of geometric objects * @param delta Vertex (vector) */ ! public void move(Collection objects, Vertex delta) { ! ! } /** --- 69,75 ---- * @param objects Collection of geometric objects * @param delta Vertex (vector) + * @return The achieved movement */ ! public abstract Vertex move(Collection objects, Vertex delta); /** *************** *** 151,157 **** current = current.copy(); to = current.vertex(); ! move(vertices, to.minus(last)); update(); - last = to; updateFeedback(); } --- 150,159 ---- current = current.copy(); to = current.vertex(); ! if (Selection.primary().size() < 2) { ! last = move(entities, to.minus(last)).add(last); ! } else { ! last = move(vertices, to.minus(last)).add(last); ! } update(); updateFeedback(); } Index: VectorMoveTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/VectorMoveTool.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** VectorMoveTool.java 21 Aug 2006 14:25:13 -0000 1.4 --- VectorMoveTool.java 5 Sep 2006 11:01:43 -0000 1.5 *************** *** 32,45 **** /** ! * Move the vertices ! * @param objects Collection of geometric objects ! * @param delta Vertex (vector) */ ! public void move(Collection objects, Vertex delta) { if (objects != null) { Iterator it = objects.iterator(); while (it.hasNext()) { Object elm = it.next(); if (elm instanceof Geometric) { ((Geometric)elm).move(delta.getX(), delta.getY(), delta.getZ()); } --- 32,53 ---- /** ! * @see net.sourceforge.bprocessor.gl.tool.MoveTool#move(Collection, Vertex) */ ! public Vertex move(Collection objects, Vertex delta) { if (objects != null) { + // Find the movable distance Iterator it = objects.iterator(); while (it.hasNext()) { Object elm = it.next(); if (elm instanceof Geometric) { + Vertex move = ((Geometric)elm).canMove(delta.getX(), delta.getY(), delta.getZ(), objects); + delta = move; + } + } + // Move + it = objects.iterator(); + while (it.hasNext()) { + Object elm = it.next(); + if (elm instanceof Geometric) { ((Geometric)elm).move(delta.getX(), delta.getY(), delta.getZ()); } *************** *** 47,50 **** --- 55,59 ---- Project.getInstance().changed(vertices); } + return delta; } } |
From: rimestad <rim...@us...> - 2006-09-05 11:01:48
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv30459/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Vertex.java ClippingPlane.java Surface.java Line.java Space.java Geometric.java Point.java CoordinateSystem.java Constructor.java Log Message: Added canMove to all geometric objects that are supposed to given a direction check how much of is is leagal to move. Made vectorMove check the geometry for the possible move distance before moving. The move method in the movetools now return a vector that is the actual moved vector. When there are only one selected object then the object is moved otherwise the collection of affected vertices are. Index: Constructor.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Constructor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Constructor.java 11 Aug 2006 12:44:21 -0000 1.9 --- Constructor.java 5 Sep 2006 11:01:37 -0000 1.10 *************** *** 7,10 **** --- 7,11 ---- package net.sourceforge.bprocessor.model; + import java.util.Collection; import java.util.LinkedList; import java.util.List; *************** *** 127,133 **** * @param z the movement in z */ ! public void move(double x, double y, double z) { ! getOrigin().add(new Vertex(x, y, z)); ! } /** --- 128,132 ---- * @param z the movement in z */ ! public abstract void move(double x, double y, double z); /** *************** *** 179,182 **** --- 178,191 ---- return "Handle{" + parent() + "}"; } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public void move(double x, double y, double z) { + parent().move(x, y, z); + } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + return parent().canMove(x, y, z, entities); + } } } Index: CoordinateSystem.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/CoordinateSystem.java,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CoordinateSystem.java 14 Aug 2006 08:27:16 -0000 1.25 --- CoordinateSystem.java 5 Sep 2006 11:01:37 -0000 1.26 *************** *** 9,12 **** --- 9,13 ---- import java.util.ArrayList; + import java.util.Collection; import java.util.HashSet; import java.util.Iterator; *************** *** 76,79 **** --- 77,93 ---- } + /** + * @see net.sourceforge.bprocessor.model.Constructor#move(double, double, double) + */ + public void move(double x, double y, double z) { + getOrigin().move(x, y, z); + } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } + /** * normalize vectors Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.107 retrieving revision 1.108 diff -C2 -d -r1.107 -r1.108 *** Surface.java 29 Aug 2006 10:05:11 -0000 1.107 --- Surface.java 5 Sep 2006 11:01:36 -0000 1.108 *************** *** 892,898 **** } } ! if (exterior != null) { if (!exterior.surrounds(this)) { //The inner surface has been moved out of its outer surface //this can not happen so here we move the inner surface back --- 892,899 ---- } } ! /* NOT THE JOB FOR SURFACE if (exterior != null) { if (!exterior.surrounds(this)) { + log.info("Did move the surface back"); //The inner surface has been moved out of its outer surface //this can not happen so here we move the inner surface back *************** *** 915,921 **** } } ! } } /** * Tests if a surface is a hole in this surface --- 916,934 ---- } } ! }*/ } + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + Vertex dir = new Vertex(x, y, z); + if (this.getExterior() != null) { + if (!entities.contains(this.getExterior())) { + // Restricted to be in plane of the exterior surface + dir = getExterior().plane().project(dir); + } + } + return dir; + } + /** * Tests if a surface is a hole in this surface *************** *** 933,936 **** --- 946,964 ---- } } + iter = hole.getEdges().iterator(); + while (iter.hasNext()) { + Edge current = (Edge) iter.next(); + Iterator inner = getEdges().iterator(); + while (inner.hasNext()) { + Edge e = (Edge) inner.next(); + Edge inter = e.intersection(current); + if (inter != null && inter.getLength() < 0.00001) { + boolean res = (current.coincides(inter.getFrom()) && e.coincides(inter.getFrom())); + if (res) { + return false; + } + } + } + } return true; } Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Edge.java 29 Aug 2006 10:05:11 -0000 1.55 --- Edge.java 5 Sep 2006 11:01:36 -0000 1.56 *************** *** 221,224 **** --- 221,230 ---- } + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } + /** * Find the intersection between this Edge and the Other. *************** *** 429,433 **** t = (q.getZ() - p0.getZ()) / r.getZ(); } ! if ((t > 0 && t < 1)) { r.scale(t); Vertex p = p0.add(r).minus(q); --- 435,439 ---- t = (q.getZ() - p0.getZ()) / r.getZ(); } ! if ((t >= 0 && t <= 1)) { r.scale(t); Vertex p = p0.add(r).minus(q); *************** *** 539,543 **** * Create a offset from a list of lines and a surface * PRECONDITION: all the edges have to be in the given surface and the edges ! * in the surface have to be counter clockwise drawn. * @param which The list of edges in inner that are going to be offset * @param inner The surface --- 545,550 ---- * Create a offset from a list of lines and a surface * PRECONDITION: all the edges have to be in the given surface and the edges ! * in the surface have to be counter clockwise drawn. If the edges are drawn clockwise ! * the offset will be negative outside and positive inside * @param which The list of edges in inner that are going to be offset * @param inner The surface Index: ClippingPlane.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/ClippingPlane.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ClippingPlane.java 21 Aug 2006 14:18:50 -0000 1.7 --- ClippingPlane.java 5 Sep 2006 11:01:36 -0000 1.8 *************** *** 281,283 **** --- 281,288 ---- center().move(x, y, z); } + + /** @see net.sourceforge.bprocessor.model.Geometric#canMove(double, double, double, Collection) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + return new Vertex(x, y, z).projectOnto(plane.normal()); + } } Index: Point.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Point.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Point.java 31 Jul 2006 11:25:51 -0000 1.7 --- Point.java 5 Sep 2006 11:01:37 -0000 1.8 *************** *** 8,11 **** --- 8,12 ---- import java.util.ArrayList; + import java.util.Collection; import java.util.HashSet; import java.util.List; *************** *** 31,34 **** --- 32,48 ---- super(); } + + /** + * @see net.sourceforge.bprocessor.model.Constructor#move(double, double, double) + */ + public void move(double x, double y, double z) { + getOrigin().move(x, y, z); + } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } /** Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** Space.java 5 Sep 2006 09:44:08 -0000 1.56 --- Space.java 5 Sep 2006 11:01:37 -0000 1.57 *************** *** 1699,1703 **** /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double)*/ public void move(double x, double y, double z) { ! Iterator iter = getVertices().iterator(); while (iter.hasNext()) { ((Vertex)iter.next()).move(x, y, z); --- 1699,1703 ---- /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double)*/ public void move(double x, double y, double z) { ! Iterator iter = collect().iterator(); while (iter.hasNext()) { ((Vertex)iter.next()).move(x, y, z); *************** *** 1705,1708 **** --- 1705,1714 ---- } + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } + /** * Perform a consistency check of the geometry. Index: Line.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Line.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Line.java 29 Aug 2006 09:30:57 -0000 1.21 --- Line.java 5 Sep 2006 11:01:37 -0000 1.22 *************** *** 8,11 **** --- 8,12 ---- import java.util.ArrayList; + import java.util.Collection; import java.util.HashSet; import java.util.LinkedList; *************** *** 30,33 **** --- 31,37 ---- private Vertex dir; + /** The edge the center of this Line is to be moved on */ + private Edge constraint; + /** * Empty constructor for persistence only *************** *** 79,82 **** --- 83,99 ---- this.dir = dir; } + + /** + * Constructor of the Line with orgin and three angles + * @param origin The origin + * @param dir The vector of direction + * @param constraint The bounded placements + * @param active If the constructor is active + * @param editable If the constructor is editable + */ + public Line(Vertex origin, Vertex dir, Edge constraint, boolean active, boolean editable) { + this(origin, dir, active, editable); + this.constraint = constraint; + } /** *************** *** 382,384 **** --- 399,420 ---- return "L-" + getId(); } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public void move(double x, double y, double z) { + Vertex move = new Vertex(x, y, z); + if (constraint != null) { + move = move.projectOnto(constraint.getDirection()); + if (!constraint.coincides(getOrigin().add(move))) { + // If the movement is outside the constraint don't move the edge + move = new Vertex(0, 0, 0); + } + } + getOrigin().move(move.getX(), move.getY(), move.getZ()); + } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } } Index: Geometric.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Geometric.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Geometric.java 21 Aug 2006 14:18:50 -0000 1.10 --- Geometric.java 5 Sep 2006 11:01:37 -0000 1.11 *************** *** 8,11 **** --- 8,12 ---- package net.sourceforge.bprocessor.model; + import java.util.Collection; import java.util.Set; *************** *** 83,85 **** --- 84,96 ---- */ public abstract void move(double x, double y, double z); + + /** + * Check how much of the give direction this object can move + * @param x the x distance + * @param y the y distance + * @param z the z distance + * @param entities The other entities that are to be moved as well + * @return The possible distance vector this object can move + */ + public abstract Vertex canMove(double x, double y, double z, Collection entities); } Index: Vertex.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Vertex.java,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** Vertex.java 29 Aug 2006 10:05:11 -0000 1.44 --- Vertex.java 5 Sep 2006 11:01:36 -0000 1.45 *************** *** 335,339 **** * @param dx The x distance * @param dy The y distance ! * @param dz The z distance */ public void move(double dx, double dy, double dz) { --- 335,339 ---- * @param dx The x distance * @param dy The y distance ! * @param dz The z distance. */ public void move(double dx, double dy, double dz) { *************** *** 477,479 **** --- 477,485 ---- return null; } + + /** @see net.sourceforge.bprocessor.model.Geometric#move(double, double, double) */ + public Vertex canMove(double x, double y, double z, Collection entities) { + // TODO Think it through + return new Vertex(x, y, z); + } } |
From: rimestad <rim...@us...> - 2006-09-05 09:52:17
|
Update of /cvsroot/bprocessor/bprocessor/src/net/sourceforge/bprocessor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2899/src/net/sourceforge/bprocessor Modified Files: Application.java Log Message: Added initialisisation of the logger, all that is needed is to give "${workspace_loc}\kernel\src\etc\log4j.properties" as a argument to the main method in Application, is done in the field program arguments above the WM arguments Index: Application.java =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/src/net/sourceforge/bprocessor/Application.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Application.java 30 Aug 2006 12:23:36 -0000 1.1 --- Application.java 5 Sep 2006 09:52:08 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- import net.sourceforge.bprocessor.gl.GLView; import net.sourceforge.bprocessor.gui.GUI; + import org.apache.log4j.PropertyConfigurator; public class Application { *************** *** 15,18 **** --- 16,22 ---- */ public static void main(String[] args) { + if (args.length > 0) { + PropertyConfigurator.configure(args[0]); + } GUI gui = new GUI(); gui.createMenus(); *************** *** 20,23 **** --- 24,28 ---- gui.start(); GLView gl = new GLView(); + } } |
From: Nikolaj B. <nbr...@us...> - 2006-09-05 09:44:12
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32165/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Classifictaion is now different on the different levels (also part level supported) Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** Space.java 5 Sep 2006 07:27:47 -0000 1.55 --- Space.java 5 Sep 2006 09:44:08 -0000 1.56 *************** *** 109,120 **** {"None", "Exteriør", "Stue", "Badeværelse", "Opvarmet rum", "Uopvarmet rum"}; ! /** The construcstionspace classification options */ private String[] elementConstructionOptions = {"None", "Karm", "Sprosse", "Post", "Vindue 2lag termo", "Vindue 3lag termo"}; ! /** The functionalspace classification options */ private String[] elementFunctionalOptions = {"None"}; /** The modellor */ private Modellor modellor; --- 109,128 ---- {"None", "Exteriør", "Stue", "Badeværelse", "Opvarmet rum", "Uopvarmet rum"}; ! /** The construcstionspace on part element, classification options */ private String[] elementConstructionOptions = {"None", "Karm", "Sprosse", "Post", "Vindue 2lag termo", "Vindue 3lag termo"}; ! /** The functionalspace on part element, classification options */ private String[] elementFunctionalOptions = {"None"}; + /** The construcstionspace on part level, classification options */ + private String[] partConstructionOptions = + {"None"}; + + /** The functionalspace on part level, classification options */ + private String[] partFunctionalOptions = + {"None"}; + /** The modellor */ private Modellor modellor; *************** *** 1108,1112 **** } } else { ! System.out.println("This space is on part level - implementation pending"); } --- 1116,1124 ---- } } else { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", partConstructionOptions, getClassification())); ! } else { ! res.add(new Attribute("Classification", partFunctionalOptions, getClassification())); ! } } |
From: Nikolaj B. <nbr...@us...> - 2006-09-05 07:28:41
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv10303/src/net/sourceforge/bprocessor/gui/actions Modified Files: ToolsEnergyActionListener.java Log Message: Fixed a minor bug resulting in a null pointer error Index: ToolsEnergyActionListener.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/actions/ToolsEnergyActionListener.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ToolsEnergyActionListener.java 21 Aug 2006 20:32:42 -0000 1.4 --- ToolsEnergyActionListener.java 5 Sep 2006 07:28:39 -0000 1.5 *************** *** 168,174 **** if (spa != null && ! spa.getClassification().equalsIgnoreCase("Stue") || spa.getClassification().equalsIgnoreCase("Badeværelse") || ! spa.getClassification().equalsIgnoreCase("Opvarmet rum")) { relevant = true; --- 168,174 ---- if (spa != null && ! (spa.getClassification().equalsIgnoreCase("Stue") || spa.getClassification().equalsIgnoreCase("Badeværelse") || ! spa.getClassification().equalsIgnoreCase("Opvarmet rum"))) { relevant = true; |
From: Nikolaj B. <nbr...@us...> - 2006-09-05 07:27:56
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv9901/src/net/sourceforge/bprocessor/model Modified Files: Space.java Log Message: Classifictaion is now different on the different levels Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** Space.java 31 Aug 2006 13:01:39 -0000 1.54 --- Space.java 5 Sep 2006 07:27:47 -0000 1.55 *************** *** 109,112 **** --- 109,120 ---- {"None", "Exteriør", "Stue", "Badeværelse", "Opvarmet rum", "Uopvarmet rum"}; + /** The construcstionspace classification options */ + private String[] elementConstructionOptions = + {"None", "Karm", "Sprosse", "Post", "Vindue 2lag termo", "Vindue 3lag termo"}; + + /** The functionalspace classification options */ + private String[] elementFunctionalOptions = + {"None"}; + /** The modellor */ private Modellor modellor; *************** *** 1085,1093 **** res.add(new Attribute("ID", getId().toString(), false)); res.add(new Attribute("Owner", getOwner(), false)); ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", constructionOptions, getClassification())); } else { ! res.add(new Attribute("Classification", functionalOptions, getClassification())); } if (isConstructionSpace()) { if (isTransparent()) { --- 1093,1115 ---- res.add(new Attribute("ID", getId().toString(), false)); res.add(new Attribute("Owner", getOwner(), false)); ! if (getOwner() == Project.getInstance().world()) { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", constructionOptions, getClassification())); ! } else { ! res.add(new Attribute("Classification", functionalOptions, getClassification())); ! } ! } ! ! if (getOwner().getOwner() == Project.getInstance().world()) { ! if (isConstructionSpace()) { ! res.add(new Attribute("Classification", elementConstructionOptions, getClassification())); ! } else { ! res.add(new Attribute("Classification", elementFunctionalOptions, getClassification())); ! } } else { ! System.out.println("This space is on part level - implementation pending"); } + + if (isConstructionSpace()) { if (isTransparent()) { |
From: Michael L. <he...@us...> - 2006-08-31 13:01:55
|
Update of /cvsroot/bprocessor/bprocessor In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8152 Modified Files: .cvsignore Log Message: Implemented a space-checking method that is invoked by the menu on a space Index: .cvsignore =================================================================== RCS file: /cvsroot/bprocessor/bprocessor/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 30 Aug 2006 10:50:57 -0000 1.1 --- .cvsignore 31 Aug 2006 13:01:52 -0000 1.2 *************** *** 4,5 **** --- 4,6 ---- *.zip *.tar.bz2 + bin |
From: Michael L. <he...@us...> - 2006-08-31 13:01:51
|
Update of /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8128/src/net/sourceforge/bprocessor/kernel Modified Files: Main.java Log Message: Implemented a space-checking method that is invoked by the menu on a space Index: Main.java =================================================================== RCS file: /cvsroot/bprocessor/kernel/src/net/sourceforge/bprocessor/kernel/Main.java,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Main.java 27 Jun 2005 09:12:30 -0000 1.1.1.1 --- Main.java 31 Aug 2006 13:01:43 -0000 1.2 *************** *** 212,215 **** --- 212,217 ---- File f = new File("log4j.properties"); if (f.exists()) { + System.out.println("configuring log4j"); + PropertyConfigurator.configure("log4j.properties"); } |
From: Michael L. <he...@us...> - 2006-08-31 13:01:51
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8138/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: Implemented a space-checking method that is invoked by the menu on a space Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** GenericTreeView.java 28 Aug 2006 05:54:04 -0000 1.38 --- GenericTreeView.java 31 Aug 2006 13:01:49 -0000 1.39 *************** *** 519,522 **** --- 519,530 ---- }; pm.add(flip); + AbstractAction check = new EntityAction((Entity) object, "Check") { + public void actionPerformed(ActionEvent arg0) { + Space space = (Space) entity; + space.check(); + } + }; + pm.add(check); + // Adding all modellors Collection c = Modellor.getRegisteredModellors(); |