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);
}
}
firePropertyChanged(Plant3D.URIs.HasPipeThickness);
}
+ public double getInsideDiameter() {
+ return pipeDiameter - 2 * pipeThickness;
+ }
+
@RelatedElementsAdd(Plant3D.URIs.children)
public void addChild(PipelineComponent node) {
addNode(Plant3D.URIs.children,node);
}
// Calculate center of mass for the frustum
- double r1 = getPipeRun().getPipeDiameter();
- double r2 = getAlternativePipeRun().getPipeDiameter();
+ double r1 = getPipeRun().getInsideDiameter();
+ double r2 = getAlternativePipeRun().getInsideDiameter();
Vector3d p1 = new Vector3d(), p2 = new Vector3d();
pcp.getInlineControlPointEnds(p1, p2);
double r = ((TurnComponent)this).getTurnRadius();
double a = pcp.getTurnAngle();
- double pipeRadius = pcp.getPipeRun().getPipeDiameter() / 2;
+ double pipeRadius = pcp.getPipeRun().getInsideDiameter() / 2;
// Unit vector in inlet flow direction
Vector3d inletDir = pcp.getPathLegDirection(Direction.PREVIOUS);
if (pcp == null)
throw new IllegalStateException("No centroid defined");
- double pipeRadius = getPipeRun().getPipeDiameter() / 2;
+ double pipeRadius = getPipeRun().getInsideDiameter() / 2;
switch (pcp.getType()) {
case INLINE:
// Calculate center of mass for the frustum
double r1 = pipeRadius;
- double r2 = getAlternativePipeRun().getPipeDiameter() / 2;
+ double r2 = getAlternativePipeRun().getInsideDiameter() / 2;
return pcp.getLength() * Math.PI * (r1*r1 + r1*r2 + r2*r2) / 4;
case TURN: {
double r = ((TurnComponent)this).getTurnRadius();