2023-11-29 04:52 PM - last edited on 2024-09-16 02:40 PM by Doreena Deng
Hello everyone,
I'm trying to create Fills based on zone points.
Everything is okay with the code below when I get the zone points and create Fill according to those points:
list<Point>* points = GetPointsInElement(eleZone, eleZone.zone.poly);
//-----------------------------------------------------------------
list<Point>* GetPointsInElement(API_Element element, API_Polygon poly)
{
API_ElementMemo memo{};
GSErrCode err = ACAPI_Element_GetMemo(element.header.guid, &memo);
if (err != NoError) throw;
list<Point>* points = new list<Point>();
if (memo.coords) {
for (Int32 i = 1; i <= poly.nCoords; i++) {
API_Coord point = (*memo.coords)[i];
points->push_back(Point(point.x, point.y, 0));
}
}
ACAPI_DisposeElemMemoHdls(&memo);
delete points;
return (NULL);
}
//-------------------------
2023-11-29 06:04 PM
Hi,
Please look at the `additionalPolyCoords` member of the element memo.
Best, Akos
2023-11-29 06:24 PM - last edited on 2023-11-30 03:22 AM by Laszlo Nagy
Hi @Akos Somorjai ,
I tried it, But the result isn't right. all coordinates equal zero.
Please help me.
2023-11-30 04:34 AM
@Akos Somorjai I also got the same error. Can you help me ?
2023-12-04 10:50 AM
Hi,
Please take a look at the Do_DumpZone() function in Element_Snippets.cpp (Element_Test example). The ACAPI_Database(APIDb_RoomReductionsID, …) code shows that at the end of that function.
Best, Akos