I encountered a problem when trying to use the MultiPatchShapeBuffer to write a multipatch geometry.It seems that MultiPatchShapeBuffer.Setup(shapeType, numParts, numPoints) ignores the numParts and numPoints parameters, and creates a buffer with 0 parts and 0 points.The following code snippet illustrates the issue:
FileGDBAPI::MultiPatchShapeBuffer buffer;
std::cout << "Buffer: " << (size_t)buffer.shapeBuffer << ", " << buffer.inUseLength << ", " << buffer.allocatedLength << std::endl;
FileGDBAPI::ShapeType shapeType = FileGDBAPI::shapeMultiPatch;
int numParts = 5;
int numPoints = 15;
std::cout << "shape type: " << shapeType << ", numParts: " << numParts << ", numPoints: " << numPoints << std::endl;
fgdbError result = buffer.Setup(shapeType, numParts, numPoints);
std::cout << "Result: " << result << std::endl;
std::cout << "Buffer: " << (size_t)buffer.shapeBuffer << ", " << buffer.inUseLength << ", " << buffer.allocatedLength << std::endl;
buffer.GetShapeType(shapeType);
buffer.GetNumParts(numParts);
buffer.GetNumPoints(numPoints);
std::cout << "shape type: " << shapeType << ", numParts: " << numParts << ", numPoints: " << numPoints << std::endl;