API: SUEntitiesFill() return error code when export skp

(Thank you @dezmo for reassigning to SDK subcategory.)

Is your application’s axes have Z pointing upwards ? If, not you would need to adjust the coordinate values as SketchUp’s Z_AXIS points up, X_AXIS points to the right, and Y_AXIS points away from the viewing plane.

Bear in mind that SketchUp was designed to model buildings. It has an internal tolerance of 0.001" between vertices. Some of your edge lengths may be quite small for Sketchup. (I calculated that the difference between 2 x values in the inner circle is only 0.00269".)
In cases like this, even when manually modeling in SketchUp, it is better to create the geometry at a larger scale within a component definition’s entities collection. Then afterward, place a scaled down instance of that definition into the model’s entities collection.

Yes I would think that these 2 separate surfaces should be added to an SUGeometryInput object in separate calls. One for the inner circular face, and another for the outer cylinder ring.

The documentation is a bit confusing about the SUEntitiesFill function. A note seems to indicate that there can be existing geometry in the entities collection object, but the parameter description says that the entities collection object must be empty.

That data is not easy to use (or read.)

If it were lines of comma separated values, it would be easier to use:

# face1
  index, x, y, z
  index, x, y, z
# face 2

Otherwise, you would need to post code for your SKP export in order for a C API guru to help see where the error lies.


1 Like