I am using the Sketchup C API extensively - generally with little or no problems.
However, using SUArcCurveCreate / SUEntitiesAddArcCurves gives me a small problem, which I fail to see the cause of.
If I add one or more ArcCurves to the model, and save to a Sketchup file, when subsequently opening the file I get this message:
Pressing “Fix Now” apparently fixes whatever is wrong and correctly displays the intended ArcCurve(s).
Only if ArcCurves are added to the model do I get this (minor) problem.
I tested by using this code snippet
SUResult su_res;
SUPoint3D su_center = { 0.0 * unitConv_, 0.0 * unitConv_, 0.0 * unitConv_ };
SUPoint3D su_start = { 1.0 * unitConv_, -1.0 * unitConv_, 0.0 * unitConv_ };
SUPoint3D su_end = { 0.0 * unitConv_, 1.0 * unitConv_, 0.0 * unitConv_ };
SUVector3D su_normal = { 0.0, 0.0, 1.0 };
size_t count;
SUArcCurveRef arccurve_ref = SU_INVALID;
su_res = SUArcCurveCreate(&arccurve_ref, &su_center, &su_start, &su_end, &su_normal, 24);
if (su_res == SU_ERROR_NONE)
{
su_res = SUEntitiesAddArcCurves(entities_ref, 1, &arccurve_ref);
su_res = SUEntitiesGetNumArcCurves(entities_ref, &count);
}
and the issue is still present.
At the moment I am using the C API 19.3.253.
All su_res gives SU_ERROR_NONE and count == 1.
Anyone able to see why this code snippet causes such issue? Or is this a more general problem?
Edited:
Apparently the same issue is present when using the C API 20.0.363.