API Reference
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
DB.Api.Polygon Class Reference

Class to handle polygon objects. More...

Public Member Functions

 Polygon (IEnumerable< Point3d > vertices)
 Method used to create a polygon from a list of vertices. The vertices are supplied in the form of a collection of Point3d objects.
 
bool Contains (Point3d pt)
 Returns a boolean value to indicate whether or not the supplied point lies within the polygon. Although the point is supplied in the form of a Point3d, this is a 2D operation and the polygon must be horizontal.
 
bool ProjectAlongNormal (double distance)
 This method will project the polygon along a normal to the polygon by the supplied distance.
 
void ReverseVertexOrder ()
 Reverses the order of the polygon vertex sequence, e.g. if the vertex sequence is clockwise, this method will cause the sequence to be reordered to be anticlockwise.
 
void PerformEPOrdering ()
 Reorders the polygon vertices to confoerm to EnergyPlus ordering rules.
 
double GetOverlapWithPolygon (Polygon poly)
 This method is used to calculate the overlapping area (if any) with another polygon supplied as a parameter.
 
void Dispose ()
 

Properties

Collections.Vertices Vertices [get]
 Returns a collection of polygon vertices as Vertices objects.
 
Collections.Polygons ShadowPolygons [get]
 Returns a collection of shadow polygons from the polygon. Polygon child shadow polygons result from shading calculations.
 
Collections.Polygons Openings [get]
 Deprecated. Use Holes method.
 
Collections.Holes Holes [get]
 Returns a collection of polygon holes (refer to Holes class).
 
double Area [get]
 Returns the area of the polygon.
 
double Perimeter [get]
 Returns the perimeter of the polygon.
 
double ShadedArea [get]
 Returns the shaded area of the polygon. Shaded and unshaded areas generated by shading calculations.
 
double UnshadedArea [get]
 Returns the unshaded area of the polygon. Shaded and unshaded areas generated by shading calculations.
 
int MaterialId [get]
 Returns the ID of the material assigned to the polygon. The ID points to a record in the 'Materials' database.
 
double LengthOfLongestEdge [get]
 Returns the longest edge of the polygon'.
 
Opening ParentOpening [get]
 Returns the surface opening to which the polygon belongs. This method only applies to polygons that have been obtained from openings.
 
PolygonType Type [get]
 Returns the type of polygon as a PolygonType (Window panel, Door panel, etc.). This method only applies to polygons associated with specific model objects.
 

Detailed Description

Class to handle polygon objects.

Constructor & Destructor Documentation

◆ Polygon()

DB.Api.Polygon.Polygon ( IEnumerable< Point3d vertices)

Method used to create a polygon from a list of vertices. The vertices are supplied in the form of a collection of Point3d objects.

Parameters
vertices

Member Function Documentation

◆ Contains()

bool DB.Api.Polygon.Contains ( Point3d  pt)

Returns a boolean value to indicate whether or not the supplied point lies within the polygon. Although the point is supplied in the form of a Point3d, this is a 2D operation and the polygon must be horizontal.

Parameters
ptThe Point3d object representing the point which is to be tested for containment within the polygon.
Returns
TRUE if the point is contained within the polygon otherwise FALSE.

◆ GetOverlapWithPolygon()

double DB.Api.Polygon.GetOverlapWithPolygon ( Polygon  poly)

This method is used to calculate the overlapping area (if any) with another polygon supplied as a parameter.

Parameters
polyThe polygon with which the overlapping area is to be calculated.
Returns
Overlapping area between polygons (can be zero if no overlap)

◆ ProjectAlongNormal()

bool DB.Api.Polygon.ProjectAlongNormal ( double  distance)

This method will project the polygon along a normal to the polygon by the supplied distance.

Parameters
distanceDistance along a normal to the polygon by which the polygon is to be projected.
Returns
TRUE if the polygon is projected successfully otherwise FALSE.

The documentation for this class was generated from the following file: