OCC.Poly module¶
This package provides classes and services tohandle :* 3D triangular polyhedrons.* 3D polygons.* 2D polygon.* Tools to dump, save and restore those objects.
-
class
Handle_Poly_HArray1OfTriangle
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Poly_Polygon2D
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Poly_Polygon3D
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Poly_PolygonOnTriangulation
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Handle_Poly_Triangulation
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared
-
static
DownCast
()¶
-
GetObject
()¶
-
IsNull
()¶
-
Nullify
()¶
-
thisown
¶ The membership flag
-
static
-
class
Poly_Array1OfTriangle
(*args)¶ Bases:
object
Parameters: Return type: Return type: -
Assign
()¶ Parameters: Other (Poly_Array1OfTriangle &) – Return type: Poly_Array1OfTriangle
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Poly_Triangle
-
Set
()¶ Parameters: Other (Poly_Array1OfTriangle &) – Return type: Poly_Array1OfTriangle
-
Value
()¶ Parameters: Index (int) – Return type: Poly_Triangle
-
thisown
¶ The membership flag
-
-
class
Poly_CoherentLink
(*args)¶ Bases:
object
- /** * Empty constructor. */
Return type: None - /** * Constructor. Creates a Link that has no reference to ‘opposite nodes’. * This constructor is useful to create temporary object that is not * inserted into any existing triangulation. */
Parameters: Return type: - /** * Constructor, takes a triangle and a side. A link is created always such * that myNode[0] < myNode[1]. Unlike the previous constructor, this one * assigns the ‘opposite node’ fields. This constructor is used when a * link is inserted into a Poly_CoherentTriangulation structure. * @param theTri * Triangle containing the link that is created * @param iSide * Can be 0, 1 or 2. Index of the node */
Parameters: - theTri (Poly_CoherentTriangle &) –
- iSide (int) –
Return type: -
IsEmpty
()¶ - /** * Query the status of the link - if it is an invalid one. * An invalid link has Node members equal to -1. */
Return type: inline bool
-
Node
()¶ - /** * Return the node index in the current triangulation. * @param ind * 0 or 1 making distinction of the two nodes that constitute the Link. * Node(0) always returns a smaller number than Node(1). */
Parameters: ind (int) – Return type: inline int
-
OppositeNode
()¶ - /** * Return the opposite node (belonging to the left or right incident triangle) * index in the current triangulation. * @param ind * 0 or 1 making distinction of the two involved triangles: 0 on the left, * 1 on the right side of the Link. */
Parameters: ind (int) – Return type: inline int
-
SetAttribute
()¶ - /** * Set the attribute of the Link. */
Parameters: theAtt (Standard_Address) – Return type: inline void
-
thisown
¶ The membership flag
-
class
Poly_CoherentNode
(*args)¶ Bases:
OCC.gp.gp_XYZ
- /** * Empty constructor. */
Return type: None - /** * Constructor. */
Parameters: thePnt (gp_XYZ) – Return type: None -
AddTriangle
()¶ - /** * Connect a triangle to this Node. */
Parameters: - theTri (Poly_CoherentTriangle &) –
- theA (Handle_NCollection_BaseAllocator &) –
Return type:
-
Clear
()¶ - /** * Reset the Node to void. */
Parameters: & (Handle_NCollection_BaseAllocator) – Return type: None
-
DumpToString
()¶ Poly_CoherentNode_DumpToString(Poly_CoherentNode self) -> std::string
-
IsFreeNode
()¶ - /** * Check if this is a free node, i.e., a node without a single * incident triangle. */
Return type: inline bool
-
RemoveTriangle
()¶ - /** * Disconnect a triangle from this Node. */
Parameters: - theTri (Poly_CoherentTriangle &) –
- theA (Handle_NCollection_BaseAllocator &) –
Return type:
-
SetIndex
()¶ - /** * Set the value of node Index. */
Parameters: theIndex (int) – Return type: inline void
-
SetNormal
()¶ - /** * Define the normal vector in the Node. */
Parameters: theVector (gp_XYZ) – Return type: None
-
TriangleIterator
()¶ - /** * Create an iterator of incident triangles. */
Return type: inline Poly_CoherentTriPtr::Iterator
-
thisown
¶ The membership flag
-
class
Poly_CoherentTriangle
(*args)¶ Bases:
object
- /** * Empty constructor. */
Return type: None - /** * Constructor. */
Parameters: Return type: -
FindConnection
()¶ - /** * Retuns the index of the connection with the given triangle, or -1 if not * found. */
Parameters: & (Poly_CoherentTriangle) – Return type: int
-
GetConnectedNode
()¶ - /** * Query the connected node on the given side. * Returns -1 if there is no connection on the specified side. */
Parameters: iConn (int) – Return type: inline int
-
GetConnectedTri
()¶ - /** * Query the connected triangle on the given side. * Returns NULL if there is no connection on the specified side. */
Parameters: iConn (int) – Return type: inline Poly_CoherentTriangle *
-
GetLink
()¶ - /** * Query the Link associate with the given side of the Triangle. * May return NULL if there are no links in the triangulation. */
Parameters: iLink (int) – Return type: inline Poly_CoherentLink *
-
Node
()¶ - /** * Query the node index in the position given by the parameter ‘ind’ */
Parameters: ind (int) – Return type: inline int
-
RemoveConnection
()¶ - /** * Remove the connection with the given index. * @param iConn * Can be 0, 1 or 2 - index of the node that is opposite to the connection * (shared link). */
Parameters: iConn (int) – Return type: None - /** * Remove the connection with the given Triangle. * returns * True if successfuol or False if the connection has not been found. */
Parameters: theTri (Poly_CoherentTriangle &) – Return type: bool
-
SetConnection
()¶ - /** * Create connection with another triangle theTri. * This method creates both connections: in this triangle and in theTri. You * do not need to call the same method on triangle theTr. * @param iConn * Can be 0, 1 or 2 - index of the node that is opposite to the connection * (shared link). * @param theTr * Triangle that is connected on the given link. * returns * True if successful, False if the connection is rejected * due to improper topology. */
Parameters: - iConn (int) –
- theTr (Poly_CoherentTriangle &) –
Return type: - /** * Create connection with another triangle theTri. * This method creates both connections: in this triangle and in theTri. * This method is slower than the previous one, because it makes analysis * what sides of both triangles are connected. * @param theTri * Triangle that is connected. * returns * True if successful, False if the connection is rejected * due to improper topology. */
Parameters: theTri (Poly_CoherentTriangle &) – Return type: bool
-
thisown
¶ The membership flag
-
class
Poly_Connect
(*args)¶ Bases:
object
- Constructs an algorithm to explore the adjacency data of nodes or triangles for the triangulation T.
Parameters: T (Handle_Poly_Triangulation &) – Return type: None -
Initialize
()¶ - Initializes an iterator to search for all the triangles containing the node referenced at index N in the nodes table, for the triangulation analyzed by this tool. The iterator is managed by the following functions: - More, which checks if there are still elements in the iterator - Next, which positions the iterator on the next element - Value, which returns the current element. The use of such an iterator provides direct access to the triangles around a particular node, i.e. it avoids iterating on all the component triangles of a triangulation. Example Poly_Connect C(Tr); for (C.Initialize(n1);C.More();C.Next()) { t = C.Value(); }
Parameters: N (int) – Return type: None
-
More
()¶ - Returns true if there is another element in the iterator defined with the function Initialize (i.e. if there is another triangle containing the given node).
Return type: bool
-
Next
()¶ - Advances the iterator defined with the function Initialize to access the next triangle. Note: There is no action if the iterator is empty (i.e. if the function More returns false).-
Return type: None
-
Nodes
()¶ - Returns, in n1, n2 and n3, the indices of the 3 nodes adjacent to the triangle referenced at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent nodes.
Parameters: - T (int) –
- n1 (int &) –
- n2 (int &) –
- n3 (int &) –
Return type:
-
Triangle
()¶ - Returns the index of a triangle containing the node at index N in the nodes table specific to the triangulation analyzed by this tool
Parameters: N (int) – Return type: int
-
Triangles
()¶ - Returns in t1, t2 and t3, the indices of the 3 triangles adjacent to the triangle at index T in the triangles table specific to the triangulation analyzed by this tool. Warning Null indices are returned when there are fewer than 3 adjacent triangles.
Parameters: - T (int) –
- t1 (int &) –
- t2 (int &) –
- t3 (int &) –
Return type:
-
Triangulation
()¶ - Returns the triangulation analyzed by this tool.
Return type: Handle_Poly_Triangulation
-
Value
()¶ - Returns the index of the current triangle to which the iterator, defined with the function Initialize, points. This is an index in the triangles table specific to the triangulation analyzed by this tool
Return type: int
-
thisown
¶ The membership flag
-
class
Poly_HArray1OfTriangle
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
Parameters: Return type: Return type: -
Array1
()¶ Return type: Poly_Array1OfTriangle
-
ChangeArray1
()¶ Return type: Poly_Array1OfTriangle
-
ChangeValue
()¶ Parameters: Index (int) – Return type: Poly_Triangle
-
GetHandle
()¶
-
Value
()¶ Parameters: Index (int) – Return type: Poly_Triangle
-
thisown
¶ The membership flag
-
-
class
Poly_Polygon2D
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Constructs a 2D polygon defined by the table of points, <Nodes>.
Parameters: Nodes (TColgp_Array1OfPnt2d) – Return type: None -
Deflection
()¶ - Returns the deflection of this polygon. Deflection is used in cases where the polygon is an approximate representation of a curve. Deflection represents the maximum distance permitted between any point on the curve and the corresponding point on the polygon. By default the deflection value is equal to 0. An algorithm using this 2D polygon with a deflection value equal to 0 considers that it is working with a true polygon and not with an approximate representation of a curve. The Deflection function is used to modify the deflection value of this polygon. The deflection value can be used by any algorithm working with 2D polygons. For example: - An algorithm may use a unique deflection value for all its polygons. In this case it is not necessary to use the Deflection function. - Or an algorithm may want to attach a different deflection to each polygon. In this case, the Deflection function is used to set a value on each polygon, and later to fetch the value.
Return type: float - Sets the deflection of this polygon to D
Parameters: D (float) – Return type: None
-
GetHandle
()¶
-
NbNodes
()¶ - Returns the number of nodes in this polygon. Note: If the polygon is closed, the point of closure is repeated at the end of its table of nodes. Thus, on a closed triangle, the function NbNodes returns 4.
Return type: int
-
Nodes
()¶ - Returns the table of nodes for this polygon.
Return type: TColgp_Array1OfPnt2d
-
thisown
¶ The membership flag
-
class
Poly_Polygon3D
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- onstructs a 3D polygon defined by the table of points, Nodes.
Parameters: Nodes (TColgp_Array1OfPnt) – Return type: None - Constructs a 3D polygon defined by the table of points, Nodes, and the parallel table of parameters, Parameters, where each value of the table Parameters is the parameter of the corresponding point on the curve approximated by the constructed polygon. Warning Both the Nodes and Parameters tables must have the same bounds. This property is not checked at construction time.
Parameters: - Nodes (TColgp_Array1OfPnt) –
- Parameters (TColStd_Array1OfReal &) –
Return type: -
ChangeParameters
()¶ - Returns the table of the parameters associated with each node in this polygon. ChangeParameters function returnes the array as shared. Therefore if the table is selected by reference you can, by simply modifying it, directly modify the data structure of this polygon.
Return type: TColStd_Array1OfReal
-
Deflection
()¶ - Returns the deflection of this polygon
Return type: float - Sets the deflection of this polygon to D. See more on deflection in Poly_Polygon2D
Parameters: D (float) – Return type: None
-
GetHandle
()¶
-
HasParameters
()¶ - Returns the table of the parameters associated with each node in this polygon. HasParameters function checks if parameters are associated with the nodes of this polygon.
Return type: bool
-
NbNodes
()¶ - Returns the number of nodes in this polygon. Note: If the polygon is closed, the point of closure is repeated at the end of its table of nodes. Thus, on a closed triangle the function NbNodes returns 4.
Return type: int
-
Nodes
()¶ - Returns the table of nodes for this polygon.
Return type: TColgp_Array1OfPnt
-
Parameters
()¶ - Returns true if parameters are associated with the nodes in this polygon.
Return type: TColStd_Array1OfReal
-
thisown
¶ The membership flag
-
class
Poly_PolygonOnTriangulation
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Constructs a 3D polygon on the triangulation of a shape, defined by the table of nodes, <Nodes>.
Parameters: Nodes (TColStd_Array1OfInteger &) – Return type: None - Constructs a 3D polygon on the triangulation of a shape, defined by: - the table of nodes, Nodes, and the table of parameters, <Parameters>. where: - a node value is an index in the table of nodes specific to an existing triangulation of a shape - and a parameter value is the value of the parameter of the corresponding point on the curve approximated by the constructed polygon. Warning The tables Nodes and Parameters must be the same size. This property is not checked at construction time.
Parameters: - Nodes (TColStd_Array1OfInteger &) –
- Parameters (TColStd_Array1OfReal &) –
Return type: -
Deflection
()¶ - Returns the deflection of this polygon
Return type: float - Sets the deflection of this polygon to D. See more on deflection in Poly_Polygones2D.
Parameters: D (float) – Return type: None
-
GetHandle
()¶
-
HasParameters
()¶ - Returns true if parameters are associated with the nodes in this polygon.
Return type: bool
-
NbNodes
()¶ - Returns the number of nodes for this polygon. Note: If the polygon is closed, the point of closure is repeated at the end of its table of nodes. Thus, on a closed triangle, the function NbNodes returns 4.
Return type: int
-
Nodes
()¶ - Returns the table of nodes for this polygon. A node value is an index in the table of nodes specific to an existing triangulation of a shape.
Return type: TColStd_Array1OfInteger
-
Parameters
()¶ - Returns the table of the parameters associated with each node in this polygon. Warning Use the function HasParameters to check if parameters are associated with the nodes in this polygon.
Return type: Handle_TColStd_HArray1OfReal
-
thisown
¶ The membership flag
-
class
Poly_Triangle
(*args)¶ Bases:
object
- Constructs a triangle and sets all indices to zero.
Return type: None - Constructs a triangle and sets its three indices to N1, N2 and N3 respectively, where these node values are indices in the table of nodes specific to an existing triangulation of a shape.
Parameters: Return type: -
ChangeValue
()¶ - Get the node of given Index. Raises OutOfRange if Index is not in 1,2,3
Parameters: Index (int) – Return type: int
-
Get
()¶ - Returns the node indices of this triangle in N1, N2 and N3.
Parameters: - N1 (int &) –
- N2 (int &) –
- N3 (int &) –
Return type:
-
Set
()¶ - Sets the value of the three nodes of this triangle to N1, N2 and N3 respectively.
Parameters: Return type: - Sets the value of the Indexth node of this triangle to Node. Raises OutOfRange if Index is not in 1,2,3
Parameters: Return type:
-
Value
()¶ - Get the node of given Index. Raises OutOfRange from Standard if Index is not in 1,2,3
Parameters: Index (int) – Return type: int
-
thisown
¶ The membership flag
-
class
Poly_Triangulation
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
- Constructs a triangulation from a set of triangles. The triangulation is initialized without a triangle or a node, but capable of containing nbNodes nodes, and nbTriangles triangles. Here the UVNodes flag indicates whether 2D nodes will be associated with 3D ones, (i.e. to enable a 2D representation).
Parameters: Return type: - Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes and triangles from Triangles.
Parameters: - Nodes (TColgp_Array1OfPnt) –
- Triangles (Poly_Array1OfTriangle &) –
Return type: - Constructs a triangulation from a set of triangles. The triangulation is initialized with 3D points from Nodes, 2D points from UVNodes and triangles from Triangles, where coordinates of a 2D point from UVNodes are the (u, v) parameters of the corresponding 3D point from Nodes on the surface approximated by the constructed triangulation.
Parameters: - Nodes (TColgp_Array1OfPnt) –
- UVNodes (TColgp_Array1OfPnt2d) –
- Triangles (Poly_Array1OfTriangle &) –
Return type: -
ChangeNodes
()¶ - Returns the table of 3D nodes (3D points) for this triangulation. The returned array is shared. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation.
Return type: TColgp_Array1OfPnt
-
ChangeNormals
()¶ Return type: TShort_Array1OfShortReal
-
ChangeTriangles
()¶ - Returns the table of triangles for this triangulation. Function ChangeUVNodes shares the returned array. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation.
Return type: Poly_Array1OfTriangle
-
ChangeUVNodes
()¶ - Returns the table of 2D nodes (2D points) associated with each 3D node of this triangulation. Function ChangeUVNodes shares the returned array. Therefore if the table is selected by reference, you can, by simply modifying it, directly modify the data structure of this triangulation.
Return type: TColgp_Array1OfPnt2d
-
Copy
()¶ - Creates full copy of current triangulation.
Return type: Handle_Poly_Triangulation
-
Deflection
()¶ - Returns the deflection of this triangulation.
Return type: float - Sets the deflection of this triangulation to D. See more on deflection in Polygon2D
Parameters: D (float) – Return type: None
-
GetHandle
()¶
-
HasUVNodes
()¶ - Returns true if 2D nodes are associated with 3D nodes for this triangulation.
Return type: bool
-
NbNodes
()¶ - Returns the number of nodes for this triangulation. Null if the nodes are not yet defined.
Return type: int
-
NbTriangles
()¶ - Returns the number of triangles for this triangulation. Null if the Triangles are not yet defined.
Return type: int
-
Nodes
()¶ - Returns the table of 3D nodes (3D points) for this triangulation.
Return type: TColgp_Array1OfPnt
-
Normals
()¶ Return type: TShort_Array1OfShortReal
-
SetNormals
()¶ - Sets the table of node normals. raises exception if length of theNormals != 3*NbNodes
Parameters: theNormals (Handle_TShort_HArray1OfShortReal &) – Return type: None
-
Triangles
()¶ - Returns the table of triangles for this triangulation.
Return type: Poly_Array1OfTriangle
-
UVNodes
()¶ - Returns the table of 2D nodes (2D points) associated with each 3D node of this triangulation. The function HasUVNodes checks if 2D nodes are associated with the 3D nodes of this triangulation. Const reference on the 2d nodes values.
Return type: TColgp_Array1OfPnt2d
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
class
poly
(Poly self) → poly¶ Bases:
object
-
static
Catenate
(*args) → OCC.Poly.Handle_Poly_Triangulation¶ - 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.
Parameters: lstTri (Poly_ListOfTriangulation &) – Return type: Handle_Poly_Triangulation
-
static
ComputeNormals
()¶ - Compute node normals for face triangulation as mean normal of surrounding triangles
Parameters: Tri (Handle_Poly_Triangulation &) – Return type: void
-
static
Dump
()¶ - Dumps the triangulation. This is a call to the previous method with Comapct set to False.
Parameters: - T (Handle_Poly_Triangulation &) –
- OS (Standard_OStream &) –
Return type: void
- Dumps the 3D polygon. This is a call to the previous method with Comapct set to False.
Parameters: - P (Handle_Poly_Polygon3D &) –
- OS (Standard_OStream &) –
Return type: void
- Dumps the 2D polygon. This is a call to the previous method with Comapct set to False.
Parameters: - P (Handle_Poly_Polygon2D &) –
- OS (Standard_OStream &) –
Return type: void
-
static
PointOnTriangle
()¶ - 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).
Parameters: Return type:
-
ReadPolygon2DFromString
()¶ poly_ReadPolygon2DFromString(poly self, std::string src)
-
ReadPolygon3DFromString
()¶ poly_ReadPolygon3DFromString(poly self, std::string src)
-
ReadTriangulationFromString
()¶ poly_ReadTriangulationFromString(poly self, std::string src)
-
static
Write
()¶ - 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.
Parameters: - T (Handle_Poly_Triangulation &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
- Writes the content of the 3D polygon <P> 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.
Parameters: - P (Handle_Poly_Polygon3D &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
- Writes the content of the 2D polygon <P> 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.
Parameters: - P (Handle_Poly_Polygon2D &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
-
thisown
¶ The membership flag
-
static
-
poly_Catenate
(*args) → OCC.Poly.Handle_Poly_Triangulation¶ - 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.
Parameters: lstTri (Poly_ListOfTriangulation &) – Return type: Handle_Poly_Triangulation
-
poly_ComputeNormals
()¶ - Compute node normals for face triangulation as mean normal of surrounding triangles
Parameters: Tri (Handle_Poly_Triangulation &) – Return type: void
-
poly_Dump
()¶ - Dumps the triangulation. This is a call to the previous method with Comapct set to False.
Parameters: - T (Handle_Poly_Triangulation &) –
- OS (Standard_OStream &) –
Return type: void
- Dumps the 3D polygon. This is a call to the previous method with Comapct set to False.
Parameters: - P (Handle_Poly_Polygon3D &) –
- OS (Standard_OStream &) –
Return type: void
- Dumps the 2D polygon. This is a call to the previous method with Comapct set to False.
Parameters: - P (Handle_Poly_Polygon2D &) –
- OS (Standard_OStream &) –
Return type: void
-
poly_PointOnTriangle
()¶ - 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).
Parameters: Return type:
-
poly_Write
()¶ - 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.
Parameters: - T (Handle_Poly_Triangulation &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
- Writes the content of the 3D polygon <P> 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.
Parameters: - P (Handle_Poly_Polygon3D &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
- Writes the content of the 2D polygon <P> 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.
Parameters: - P (Handle_Poly_Polygon2D &) –
- OS (Standard_OStream &) –
- Compact (bool) – default value is Standard_True
Return type: void
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases