Open CASCADE Technology 7.9.0
|
This package provides classes and services to handle : More...
#include <Poly.hxx>
Static Public Member Functions | |
static Handle< Poly_Triangulation > | Catenate (const Poly_ListOfTriangulation &lstTri) |
Computes and stores the link from nodes to triangles and from triangles to neighbouring triangles. This tool is obsolete, replaced by Poly_CoherentTriangulation Algorithm to make minimal loops in a graph Join several triangulations to one new triangulation object. The new triangulation is just a mechanical sum of input triangulations, without node sharing. UV coordinates are dropped in the result. | |
static void | Write (const Handle< Poly_Triangulation > &T, Standard_OStream &OS, const Standard_Boolean Compact=Standard_True) |
Writes the content of the triangulation <T> on the stream <OS>. If <Compact> is true this is a "save" format intended to be read back with the Read method. If compact is False it is a "Dump" format intended to be informative. | |
static void | Write (const Handle< Poly_Polygon3D > &P, Standard_OStream &OS, const Standard_Boolean Compact=Standard_True) |
Writes the content of the 3D polygon. | |
static void | Write (const Handle< Poly_Polygon2D > &P, Standard_OStream &OS, const Standard_Boolean Compact=Standard_True) |
Writes the content of the 2D polygon. | |
static void | Dump (const Handle< Poly_Triangulation > &T, Standard_OStream &OS) |
Dumps the triangulation. This is a call to the previous method with Comapct set to False. | |
static void | Dump (const Handle< Poly_Polygon3D > &P, Standard_OStream &OS) |
Dumps the 3D polygon. This is a call to the previous method with Comapct set to False. | |
static void | Dump (const Handle< Poly_Polygon2D > &P, Standard_OStream &OS) |
Dumps the 2D polygon. This is a call to the previous method with Comapct set to False. | |
static Handle< Poly_Triangulation > | ReadTriangulation (Standard_IStream &IS) |
Reads a triangulation from the stream <IS>. | |
static Handle< Poly_Polygon3D > | ReadPolygon3D (Standard_IStream &IS) |
Reads a 3d polygon from the stream <IS>. | |
static Handle< Poly_Polygon2D > | ReadPolygon2D (Standard_IStream &IS) |
Reads a 2D polygon from the stream <IS>. | |
static void | ComputeNormals (const Handle< Poly_Triangulation > &Tri) |
Compute node normals for face triangulation as mean normal of surrounding triangles. | |
static Standard_Real | PointOnTriangle (const gp_XY &P1, const gp_XY &P2, const gp_XY &P3, const gp_XY &P, gp_XY &UV) |
Computes parameters of the point P on triangle defined by points P1, P2, and P3, in 2d. The parameters U and V are defined so that P = P1 + U * (P2 - P1) + V * (P3 - P1), with U >= 0, V >= 0, U + V <= 1. If P is located outside of triangle, or triangle is degenerated, the returned parameters correspond to closest point, and returned value is square of the distance from original point to triangle (0 if point is inside). | |
static Standard_Boolean | Intersect (const Handle< Poly_Triangulation > &theTri, const gp_Ax1 &theAxis, const Standard_Boolean theIsClosest, Poly_Triangle &theTriangle, Standard_Real &theDistance) |
Computes the intersection between axis and triangulation. | |
static Standard_Integer | IntersectTriLine (const gp_XYZ &theStart, const gp_Dir &theDir, const gp_XYZ &theV0, const gp_XYZ &theV1, const gp_XYZ &theV2, Standard_Real &theParam) |
Computes the intersection between a triangle defined by three vertexes and a line. | |
template<class TypeSequencePnts> | |
static Standard_Boolean | PolygonProperties (const TypeSequencePnts &theSeqPnts, Standard_Real &theArea, Standard_Real &thePerimeter) |
Returns area and perimeter of 2D-polygon given by its vertices. theArea will be negative if the polygon is bypassed clockwise and will be positive, otherwise. thePerimeter will always be positive. | |
This package provides classes and services to handle :
|
static |
Computes and stores the link from nodes to triangles and from triangles to neighbouring triangles. This tool is obsolete, replaced by Poly_CoherentTriangulation Algorithm to make minimal loops in a graph Join several triangulations to one new triangulation object. The new triangulation is just a mechanical sum of input triangulations, without node sharing. UV coordinates are dropped in the result.
|
static |
Compute node normals for face triangulation as mean normal of surrounding triangles.
|
static |
Dumps the 2D polygon. This is a call to the previous method with Comapct set to False.
|
static |
Dumps the 3D polygon. This is a call to the previous method with Comapct set to False.
|
static |
Dumps the triangulation. This is a call to the previous method with Comapct set to False.
|
static |
Computes the intersection between axis and triangulation.
[in] | theTri | input triangulation |
[in] | theAxis | intersecting ray |
[in] | theIsClosest | finds the closest intersection when TRUE, finds the farthest otherwise |
[out] | theTriangle | intersected triangle |
[out] | theDistance | distance along ray to intersection point |
|
static |
Computes the intersection between a triangle defined by three vertexes and a line.
[in] | theStart | picking ray origin |
[in] | theDir | picking ray direction |
[in] | theV0 | first triangle node |
[in] | theV1 | second triangle node |
[in] | theV2 | third triangle node |
[out] | theParam | param on line of the intersection point |
|
static |
Computes parameters of the point P on triangle defined by points P1, P2, and P3, in 2d. The parameters U and V are defined so that P = P1 + U * (P2 - P1) + V * (P3 - P1), with U >= 0, V >= 0, U + V <= 1. If P is located outside of triangle, or triangle is degenerated, the returned parameters correspond to closest point, and returned value is square of the distance from original point to triangle (0 if point is inside).
|
inlinestatic |
Returns area and perimeter of 2D-polygon given by its vertices. theArea will be negative if the polygon is bypassed clockwise and will be positive, otherwise. thePerimeter will always be positive.
ATTENTION!!! The container theSeqPnts of 2D-points gp_Pnt2d must have definition for following methods: Length(), Lower(), Upper() and Value(Standard_Integer) (e.g. it can be either NCollection_Sequence<gp_Pnt2d> or NCollection_Array1<gp_Pnt2d>).
|
static |
Reads a 2D polygon from the stream <IS>.
|
static |
Reads a 3d polygon from the stream <IS>.
|
static |
Reads a triangulation from the stream <IS>.
|
static |
Writes the content of the 2D polygon.
on the stream <OS>. If <Compact> is true this is a "save" format intended to be read back with the Read method. If compact is False it is a "Dump" format intended to be informative.
|
static |
Writes the content of the 3D polygon.
on the stream <OS>. If <Compact> is true this is a "save" format intended to be read back with the Read method. If compact is False it is a "Dump" format intended to be informative.
|
static |
Writes the content of the triangulation <T> on the stream <OS>. If <Compact> is true this is a "save" format intended to be read back with the Read method. If compact is False it is a "Dump" format intended to be informative.