Archicad C++ API
About Archicad add-on development using the C++ API.

Getting correct UV coordinates (APIAny_GetTextureCoordID)

Not applicable

I'm building a custom exporter for ArchiCAD 8.1 (using API Development Kit 5.1) and I'm having trouble getting the correct UV coordinates. I've been trying to use ACAPI_Goodies with APIAny_GetTextureCoordID to get the UV coordinates, but without much success.

The function takes a pointer to API_TexCoordPars and API_UVCoord. First struct specifies the body and polygon indeces and a surface point in local coordinate system.

So far what I've tried to do is:
  • Gather the vertices for the polygon in their local coordinate space (ie. without applying the body matrix to vertices), which are correct and verified
  • For each vertex, call the ACAPI_Goodies(APIAny_GetTextureCoordID, &txpars, &uv) where txpars is API_TexCoordPars filled with body and polygon indices and the vertex.
No errors happen, but the returned UV-coordinates are something other than they should be (like, really huge numbers).

Any ideas? What am I missing here?

Have you had any success in solving it?
--- stefan boeykens --- bim-expert-architect-engineer-musician ---
ARCHICAD-user since 1998
Archicad Book

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!