This documentation is for the free plugin Py4D in CINEMA 4D R11.5 and not for the C4DSDK of Python in CINEMA 4D R12. For R12, please visit PluginCafe.com
Class to get neighbouring polygons from edges and points.
Warning
This class assumes that the geometry is clean such that an edge is only shared by two polygons, if this is not the case then the information may not be correct.
Initialise the internal polygon information, this function must be called before the class can be used to get the neighbouring polygons.
| Parameters: |
|
|---|
Gets the polygon opposite to poly with respect to the edge from point a to b.
| Parameters: |
|
|---|---|
| Return type: | int |
| Returns: | The opposite polygon index, or NOTOK if none exists or if poly isn’t one of the edge polygons. |
Get the polygons that are attached to the given point index.
For example:
To get the polygons around say point 137 you would use:
polys = neigbor.GetPointPolys(137)
for poly in polys:
#do something with poly
pass
| Return type: | list |
|---|---|
| Returns: | A list of returned polygons. |
Get the total number of edges found.
| Return type: | int |
|---|---|
| Returns: | The number of edges in the given polygons. |