validate(pcp.getPipeRun());
if (pcp.isPathLegEnd()) {
updatePathLegEndControlPoint(pcp); // FXIME: Rules won't work properly, if they are not run twice.
- updatePathLegEndControlPoint(pcp);
+ //updatePathLegEndControlPoint(pcp);
} else {
updateInlineControlPoint(pcp);
- updateInlineControlPoint(pcp);
+ //updateInlineControlPoint(pcp);
}
validate(pcp.getPipeRun());
if (!allowInsertRemove)
double l = beginPos.distance(endPos);
if (Double.isNaN(l))
- System.out.println();
+ System.out.println("Length for " + icp + " is NaN");
dir.scale(l * 0.5);
beginPos.add(dir); // center position
}
private static void checkExpandPathLeg(UpdateStruct2 u, PathLegUpdateType lengthChange) throws Exception {
- checkExpandPathLeg(u, lengthChange, false);
+ checkExpandPathLeg(u, lengthChange, u.updated.isInline() && u.updated.isOffset());
}
- private static void checkExpandPathLeg(UpdateStruct2 u, PathLegUpdateType lengthChange, boolean forceUpdate) throws Exception {
+ private static void checkExpandPathLeg(UpdateStruct2 u, PathLegUpdateType lengthChange, boolean updateEnds) throws Exception {
if (DEBUG)
System.out.println("PipingRules.checkExpandPathLeg() " + u + " " + lengthChange);
if (lengthChange != PathLegUpdateType.NONE) {
// FIXME : turns cannot be checked before inline cps are updated,
// since their position affects calculation of turns
- processPathLeg(u, forceUpdate, false);
+ processPathLeg(u, updateEnds, false);
int type = checkTurns(u, lengthChange);
if (type == REMOVE_NONE) {
- processPathLeg(u, forceUpdate, true);
+ processPathLeg(u, updateEnds, true);
} else {
expandPathLeg(u, type);
}
} else {
- processPathLeg(u, forceUpdate, true);
+ processPathLeg(u, updateEnds, true);
}
}
if (runPcps.size() != count) {
System.out.println("Run is not connected");
}
+ for (PipeControlPoint pcp : pcps) {
+ if (!pcp.isDirected())
+ if (pcp.getNext() == null && pcp.getPrevious() == null)
+ System.out.println("Orphan " + pcp);
+ }
for (PipeControlPoint pcp : pcps) {
if (pcp.getParentPoint() == null) {
PipeControlPoint sub = null;