SketchUp is detecting issues in the geometry I create via ruby api. The issues are shown in the Validity Check window. I would like to know what the “rules” are for creating and joining various geometry (eg, curves (all types arcs, circles, ngons, etc), faces, lines, etc.) so I can avoid the validity check issues.
My current issue is with curves via the add_curve() method.
For example, creating two curves shaped as triangles each in there own group. If the groups are connected by a single vertex and then exploded, SketchUp generates a validity check like this:
Results of Validity Check.
The connectivity for CCurve (3879) is bad - fixed
When you fix the problem, Sketchup chooses one of the curves as the “victim” and destroys the curve, leaving the edges of course.
From experimenting, I’ve theorized the following 2 rules for curves:
- A vertex can join many edges each of which belong to a different curve (no loops).
- A vertex can join 2 edges from the same curve (in a loop) but then cannot have any other edge that participates in a curve.
The problem is that I’m not sure these rules are correct or even complete.
Instead of having to experiment in order to detect what SketchUp is doing, I’d like to just read what the rules are for creating geometry and follow them.
Is there any documentation that explains these types of rules that “should” be followed in order to avoid validity checks? I don’t want to ignore the validity checks, I want to avoid them.
BTW: I’m currently using SketchUp 2017 Make