[Bprocessor-commit] gl/src/net/sourceforge/bprocessor/gl/tool ExtrusionTool.java,1.23,1.24
Status: Pre-Alpha
Brought to you by:
henryml
From: Nordholt <nor...@us...> - 2005-11-01 16:22:35
|
Update of /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19058 Modified Files: ExtrusionTool.java Log Message: Fixed space assignment when extruding holes Index: ExtrusionTool.java =================================================================== RCS file: /cvsroot/bprocessor/gl/src/net/sourceforge/bprocessor/gl/tool/ExtrusionTool.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** ExtrusionTool.java 28 Oct 2005 08:26:57 -0000 1.23 --- ExtrusionTool.java 1 Nov 2005 16:22:26 -0000 1.24 *************** *** 19,24 **** import net.sourceforge.bprocessor.model.Surface; import net.sourceforge.bprocessor.model.Vertex; - //import net.sourceforge.bprocessor.model.ConstructionSpace; - //import net.sourceforge.bprocessor.model.FunctionalSpace; import net.sourceforge.bprocessor.model.Domain; import net.sourceforge.bprocessor.model.Plane; --- 19,22 ---- *************** *** 165,182 **** Surface top = (Surface)extrudedSurfaces.getFirst(); Surface bottom = (Surface)extrudedSurfaces.getLast(); - Vertex norm = bottom.normal(); Vertex dir = top.center().minus(bottom.center()); Domain front = bottom.getFrontDomain(); Domain back = bottom.getBackDomain(); assignSpaces(extrudedSurfaces); Iterator innerIt = innerExSurfs.iterator(); while (innerIt.hasNext()) { LinkedList innerSurfs = (LinkedList)innerIt.next(); assignSpaces(innerSurfs); innerSurfs.removeFirst(); ! if (norm.dot(dir) > 0) { ! assignFronts(front, innerSurfs); } else { ! assignBacks(back, innerSurfs); } } --- 163,190 ---- Surface top = (Surface)extrudedSurfaces.getFirst(); Surface bottom = (Surface)extrudedSurfaces.getLast(); Vertex dir = top.center().minus(bottom.center()); Domain front = bottom.getFrontDomain(); Domain back = bottom.getBackDomain(); assignSpaces(extrudedSurfaces); + + Vertex norm = bottom.normal(); Iterator innerIt = innerExSurfs.iterator(); while (innerIt.hasNext()) { LinkedList innerSurfs = (LinkedList)innerIt.next(); + Vertex innerNorm = ((Surface)innerSurfs.getLast()).normal(); assignSpaces(innerSurfs); innerSurfs.removeFirst(); ! if (innerNorm.dot(dir) > 0) { ! if (innerNorm.dot(norm) > 0) { ! assignFronts(front, innerSurfs); ! } else { ! assignFronts(back, innerSurfs); ! } } else { ! if (innerNorm.dot(norm) > 0) { ! assignBacks(back, innerSurfs); ! } else { ! assignBacks(front, innerSurfs); ! } } } *************** *** 221,225 **** back.addSurface(surf); Project.getInstance().update(back); ! } } } --- 229,233 ---- back.addSurface(surf); Project.getInstance().update(back); ! } } } *************** *** 365,369 **** /* Note the first surface of the extensions lists is the top of the ! hole extension and the last surface is the bottom. This is used when assigning spaces to the surfaces. */ --- 373,377 ---- /* Note the first surface of the extensions lists is the top of the ! hole-extension and the last surface is the bottom. This is used when assigning spaces to the surfaces. */ |