public void setType(String type) throws Exception{
this.type = type;
controlPoint = ControlPointFactory.create(this);
+ syncNext();
+ syncPrevious();
+ syncBranch0();
}
if (controlPoint.getRotationAngle() != null && Math.abs(controlPoint.getRotationAngle()-angle) < MathTools.NEAR_ZERO)
return;
controlPoint.setRotationAngle(angle);
- try {
- PipingRules.requestUpdate(getControlPoint());
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ PipingRules.requestUpdate(getControlPoint());
+
}
@RelatedGetValue(Plant3D.URIs.IsReversed)
return;
}
controlPoint.setReversed(reverse);
- try {
- PipingRules.requestUpdate(getControlPoint());
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ PipingRules.requestUpdate(getControlPoint());
}
@Override
private void updateOffset() {
if (!componentCalculatedOffset && getControlPoint().isOffset()) {
- getControlPoint().setOffset(getPipeRun().getPipeDiameter()*0.5 - getAlternativePipeRun().getPipeDiameter()*0.5);
+ getControlPoint().setOffset(getPipeRun().getInsideDiameter()*0.5 - getAlternativePipeRun().getInsideDiameter()*0.5);
}
}
map.put("radius2", pipeRun2.getPipeDiameter() * 0.5);
}
if (controlPoint.isOffset() && !componentCalculatedOffset) {
+ if (getPipeRun() != null && getAlternativePipeRun() != null)
+ updateOffset();
map.put("offset", controlPoint.getOffset());
}
}