--- a/src/primitives.cpp Wed Jan 10 23:07:01 2018 +0200 +++ b/src/primitives.cpp Thu Jan 11 00:39:00 2018 +0200 @@ -591,6 +591,16 @@ return prefix + frac + root + numstr + ".dat"; } +const char* unofficialPrimitiveType(int divisions) +{ + if (divisions == 48) + return "!LDRAW_ORG Unofficial_48_Primitive"; + else if (divisions == 8) + return "!LDRAW_ORG Unofficial_8_Primitive"; + else + return "!LDRAW_ORG Unofficial_Primitive"; +} + // ============================================================================= // LDDocument* GeneratePrimitive(PrimitiveType type, int segs, int divs, int num) @@ -636,8 +646,7 @@ objs << LDSpawn<LDComment>(descr) << LDSpawn<LDComment>(format("Name: %1", name)) << LDSpawn<LDComment>(format("Author: %1", author)) - << LDSpawn<LDComment>(format("!LDRAW_ORG Unofficial_%1Primitive", - divs == HighResolution ? "48_" : "")) + << LDSpawn<LDComment>(unofficialPrimitiveType(divs)) << LDSpawn<LDComment>(license) << LDSpawn<LDEmpty>() << LDSpawn<LDBfc>(BfcStatement::CertifyCCW)