Archicad 28 C++ API
Loading...
Searching...
No Matches
API_PgonType Struct Reference

Representation of a 3D Polygon. More...

#include <APIdefs_3D.h>

Public Attributes

API_3D_Head head
 Header information of this component. This specifies the type and database index.
 
Int32 status
 Information about the properties of polygon.
 
Int32 iumat
 Refers to the material of the polygon.
 
Int32 irtxt
 Internal use.
 
Int32 ivect
 Refers to the polygon's normal vector (negative: use opposite direction). It is an index of a vector you can get by ACAPI_ModelAccess_GetComponent.
 
Int32 fpedg
 Index of the first polygon contour edge.
 
Int32 lpedg
 Index of the last polygon contour edge.
 

Detailed Description

Representation of a 3D Polygon.

Remarks
Accessing polygons must be base on bodies. First you should get a body by ACAPI_ModelAccess_GetComponent and just after is obtainable its polygons. A polygon component consist of directed edges. You can get those using fpedg, lpedg index range. These indices refer to API_PedgType components, which can be use to retrieve the edges of the given polygon. It may occure that fpedg >lpedg, that means the polygon has no edge references. Note that negative pedg value in API_PedgType means opposite direction. The ivect is an index to an API_VectType component. This is the normal vector of this polygon. If ivect is negative, the direction of the normal vector is the opposite of the stored one. The status field specifies some properties of the polygon. You can use the bitwise-OR operator (|) to combine any of the following constants:
  • APIPgon_Invis : invisible polygon,
  • APIPgon_Curved : polygon of a curved surface,
  • APIPgon_Concav : concave polygon,
  • APIPgon_PHole : polygon with holes,
  • APIPgon_HolesCnv : hole(s) are convex,
  • APIPgon_Complex : the polygon is concave or with holes.