On 05/12/2015 at 05:03, xxxxxxxx wrote:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
Greetings to all.
I'm knee deep in the NgonBase/Pgon/PgonEdge APIs, and I've got a few questions that the documentation doesn't seem to answer.
Do the inner edges passed to NgonBase::BuildNgon() need to be in any kind of order?
Must the inner edges passed to NgonBase::BuildNgon() always be paired- ie, you must include both edges that make up an edge between two points relative to either polygon on either side? It seems like this function always fails unless you do that (especially if "outer" is NULL), but it's not stipulated in the documentation.
Ditto for the outer edges- do they need to be paired up as well, or do you just include the edges relative to the polygons on the inside of the ngon?
Does anyone know how NgonBase::BuildNgon() builds the outlines of a polygon when the "outer" parameter is NULL? Failing that, are there any examples out there of how to build an outline from a list of edges?
What do PGONEDGE_REPEAT, PGONEDGE_RESET, and PGONEDGE_EDGEINDEX do?
Is there any easy way to merge ngons? It seems like NgonBase::BuildNgon() doesn't make any attempt at doing so, which means you can land up with a whacky situation where multiple ngons overlap each other.
When attempting to retrieve a list of hidden edges in a mesh, what is faster- iterating over the output from PolygonObject::GetNgonEdgesCompact(), or calling NgonBase::ToSelect(bs, NGON_TOSELECTION_INNEREDGES) and iterating over the resulting BaseSelect using BaseSelect::GetRange()?
Please note that for various reasons I cannot use the modelling library, as much as I'd like to. I'm stuck manipulating ngons directly through the PolygonObject, and there aren't many examples of doing this out there, hence my questions. Any help would be much appreciated!