[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Edge.java, 1.74, 1.75
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-03-12 16:01:36
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv18159/src/net/sourceforge/bprocessor/model Modified Files: Edge.java Log Message: made minor changes to extrudetool, and made extrude of edges extrude against a plane Index: Edge.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Edge.java,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** Edge.java 8 Mar 2007 12:07:28 -0000 1.74 --- Edge.java 12 Mar 2007 16:01:26 -0000 1.75 *************** *** 951,959 **** * Extrude a set of lines in a given direction, create the surfaces in between * @param edges The edges to extrude ! * @param direction the direction of the extrusion * @return the generated surfaces during extrusion */ ! public static Collection<Geometric> extrude(Set<Edge> edges, Vertex direction) { ! Collection<Geometric> extrusion = new ArrayList<Geometric>(); if (edges == null || edges.isEmpty() || direction == null) { return extrusion; --- 951,960 ---- * Extrude a set of lines in a given direction, create the surfaces in between * @param edges The edges to extrude ! * @param direction The direction to extrude in ! * @param onto the plane to extrude to (null if there is none) * @return the generated surfaces during extrusion */ ! public static Collection<Surface> extrude(Collection<Edge> edges, Vertex direction, Plane onto) { ! Collection<Surface> extrusion = new ArrayList<Surface>(); if (edges == null || edges.isEmpty() || direction == null) { return extrusion; *************** *** 966,970 **** // generate new vertexes and edges to them for (Vertex v : vertexes) { ! Vertex newv = v.add(direction); vertexmap.put(v, newv); Edge newe = new Edge(v, newv); --- 967,981 ---- // generate new vertexes and edges to them for (Vertex v : vertexes) { ! Vertex addon = direction; ! if (onto != null) { ! addon = onto.intersection(v, direction, true); ! if (addon == null) { ! log.info("intersection were null"); ! addon = direction; ! } else { ! addon = addon.minus(v); ! } ! } ! Vertex newv = v.add(addon); vertexmap.put(v, newv); Edge newe = new Edge(v, newv); |