Skip to content
Merged
Show file tree
Hide file tree
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 @@ -54,9 +54,10 @@ public static Constants getInstance() {
public static final double SIN25 = Math.sin(Math.toRadians(25.));
public static final double COS25 = Math.cos(Math.toRadians(25.));
public static final double COS30 = Math.cos(Math.toRadians(30.));
public static final double SIN6 = Math.sin(Math.toRadians(6.));
public static final double COS6 = Math.cos(Math.toRadians(6.));
public static final double TAN6 = Math.tan(Math.toRadians(6.));
public static final double STEREOANGLE = 6.;
public static final double SIN6 = Math.sin(Math.toRadians(STEREOANGLE));
public static final double COS6 = Math.cos(Math.toRadians(STEREOANGLE));
public static final double TAN6 = Math.tan(Math.toRadians(STEREOANGLE));
public static final double CTAN6 = 1/TAN6;
public static final double[] SINSECTOR60 = {0, Math.sin(Math.toRadians(60.)), Math.sin(Math.toRadians(120.)), 0,
Math.sin(Math.toRadians(240.)), Math.sin(Math.toRadians(300.))};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public boolean hasConsistentSlope(Segment otherseg) {
boolean value = false;

if (this.get_fitPlane() != null && otherseg.get_fitPlane() != null) {
if (Math.abs(Math.toDegrees(Math.acos(this.get_fitPlane().normal().dot(otherseg.get_fitPlane().normal()))) - 12.) < Constants.SEGMENTPLANESANGLE) // the angle between the plane normals is 12 degrees with some tolerance
if (Math.abs(Math.toDegrees(Math.acos(this.get_fitPlane().normal().dot(otherseg.get_fitPlane().normal()))) - 2*Constants.STEREOANGLE) < Constants.SEGMENTPLANESANGLE) // the angle between the plane normals is 2*Constants.STEREOANGLE degrees with some tolerance
{
value = true;
}
Expand Down