36 static_assert(gcd(16, 4) == 4); |
36 static_assert(gcd(16, 4) == 4); |
37 static_assert(gcd(272, 192) == 16); |
37 static_assert(gcd(272, 192) == 16); |
38 |
38 |
39 static constexpr const char* circularPrimitiveTypeString(const CircularPrimitive& circ) |
39 static constexpr const char* circularPrimitiveTypeString(const CircularPrimitive& circ) |
40 { |
40 { |
41 switch (circ.type) { |
41 return circularPrimitiveStems[circ.type]; |
42 case CircularPrimitive::Circle: |
|
43 return "edge"; |
|
44 case CircularPrimitive::Disc: |
|
45 return "disc"; |
|
46 case CircularPrimitive::Cylinder: |
|
47 return "cyli"; |
|
48 case CircularPrimitive::CylinderOpen: |
|
49 return "cylo"; |
|
50 case CircularPrimitive::CylinderClosed: |
|
51 return "cylc"; |
|
52 case CircularPrimitive::DiscNegative: |
|
53 return "ndis"; |
|
54 case CircularPrimitive::Chord: |
|
55 return "chrd"; |
|
56 } |
|
57 return ""; |
|
58 } |
42 } |
59 |
43 |
60 static QString circularPrimitiveFilePath(const CircularPrimitive& circ) |
44 static QString circularPrimitiveFilePath(const CircularPrimitive& circ) |
61 { |
45 { |
62 QString result; |
46 QString result; |