Functions | |
int | mdlMeasure_elmDscrArea (double *area, double *perimeter, MSElementDescrP edP) |
Gets the area and perimeter of a closed element. More... | |
StatusInt | mdlMeasure_closestPointOnElement (DPoint3dP pClosePoint, ElementHandleCP pHandle, DisplayPathCP pPath, DPoint3dCP pSpacePoint) |
Find the closest point-on-element for given space point. More... | |
int | mdlMeasure_polygonArea (double *area, double *perimeter, DPoint3dP points, int numPoints) |
gets the area and perimeter of a polygon. More... | |
int | mdlMeasure_polygonProperties (double *perimeterP, double *areaP, DPoint3dP normalP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP points, int nPoints) |
Gets the basic area properties of a polygon. More... | |
int | mdlMeasure_areaProperties (double *perimeterP, double *areaP, DPoint3dP normalP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP principalMomentsP, DPoint3dP principalDirectionsP, MSElementDescrP edP, double tolerance) |
Gets the basic area properties, principal moments, and principal axes of the area enclosed by an element. More... | |
int | mdlMeasure_areaPropertiesXY (double *pArea, double *pPerimeter, DPoint3dP pCentroid, DPoint3dP pMoments, double *pIxy, Dpoint3d *pPrincipalMoments, Dpoint3d *pPrincipalDirections, MSElementDescrP edP) |
Compute area, perimeter, centroid, and 2nd moments for the region enclosed by an element. More... | |
int | mdlMeasure_linearProperties (double *lengthP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP principalMomentsP, DPoint3dP principalDirectionsP, MSElementDescrP edP, double tolerance) |
Gets the basic linear properties of an element. More... | |
int | mdlMeasure_linearPropertiesXY (double *lengthP, DPoint3dP centroidP, double *iXXP, double *iYYP, double *iXYP, Dpoint3d *principalMomentsP, Dpoint3d *principalDirectionsP, MSElementDescrP edP) |
Compute length, centroid, and 2nd moments of the curve, treated as a WIRE of uniform density at z coordinate equal to the minimim z on the element. More... | |
int | mdlMeasure_surfaceProperties2 (double *areaP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP principalMomentsP, DPoint3dP principalDirectionsP, MSElementDescrP edP, DgnModelRefP resultModelRef, double tolerance) |
Gets the basic surface and area properties, the principal moments and principal axes of an element. More... | |
int | mdlMeasure_surfaceProperties (double *areaP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP principalMomentsP, DPoint3dP principalDirectionsP, MSElementDescrP edP, double tolerance) |
Gets the basic surface and area properties, the principal moments and principal axes of an element. More... | |
int | mdlMeasure_volumeProperties (double *volumeP, double *areaP, double *closureErrorP, DPoint3dP centroidP, DPoint3dP momentP, double *iXYP, double *iXZP, double *iYZP, DPoint3dP principalMomentsP, DPoint3dP principalDirectionsP, MSElementDescrP edP, double tolerance) |
Gets the basic volume properties, the principal moments, and the principal axes of the volume enclosed by an element. More... | |
int | mdlMinDist_betweenElms (DPoint3dP point1, DPoint3dP point2, double *distance, MSElementDescrCP edP1, MSElementDescrCP edP2, DPoint3dCP closestPoint, double inputTolerance) |
Gets the minimum distance and the closest points between two curve element edges. More... | |
int mdlMeasure_areaProperties | ( | double * | perimeterP, |
double * | areaP, | ||
DPoint3dP | normalP, | ||
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | principalMomentsP, | ||
DPoint3dP | principalDirectionsP, | ||
MSElementDescrP | edP, | ||
double | tolerance | ||
) |
Gets the basic area properties, principal moments, and principal axes of the area enclosed by an element.
[out] | perimeterP | the perimeter of the area enclosed by the element in the units of the inverse currtrans. |
[out] | areaP | the area enclosed by the element, measured in the units of the inverse currtrans squared. |
[out] | normalP | a unit vector normal to the plane of the element. |
[out] | centroidP | the world coordinate system location of the centroid of the area, in the units of the inverse currtrans. |
[out] | momentP | second moments of area, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | product of inertia (yz) |
[out] | principalMomentsP | the principal second moments. Principal moments are defined as the extreme values of moments, about the principal axes of the area. |
[out] | principalDirectionsP | an array of three direction vectors which define the principal axes of the area, relative to the centroid. By definition, the principal moments are defined about the principal axes. The principal axes define a plane which is parallel to the plane of the element (and possibly rotated about the element's normal). |
[in] | edP | element to measure. |
[in] | tolerance | the stroke tolerance. For curved elements, area properties are computed from a polygonal approximation to the original. tolerance is the maximum distance between the actual curve and the approximating vectors. |
int mdlMeasure_areaPropertiesXY | ( | double * | pArea, |
double * | pPerimeter, | ||
DPoint3dP | pCentroid, | ||
DPoint3dP | pMoments, | ||
double * | pIxy, | ||
Dpoint3d * | pPrincipalMoments, | ||
Dpoint3d * | pPrincipalDirections, | ||
MSElementDescrP | edP | ||
) |
Compute area, perimeter, centroid, and 2nd moments for the region enclosed by an element.
Z coordinates of the element are ignored – the integrals use only the xy parts of the curves of the element.
[out] | pArea | computed area |
[out] | pPerimeter | computed perimeter |
[out] | pCentroid | computed centroid. The z coordinate of this point is at the minimum z of the element. |
[out] | pMoments | second moments, in inertia tensor convention, i.e. x,y,z parts are (considering that all z coordiantes are zero for integrations) integrals of (yy dA, xx dA, (xx+yy)dA) |
[out] | pIxy | computed product of inertia (xy). The additional products IXZ and IYZ are implicitly zero |
[out] | pPrincipalMoments | the principal second moments. These are the moments (yydA,xxdA, (xx+yy)dA) relative to axes rotated so mixed moment IXY is zero. |
[out] | pPrincipalDirections | computed directions (unit vectors) for the principal moment x,y,z directions. (The z is always (0,0,1)) |
[in] | edP | element to measure. |
StatusInt mdlMeasure_closestPointOnElement | ( | DPoint3dP | pClosePoint, |
ElementHandleCP | pHandle, | ||
DisplayPathCP | pPath, | ||
DPoint3dCP | pSpacePoint | ||
) |
Find the closest point-on-element for given space point.
[out] | pClosePoint | computed point on element. |
[in] | pHandle | handle of element. |
[in] | pPath | display path (optional) whose transforms are to be applied to the element to place it for calculation. |
[in] | pSpacePoint | space point. |
int mdlMeasure_elmDscrArea | ( | double * | area, |
double * | perimeter, | ||
MSElementDescrP | edP | ||
) |
Gets the area and perimeter of a closed element.
[out] | area | area of element |
[out] | perimeter | perimeter of element |
[in] | edP | element to measure |
int mdlMeasure_linearProperties | ( | double * | lengthP, |
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | principalMomentsP, | ||
DPoint3dP | principalDirectionsP, | ||
MSElementDescrP | edP, | ||
double | tolerance | ||
) |
Gets the basic linear properties of an element.
Note that "linear" properties are different from "area" properties. Linear properties are the properties of a "wire" along the boundary, not the properties of the area.
[out] | lengthP | the length of the element in the units of the inverse currtrans. |
[out] | centroidP | the (x,y,z) location of the centroid of the element, in the units of the inverse currtrans. in the world coordinate system. The centroid will not generally be on the element. |
[out] | momentP | momentP holds the second moments of the element, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | produdt of inertia (yz) |
[out] | principalMomentsP | the principal second moments. Principal moments are defined as the extreme values of moments, about the principal axes of the curve. |
[out] | principalDirectionsP | is an array of three direction vectors which define the principal axes of the element in the world coordinate system, relative to the centroid. By definition, the principal moments are defined about the principal axes. |
[in] | edP | element to measure. |
[in] | tolerance | the stroke tolerance. For curved elements, area properties are computed from a polygonal approximation to the original. tolerance is the maximum distance between the actual curve and the approximating vectors. |
int mdlMeasure_linearPropertiesXY | ( | double * | lengthP, |
DPoint3dP | centroidP, | ||
double * | iXXP, | ||
double * | iYYP, | ||
double * | iXYP, | ||
Dpoint3d * | principalMomentsP, | ||
Dpoint3d * | principalDirectionsP, | ||
MSElementDescrP | edP | ||
) |
Compute length, centroid, and 2nd moments of the curve, treated as a WIRE of uniform density at z coordinate equal to the minimim z on the element.
[out] | lengthP | length |
[out] | centroidP | centroid |
[out] | iXXP | product of xx relative to centroid |
[out] | iYYP | product of yy relative to centroid. |
[out] | iXYP | product of x,y relative to centroid |
[out] | principalMomentsP | 2nd moments wrt principal diretions |
[out] | principalDirectionsP | principal directions |
[in] | edP | curve geometry |
int mdlMeasure_polygonArea | ( | double * | area, |
double * | perimeter, | ||
DPoint3dP | points, | ||
int | numPoints | ||
) |
gets the area and perimeter of a polygon.
[out] | area | area of element |
[out] | perimeter | perimeter of element |
[in] | points | array of points that comprise the polygon |
[in] | numPoints | number of points |
int mdlMeasure_polygonProperties | ( | double * | perimeterP, |
double * | areaP, | ||
DPoint3dP | normalP, | ||
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | points, | ||
int | nPoints | ||
) |
Gets the basic area properties of a polygon.
[out] | perimeterP | the perimeter of the area enclosed by the polygon in master units. |
[out] | areaP | the area enclosed by the polygon, measured in master units squared. |
[out] | normalP | a unit vector normal to the plane of the polygon. |
[out] | centroidP | the (x, y, z) location of the centroid of the area, in master units in the world coordinate system. |
[out] | momentP | the second moments of area, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. The fundamental units are master units. |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | product of inertia (yz) |
[in] | points | points defining closed polygon |
[in] | nPoints | number of points |
int mdlMeasure_surfaceProperties | ( | double * | areaP, |
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | principalMomentsP, | ||
DPoint3dP | principalDirectionsP, | ||
MSElementDescrP | edP, | ||
double | tolerance | ||
) |
Gets the basic surface and area properties, the principal moments and principal axes of an element.
The element need not be planar (but it can be) and need not be closed.
[out] | areaP | surface area of the element. |
[out] | centroidP | location of the centroidPof the surface. The centroid will not generally be on the surface. |
[out] | momentP | the second moments, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. The iXYP, iXZP and iYZP parameters are the Ixy, Ixz and Iyz products of inertia with respect to these axes. Together, these six parameters define the element's inertia tensor (which is symmetric). |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | product of inertia (yz) |
[out] | principalMomentsP | the principal second moments. |
[out] | principalDirectionsP | principal axes |
[in] | edP | element to measure. |
[in] | tolerance | the meshing tolerance. For curved elements, area properties are computed from a polygonal approximation to the original. tolerance is the maximum distance between the actual curve and the approximating vectors. The accuracy of the properties improves as the tolerance becomes smaller. |
int mdlMeasure_surfaceProperties2 | ( | double * | areaP, |
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | principalMomentsP, | ||
DPoint3dP | principalDirectionsP, | ||
MSElementDescrP | edP, | ||
DgnModelRefP | resultModelRef, | ||
double | tolerance | ||
) |
Gets the basic surface and area properties, the principal moments and principal axes of an element.
The element need not be planar (but it can be) and need not be closed.
[out] | areaP | surface area of the element. |
[out] | centroidP | location of the centroidPof the surface. The centroid will not generally be on the surface. |
[out] | momentP | the second moments, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. The iXYP, iXZP and iYZP parameters are the Ixy, Ixz and Iyz products of inertia with respect to these axes. Together, these six parameters define the element's inertia tensor (which is symmetric). |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | product of inertia (yz) |
[out] | principalMomentsP | the principal second moments. |
[out] | principalDirectionsP | principal axes |
[in] | edP | element to measure. |
[in] | resultModelRef | modelref where results are needed. Only affects Brep scaling. |
[in] | tolerance | the meshing tolerance. For curved elements, area properties are computed from a polygonal approximation to the original. tolerance is the maximum distance between the actual curve and the approximating vectors. The accuracy of the properties improves as the tolerance becomes smaller. |
int mdlMeasure_volumeProperties | ( | double * | volumeP, |
double * | areaP, | ||
double * | closureErrorP, | ||
DPoint3dP | centroidP, | ||
DPoint3dP | momentP, | ||
double * | iXYP, | ||
double * | iXZP, | ||
double * | iYZP, | ||
DPoint3dP | principalMomentsP, | ||
DPoint3dP | principalDirectionsP, | ||
MSElementDescrP | edP, | ||
double | tolerance | ||
) |
Gets the basic volume properties, the principal moments, and the principal axes of the volume enclosed by an element.
[out] | volumeP | the volume enclosed by the element. |
[out] | areaP | the surface area of the volume enclosed by the element. |
[out] | closureErrorP | set to a quantitative measurement ranging from zero to one of element closure error. |
[out] | centroidP | the location of the centroid of the volume. The centroid will not necessarily be inside the volume. |
[out] | momentP | momentP returns the second moments, {Ixx, Iyy, Izz}, about axes through the centroid and parallel to the world x, y and z axes. The iXYP, iXZP and iYZP parameters are the Ixy, Ixz and Iyz products of inertia with respect to these axes. Together, these six parameters define the element's inertia tensor (which is symmetric). |
[out] | iXYP | product of inertia (xy) |
[out] | iXZP | product of inertia (xz) |
[out] | iYZP | product of inertia (yz) |
[out] | principalMomentsP | the principal second moments. |
[out] | principalDirectionsP | principal axes |
[in] | edP | the element to measure. |
[in] | tolerance | For curved elements, volume properties are computed from a polygonal approximation to the original. tolerance is the maximum distance between the actual surface and the approximating vectors. The accuracy of the volume properties therefore improves as the tolerance becomes smaller. |
int mdlMinDist_betweenElms | ( | DPoint3dP | point1, |
DPoint3dP | point2, | ||
double * | distance, | ||
MSElementDescrCP | edP1, | ||
MSElementDescrCP | edP2, | ||
DPoint3dCP | closestPoint, | ||
double | inputTolerance | ||
) |
Gets the minimum distance and the closest points between two curve element edges.
[out] | point1 | minimum point on element 1 |
[out] | point2 | minimum point on element 2 |
[out] | distance | minimum distance |
[in] | edP1 | first element |
[in] | edP2 | second element |
[in] | closestPoint | point close to minima |
[in] | inputTolerance | UNUSED. Formerly tolerance for approximating curved elements. All calculations are currently done to maximium precision. |