Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Static Public Member Functions
Poly Class Reference

This package provides classes and services to handle: More...

#include <Poly.hxx>

Static Public Member Functions

static occ::handle< Poly_TriangulationCatenate (const NCollection_List< occ::handle< Poly_Triangulation > > &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 occ::handle< Poly_Triangulation > &T, Standard_OStream &OS, const bool Compact=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 occ::handle< Poly_Polygon3D > &P, Standard_OStream &OS, const bool Compact=true)
 Writes the content of the 3D polygon.
 
static void Write (const occ::handle< Poly_Polygon2D > &P, Standard_OStream &OS, const bool Compact=true)
 Writes the content of the 2D polygon.
 
static void Dump (const occ::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 occ::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 occ::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 occ::handle< Poly_TriangulationReadTriangulation (Standard_IStream &IS)
 Reads a triangulation from the stream <IS>.
 
static occ::handle< Poly_Polygon3DReadPolygon3D (Standard_IStream &IS)
 Reads a 3d polygon from the stream <IS>.
 
static occ::handle< Poly_Polygon2DReadPolygon2D (Standard_IStream &IS)
 Reads a 2D polygon from the stream <IS>.
 
static void ComputeNormals (const occ::handle< Poly_Triangulation > &Tri)
 Compute node normals for face triangulation as mean normal of surrounding triangles.
 
static double 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 bool Intersect (const occ::handle< Poly_Triangulation > &theTri, const gp_Ax1 &theAxis, const bool theIsClosest, Poly_Triangle &theTriangle, double &theDistance)
 Computes the intersection between axis and triangulation.
 
static int IntersectTriLine (const gp_XYZ &theStart, const gp_Dir &theDir, const gp_XYZ &theV0, const gp_XYZ &theV1, const gp_XYZ &theV2, double &theParam)
 Computes the intersection between a triangle defined by three vertexes and a line.
 
template<class TypeSequencePnts >
static bool PolygonProperties (const TypeSequencePnts &theSeqPnts, double &theArea, double &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.
 

Detailed Description

This package provides classes and services to handle:

Member Function Documentation

◆ Catenate()

static occ::handle< Poly_Triangulation > Poly::Catenate ( const NCollection_List< occ::handle< Poly_Triangulation > > & lstTri)
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.

◆ ComputeNormals()

static void Poly::ComputeNormals ( const occ::handle< Poly_Triangulation > & Tri)
static

Compute node normals for face triangulation as mean normal of surrounding triangles.

◆ Dump() [1/3]

static void Poly::Dump ( const occ::handle< Poly_Polygon2D > & P,
Standard_OStream & OS )
static

Dumps the 2D polygon. This is a call to the previous method with Comapct set to False.

◆ Dump() [2/3]

static void Poly::Dump ( const occ::handle< Poly_Polygon3D > & P,
Standard_OStream & OS )
static

Dumps the 3D polygon. This is a call to the previous method with Comapct set to False.

◆ Dump() [3/3]

static void Poly::Dump ( const occ::handle< Poly_Triangulation > & T,
Standard_OStream & OS )
static

Dumps the triangulation. This is a call to the previous method with Comapct set to False.

◆ Intersect()

static bool Poly::Intersect ( const occ::handle< Poly_Triangulation > & theTri,
const gp_Ax1 & theAxis,
const bool theIsClosest,
Poly_Triangle & theTriangle,
double & theDistance )
static

Computes the intersection between axis and triangulation.

Parameters
[in]theTriinput triangulation
[in]theAxisintersecting ray
[in]theIsClosestfinds the closest intersection when TRUE, finds the farthest otherwise
[out]theTriangleintersected triangle
[out]theDistancedistance along ray to intersection point
Returns
TRUE if intersection takes place, FALSE otherwise.

◆ IntersectTriLine()

static int Poly::IntersectTriLine ( const gp_XYZ & theStart,
const gp_Dir & theDir,
const gp_XYZ & theV0,
const gp_XYZ & theV1,
const gp_XYZ & theV2,
double & theParam )
static

Computes the intersection between a triangle defined by three vertexes and a line.

Parameters
[in]theStartpicking ray origin
[in]theDirpicking ray direction
[in]theV0first triangle node
[in]theV1second triangle node
[in]theV2third triangle node
[out]theParamparam on line of the intersection point
Returns
1 if intersection was found, 0 otherwise.

◆ PointOnTriangle()

static double Poly::PointOnTriangle ( const gp_XY & P1,
const gp_XY & P2,
const gp_XY & P3,
const gp_XY & P,
gp_XY & UV )
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).

◆ PolygonProperties()

template<class TypeSequencePnts >
static bool Poly::PolygonProperties ( const TypeSequencePnts & theSeqPnts,
double & theArea,
double & thePerimeter )
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(int) (e.g. it can be either NCollection_Sequence<gp_Pnt2d> or NCollection_Array1<gp_Pnt2d>).

◆ ReadPolygon2D()

static occ::handle< Poly_Polygon2D > Poly::ReadPolygon2D ( Standard_IStream & IS)
static

Reads a 2D polygon from the stream <IS>.

◆ ReadPolygon3D()

static occ::handle< Poly_Polygon3D > Poly::ReadPolygon3D ( Standard_IStream & IS)
static

Reads a 3d polygon from the stream <IS>.

◆ ReadTriangulation()

static occ::handle< Poly_Triangulation > Poly::ReadTriangulation ( Standard_IStream & IS)
static

Reads a triangulation from the stream <IS>.

◆ Write() [1/3]

static void Poly::Write ( const occ::handle< Poly_Polygon2D > & P,
Standard_OStream & OS,
const bool Compact = true )
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.

◆ Write() [2/3]

static void Poly::Write ( const occ::handle< Poly_Polygon3D > & P,
Standard_OStream & OS,
const bool Compact = true )
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.

◆ Write() [3/3]

static void Poly::Write ( const occ::handle< Poly_Triangulation > & T,
Standard_OStream & OS,
const bool Compact = true )
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.


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