fixed chord triangle count formula

Tue, 19 Jun 2018 21:57:39 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Tue, 19 Jun 2018 21:57:39 +0300
changeset 1409
2d4649fd9a20
parent 1408
0d6162662040
child 1410
e76e219c48e9

fixed chord triangle count formula

src/linetypes/circularprimitive.cpp file | annotate | diff | comparison | revisions
--- a/src/linetypes/circularprimitive.cpp	Tue Jun 19 21:49:21 2018 +0300
+++ b/src/linetypes/circularprimitive.cpp	Tue Jun 19 21:57:39 2018 +0300
@@ -242,7 +242,10 @@
 		return 0;
 
 	case PrimitiveModel::Chord:
-		return m_segments - 1;
+		if (m_segments >= m_divisions -1)
+			return m_divisions - 2;
+		else
+			return max(0, m_segments - 1);
 	}
 
 	return 0;

mercurial