X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.plant3d%2Fsrc%2Forg%2Fsimantics%2Fplant3d%2Fscenegraph%2FPipelineComponent.java;h=35df6121bb9575b30375619cad1b83f228ebbb49;hb=9070983be64f9f107e0a6388549aad475fcd9d76;hp=fd085db11bb530f4007fbd1fabda812166a9c24b;hpb=c44f3e6a480f19b26a586a271ac200f051c60cf2;p=simantics%2F3d.git diff --git a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java index fd085db1..35df6121 100644 --- a/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java +++ b/org.simantics.plant3d/src/org/simantics/plant3d/scenegraph/PipelineComponent.java @@ -32,6 +32,8 @@ import org.simantics.plant3d.scenegraph.controlpoint.PipingRules; */ @PropertyContributor public abstract class PipelineComponent extends GeometryNode { + + private static boolean DEBUG = false; private PipeRun pipeRun; @@ -91,7 +93,6 @@ public abstract class PipelineComponent extends GeometryNode { @Override @CompoundRelatedGetValue(objRelation=Plant3D.URIs.hasParameter,objType=Plant3D.URIs.Parameter,valRelation=Plant3D.URIs.hasParameterValue) - @CompoundGetPropertyValue(name="Parameters",tabId="Parameters",value="parameters") public Map getParameterMap() { return super.getParameterMap(); } @@ -107,6 +108,8 @@ public abstract class PipelineComponent extends GeometryNode { // TODO : how to filter parameters that are calculated by geometry provider? Map map = new HashMap(getParameterMap()); map.remove("radius"); + map.remove("radius2"); + map.remove("offset"); return map; } @@ -135,11 +138,12 @@ public abstract class PipelineComponent extends GeometryNode { this.next._removeRef(this); this.next = comp; this.syncnext = false; + if (DEBUG) System.out.println(this + " next " + comp); syncNext(); firePropertyChanged(Plant3D.URIs.HasNext); if (comp != null) comp.sync(); -// System.out.println(this + " next " + comp); + } @@ -156,11 +160,12 @@ public abstract class PipelineComponent extends GeometryNode { this.previous._removeRef(this); this.previous = comp; this.syncprev = false; + if (DEBUG) System.out.println(this + " prev " + comp); syncPrevious(); firePropertyChanged(Plant3D.URIs.HasPrevious); if (comp != null) comp.sync(); -// System.out.println(this + " prev " + comp); + } private PipelineComponent branch0; @@ -177,11 +182,11 @@ public abstract class PipelineComponent extends GeometryNode { this.branch0._removeRef(this); this.branch0 = comp; this.syncbr0 = false; + if (DEBUG) System.out.println(this + " br0 " + comp); syncBranch0(); firePropertyChanged(Plant3D.URIs.HasBranch0); if (comp != null) comp.sync(); -// System.out.println(this + " next " + comp); } @GetPropertyValue(name="Previous",tabId="Debug",value=Plant3D.URIs.HasPrevious) @@ -261,14 +266,20 @@ public abstract class PipelineComponent extends GeometryNode { if (next == comp) { next = null; syncnext = false; + if (DEBUG) System.out.println(this + " remove next " + comp); + firePropertyChanged(Plant3D.URIs.HasNext); syncNext(); } else if (previous == comp) { previous = null; syncprev = false; + if (DEBUG) System.out.println(this + " remove prev " + comp); + firePropertyChanged(Plant3D.URIs.HasPrevious); syncPrevious(); } else if (branch0 == comp) { branch0 = null; syncbr0 = false; + if (DEBUG) System.out.println(this + " remove br0 " + comp); + firePropertyChanged(Plant3D.URIs.HasBranch0); syncBranch0(); } } @@ -384,8 +395,8 @@ public abstract class PipelineComponent extends GeometryNode { } } else if (getControlPoint().getSubPoint().size() > 0) { // TODO : this may cause problems? (Removes branch point, before branch has been set?) - getControlPoint().getSubPoint().get(0).remove(); - getControlPoint().children.clear(); + //getControlPoint().getSubPoint().get(0).remove(); + //getControlPoint().children.clear(); return true; } } else { @@ -418,6 +429,7 @@ public abstract class PipelineComponent extends GeometryNode { @Override public void remove() { + if (DEBUG) System.out.println(this + " remove"); PipeControlPoint pcp = getControlPoint(); // Second check is needed, when remove process is initiated from control point. if (pcp != null && pcp.getPipelineComponent() != null) {