Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: solvespace/solvespace
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b69ef71e63aa
Choose a base ref
...
head repository: solvespace/solvespace
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fa6622903010
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 22, 2019

  1. Fix choice of normal for revolution in some corner cases.

    Before this commit, if the sketch contain no entities with starting
    points off of the axis of revolution, the revolution may fail, which
    manifests as the face normals being inverted. The code at the top of
    MakeFromRevolutionOf() takes the furthest point from the axis,
    projects it on that axis to get a vector. In this case that vector
    is essentially zero length except for rounding errors.
    
    After this commit, instead of only considering start points of
    beziers, all control points are considered.
    
    Fix by @phkahler.
    whitequark committed Apr 22, 2019
    Copy the full SHA
    fa66229 View commit details
Showing with 7 additions and 5 deletions.
  1. +7 −5 src/srf/surface.cpp
12 changes: 7 additions & 5 deletions src/srf/surface.cpp
Original file line number Diff line number Diff line change
@@ -634,11 +634,13 @@ void SShell::MakeFromRevolutionOf(SBezierLoopSet *sbls, Vector pt, Vector axis,
// if we choose a point that lies on the axis, for example.
// (And our surface will be self-intersecting if the sketch
// spans the axis, so don't worry about that.)
Vector p = sb->Start();
double d = p.DistanceToLine(pt, axis);
if(d > md) {
md = d;
pto = p;
for(i = 0; i <= sb->deg; i++) {
Vector p = sb->ctrl[i];
double d = p.DistanceToLine(pt, axis);
if(d > md) {
md = d;
pto = p;
}
}
}
}