]> gerrit.simantics Code Review - simantics/3d.git/blobdiff - org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/controlpoint/PipingRules.java
Compiler warning elimination
[simantics/3d.git] / org.simantics.plant3d / src / org / simantics / plant3d / scenegraph / controlpoint / PipingRules.java
index eb07e9c0f86c5d1340eabc5da22931f12bfe893f..f5c6f876a98d507eca60c31bcd809dd8f25bb37d 100644 (file)
@@ -375,6 +375,7 @@ public class PipingRules {
 
        }
 
+       @SuppressWarnings("unused")
        private static boolean calculateOffset(Vector3d startPoint, Vector3d endPoint, ArrayList<PipeControlPoint> list, Vector3d dir, Vector3d offset) {
                boolean hasOffsets = false;
                List<PipeControlPoint> offsets = new ArrayList<PipeControlPoint>(list.size());
@@ -718,7 +719,7 @@ public class PipingRules {
                                                                                                        // position of the
                                                                                                        // component
                                dir.add(prevPos);
-                               PipeControlPoint scp = insertStraight(prev, icp, dir, length);
+                               insertStraight(prev, icp, dir, length);
                                return true;
                        } else {
                                triedIR = true;
@@ -1372,6 +1373,7 @@ public class PipingRules {
        // end,Point3d endPoint, Vector3d dir, boolean hasOffsets,int iter, boolean
        // reversed, ArrayList<ExpandIterInfo> toRemove) throws TransactionException
        // {
+       @SuppressWarnings("unused")
        private static void processPathLegNoOffset(UpdateStruct2 u) throws Exception {
                if (DEBUG)
                        System.out.println("PipingRules.processPathLeg " + u.start + " " + u.end);
@@ -1876,7 +1878,6 @@ public class PipingRules {
                        // this should not be possible
                        throw new RuntimeException("VariableLengthComponent " + splittingComponent + " is not connected to anything.");
                }
-               double reservedLength = splittingComponent.getControlPoint().getLength();
                double newLength = newComponent.getControlPoint().getLength();
                
                
@@ -1912,21 +1913,20 @@ public class PipingRules {
                vn.interpolate(next, 0.5);
                
                
-               PipeControlPoint newVariableLengthCP = null;//insertStraight(pcp1, pcp2, pos, length);
                if (nextCP == null) {
                        newCP.insert(splittingCP, Direction.NEXT);
-                       newVariableLengthCP = insertStraight(newCP, Direction.NEXT, new Vector3d(vn), ln);
+                       insertStraight(newCP, Direction.NEXT, new Vector3d(vn), ln);
                        splittingCP.setWorldPosition(new Vector3d(vp));
 //                     ControlPointTools.setWorldPosition(splittingCP, vp);
 //                     splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, lp);
                } else if (prevCP == null) {
                        newCP.insert(splittingCP, Direction.PREVIOUS);
-                       newVariableLengthCP = insertStraight(newCP, Direction.PREVIOUS, new Vector3d(vp), lp);
+                       insertStraight(newCP, Direction.PREVIOUS, new Vector3d(vp), lp);
                        splittingCP.setWorldPosition(new Vector3d(vn));
 //                     splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, ln);
                } else {
                        newCP.insert(splittingCP, nextCP);
-                       newVariableLengthCP = insertStraight(newCP, nextCP, new Vector3d(vn), ln);
+                       insertStraight(newCP, nextCP, new Vector3d(vn), ln);
                        splittingCP.setWorldPosition(new Vector3d(vp));
 //                     splittingCP.setRelatedScalarDouble(ProcessResource.plant3Dresource.HasLength, lp);
                }