Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ protected static boolean buildStripSegment(int internalIndex, StripConstants c,
Vector3d nXY = new Vector3d(ca, -sa, 0.0);
double rhs = (internalIndex + 0.5) * c.pitch;

List<Vector3d> inters = new ArrayList<>(4);
List<Vector3d> inters = new ArrayList<>();

for (Vector3d[] e : tr.edges()) {
Vector3d P = new Vector3d(0, 0, 0);
Expand All @@ -360,8 +360,14 @@ protected static boolean buildStripSegment(int internalIndex, StripConstants c,
double d2 = dx * dx + dy * dy;
if (d2 > best) {
best = d2;
a = inters.get(i);
b = inters.get(j);
if(dy>0) {
a = inters.get(i);
b = inters.get(j);
}
else {
a = inters.get(j);
b = inters.get(i);
}
}
}
}
Expand Down Expand Up @@ -419,9 +425,9 @@ protected List<StripGeom> buildStripCache(StripConstants c) {
tmp.add(s);
}

tmp.sort(Comparator
.comparingDouble((StripGeom s) -> s.orderXLocal)
.thenComparingInt(s -> s.internalIndex));
// tmp.sort(Comparator
// .comparingDouble((StripGeom s) -> s.orderXLocal)
// .thenComparingInt(s -> s.internalIndex));

int comp = 1;
for (StripGeom s : tmp) {
Expand Down
Loading