3.4.0
tiglcommonfunctions.h File Reference
#include "CCPACSImportExport.h"
#include "Standard.hxx"
#include "Standard_values.h"
#include "tigl_internal.h"
#include "gp_Pnt.hxx"
#include "gp_Vec.hxx"
#include "gp_Pln.hxx"
#include "TopoDS_Shape.hxx"
#include <TopoDS_Edge.hxx>
#include "PNamedShape.h"
#include "ListPNamedShape.h"
#include "CTiglIntersectionPoint.h"
#include "CCPACSConfiguration.h"
#include "CTiglRelativelyPositionedComponent.h"
#include <Geom_BSplineCurve.hxx>
#include <TopTools_ListOfShape.hxx>
#include "TColgp_HArray1OfPnt.hxx"
#include <map>
#include <string>
#include <vector>
#include <algorithm>
#include "UniquePtr.h"

Data Structures

struct  IsInsideTolerance
 
struct  UVResult
 The UVResult struct is used as an output for GetFaceAndUV. More...
 

Typedefs

typedef std::map< std::string, PNamedShapeShapeMap
 

Enumerations

enum  IntStatus { BetweenPoints, OutsideBefore, OutsideAfter, NoIntersection }
 

Functions

template<typename ForwardIter >
bool AllSame (ForwardIter begin, ForwardIter end)
 
TIGL_EXPORT opencascade::handle< Geom_BSplineCurve > ApproximateArcOfCircleToRationalBSpline (double cornerRadius, double uMin=0, double uMax=M_PI/4, double tol=1e-6, double y_position=0., double z_position=0.)
 ApproximateArcOfCircleToRationalBSpline The result of this function is a non-rational B-Spline curve that approximates an arc of circle in the y-z plane. Its center is given by the y- and z-position. The angle is given in rad. The direction of rotation is counter-clockwise, starting with alpha=0 on the positive y-axis, with z=0. More...
 
TIGL_EXPORT TopoDS_Face BuildFace (const gp_Pnt &p1, const gp_Pnt &p2, const gp_Pnt &p3, const gp_Pnt &p4)
 
TIGL_EXPORT TopoDS_Face BuildFace (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2)
 
TIGL_EXPORT TopoDS_Face BuildFace (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2, const gp_Vec &dir)
 
TIGL_EXPORT TopoDS_Face BuildFace (const TopoDS_Wire &wire)
 
TIGL_EXPORT TopoDS_Face BuildRuledFace (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2)
 
TIGL_EXPORT TopoDS_Wire BuildWire (const gp_Pnt &p1, const gp_Pnt &p2)
 
TIGL_EXPORT TopoDS_Wire BuildWireFromEdges (const TopoDS_Shape &edges)
 
TIGL_EXPORT TopoDS_Wire BuildWireRectangle (const double heightToWidthRatio, const double cornerRadius=0.0, const double tol=Precision::Approximation())
 BuildWireRectangle Builds a rectangular wire in (y,z) - plane with width 1, center of coordinate system is the center of the rectangle. More...
 
TIGL_EXPORT void BuildWiresFromConnectedEdges (const TopoDS_Shape &shape, TopTools_ListOfShape &wireList)
 
TIGL_EXPORT TopoDS_Wire BuildWireSuperEllipse (const double lowerHeightFraction, const double mLower, const double mUpper, const double nLower, const double nUpper, const double tol=Precision::Approximation())
 BuildWireSuperellipse Builds a superelliptic wire in (y,z) - plane with width 1 and height 1. More...
 
TIGL_EXPORT bool CheckCommonVertex (const TopoDS_Edge &e1, const TopoDS_Edge &e2)
 
TIGL_EXPORT int Clamp (int val, int min, int max)
 
TIGL_EXPORT double Clamp (double val, double min, double max)
 
TIGL_EXPORT size_t Clamp (size_t val, size_t min, size_t max)
 
TIGL_EXPORT TopoDS_Wire CloseWire (const TopoDS_Wire &wire)
 
TIGL_EXPORT TopoDS_Wire CloseWires (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2)
 
TIGL_EXPORT TopoDS_Wire CloseWires (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2, const gp_Vec &dir)
 
template<typename ArrayLike , typename ValueType >
bool Contains (const ArrayLike &array, ValueType val, ValueType tolerance)
 Checks, whether an array contains a value or not. More...
 
TIGL_EXPORT TopoDS_Shape CutShapes (const TopoDS_Shape &shape1, const TopoDS_Shape &shape2)
 
double Degrees (double radians)
 
TIGL_EXPORT gp_Pnt EdgeGetPoint (const TopoDS_Edge &edge, double alpha)
 
TIGL_EXPORT void EdgeGetPointTangent (const TopoDS_Edge &edge, double alpha, gp_Pnt &point, gp_Vec &normal)
 
TIGL_EXPORT void EdgeGetPointTangentBasedOnParam (const TopoDS_Edge &edge, double alpha, gp_Pnt &point, gp_Vec &tangent)
 
TIGL_EXPORT TopoDS_Edge EdgeSplineFromPoints (const std::vector< gp_Pnt > &points)
 
TIGL_EXPORT std::string FileExtension (const std::string &filename)
 
TIGL_EXPORT void FindAllConnectedEdges (const TopoDS_Edge &edge, TopTools_ListOfShape &edgeList, TopTools_ListOfShape &targetList)
 
template<typename ForwardIter , typename Compare >
size_t FindIndex (ForwardIter begin, ForwardIter end, Compare comp)
 Searches for a entry in a range and returns its index. More...
 
TIGL_EXPORT double GetArea (const TopoDS_Shape &shape)
 
TIGL_EXPORT gp_Pnt GetCenterOfMass (const TopoDS_Shape &shape)
 
TIGL_EXPORT gp_Pnt GetCentralFacePoint (const class TopoDS_Face &face)
 
TIGL_EXPORT int GetComponentHashCode (tigl::ITiglGeometricComponent &)
 
TIGL_EXPORT TopoDS_Edge GetEdge (const TopoDS_Shape &shape, int iEdge)
 
TIGL_EXPORT TiglContinuity getEdgeContinuity (const TopoDS_Edge &edge1, const TopoDS_Edge &edge2)
 
TIGL_EXPORT void GetEndVertices (const TopoDS_Shape &shape, TopTools_ListOfShape &endVertices)
 
TIGL_EXPORT TopoDS_Face GetFace (const TopoDS_Shape &shape, int iFace)
 
TIGL_EXPORT boost::optional< UVResultGetFaceAndUV (TopoDS_Shape const &shape, gp_Pnt const &pnt, double tol=1e-3)
 Given a point on a shape, GetFaceAndUV finds all faces which contain the point and determines its (u,v)-coordinates on that face. More...
 
TIGL_EXPORT TopoDS_Shape GetFacesByName (const PNamedShape shape, const std::string &name)
 
TIGL_EXPORT gp_Pnt GetFirstPoint (const TopoDS_Shape &wireOrEdge)
 
TIGL_EXPORT gp_Pnt GetFirstPoint (const TopoDS_Wire &w)
 
TIGL_EXPORT gp_Pnt GetFirstPoint (const TopoDS_Edge &e)
 
TIGL_EXPORT bool GetIntersectionPoint (const TopoDS_Face &face, const TopoDS_Edge &edge, gp_Pnt &dst, double tolerance=Precision::Confusion())
 
TIGL_EXPORT bool GetIntersectionPoint (const TopoDS_Face &face, const TopoDS_Wire &wire, gp_Pnt &dst, double tolerance=Precision::Confusion())
 
TIGL_EXPORT bool GetIntersectionPoint (const TopoDS_Wire &wire1, const TopoDS_Wire &wire2, intersectionPointList &intersectionPoints, const double tolerance=Precision::SquareConfusion())
 
TIGL_EXPORT gp_Pnt GetLastPoint (const TopoDS_Shape &wireOrEdge)
 
TIGL_EXPORT gp_Pnt GetLastPoint (const TopoDS_Wire &w)
 
TIGL_EXPORT gp_Pnt GetLastPoint (const TopoDS_Edge &e)
 
TIGL_EXPORT Standard_Real GetLength (const TopoDS_Wire &wire)
 
TIGL_EXPORT Standard_Real GetLength (const TopoDS_Edge &edge)
 
TIGL_EXPORT void GetListOfShape (const TopoDS_Shape &shape, TopAbs_ShapeEnum type, TopTools_ListOfShape &result)
 
TIGL_EXPORT bool GetMinMaxPoint (const TopoDS_Shape &shape, const gp_Vec &dir, gp_Pnt &minPnt, gp_Pnt &maxPnt)
 
TIGL_EXPORT TopoDS_Face GetNearestFace (const TopoDS_Shape &src, const gp_Pnt &pnt)
 
TIGL_EXPORT unsigned int GetNumberOfEdges (const TopoDS_Shape &shape)
 
TIGL_EXPORT unsigned int GetNumberOfFaces (const TopoDS_Shape &shape)
 
TIGL_EXPORT unsigned int GetNumberOfSubshapes (const TopoDS_Shape &shape)
 
TIGL_EXPORT void GetShapeExtension (const TopoDS_Shape &shape, double &minx, double &maxx, double &miny, double &maxy, double &minz, double &maxz)
 
TIGL_EXPORT TopoDS_Face GetSingleFace (const TopoDS_Shape &shape)
 
TIGL_EXPORT std::vector< TopoDS_Shape > GetSubShapes (const TopoDS_Shape &shape, TopAbs_ShapeEnum type)
 
TIGL_EXPORT ListPNamedShape GroupFaces (const PNamedShape shape, tigl::ShapeGroupMode groupType)
 
TIGL_EXPORT Handle (Geom_BSplineCurve) GetBSplineCurve(const TopoDS_Edge &e)
 
template<typename T >
TIGL_EXPORT Handle(TColgp_HArray1OfPnt) OccArray(const std TIGL_EXPORT Handle(TColgp_HArray1OfPnt) OccArray(const std TIGL_EXPORT Handle(TColStd_HArray1OfReal) OccFArray(const std TIGL_EXPORT Handle(TColStd_HArray1OfInteger) OccIArray(const std size_t IndexFromUid (const std::vector< std::unique_ptr< T > > &vectorOfPointers, const std::string &uid)
 Converters between std::vectors and opencascade vectors. More...
 
TIGL_EXPORT IntStatus IntersectLinePlane (gp_Pnt p1, gp_Pnt p2, gp_Pln plane, gp_Pnt &result)
 
TIGL_EXPORT Standard_Boolean IsEqual (const TopoDS_Shape &s1, const TopoDS_Shape &s2)
 
TIGL_EXPORT bool IsFaceBetweenPoints (const TopoDS_Face &face, gp_Pnt p1, gp_Pnt p2)
 
TIGL_EXPORT bool IsFileReadable (const std::string &filename)
 
TIGL_EXPORT bool IsPathRelative (const std::string &)
 
TIGL_EXPORT bool IsPointAbovePlane (const gp_Pln &pln, gp_Pnt point)
 
TIGL_EXPORT bool IsPointInsideFace (const TopoDS_Face &face, gp_Pnt point)
 
TIGL_EXPORT bool IsPointInsideShape (const TopoDS_Shape &solid, gp_Pnt point, Bnd_Box const *bounding_box=nullptr)
 
TIGL_EXPORT std::vector< double > LinspaceWithBreaks (double umin, double umax, size_t n_values, const std::vector< double > &breaks={})
 
TIGL_EXPORT double Mix (double x, double y, double a)
 
TIGL_EXPORT double NormalizeAngleDeg (double angleDeg)
 
TIGL_EXPORT Standard_Real ProjectPointOnLine (gp_Pnt p, gp_Pnt lineStart, gp_Pnt lineStop)
 
TIGL_EXPORT gp_Pnt2d ProjectPointOnPlane (gp_Pln pln, gp_Pnt p)
 
TIGL_EXPORT gp_Pnt ProjectPointOnShape (const TopoDS_Shape &shape, const gp_Pnt &point, const gp_Vec &direction)
 
TIGL_EXPORT Standard_Real ProjectPointOnWire (const TopoDS_Wire &wire, gp_Pnt p)
 
TIGL_EXPORT Standard_Real ProjectPointOnWireAtAngle (const TopoDS_Wire &wire, gp_Pnt p, gp_Dir rotationAxisAroundP, double angle)
 
double Radians (double degree)
 
TIGL_EXPORT TopoDS_Shape RemoveDuplicateEdges (const TopoDS_Shape &shape)
 
template<class ArrayType , typename BinaryPredicate , typename BinaryMerge >
void ReplaceAdjacentWithMerged (ArrayType &list, BinaryPredicate is_adjacent, BinaryMerge merged)
 
TIGL_EXPORT TopoDS_Shape ReplaceFaceInShape (TopoDS_Shape const &shape, TopoDS_Face const &new_face, TopoDS_Face const &old_face)
 ReplaceFaceInShape returns a new shape that corresponds to the input shape, except that old_face is replaced by new_face. More...
 
TIGL_EXPORT TopoDS_Wire SortWireEdges (const TopoDS_Wire &wire)
 
TIGL_EXPORT TopoDS_Shape SplitShape (const TopoDS_Shape &src, const TopoDS_Shape &tool)
 
TIGL_EXPORT tigl::CTiglPoint TiglAxisToCTiglPoint (TiglAxis axis)
 
TIGL_EXPORT TopoDS_Shape TransformedShape (const tigl::CTiglTransformation &transformationToGlobal, TiglCoordinateSystem cs, const TopoDS_Shape &shape)
 
TIGL_EXPORT TopoDS_Shape TransformedShape (const tigl::CTiglRelativelyPositionedComponent &component, TiglCoordinateSystem cs, const TopoDS_Shape &shape)
 
TIGL_EXPORT TopoDS_Face TrimFace (TopoDS_Face const &face, double umin, double umax, double vmin, double vmax)
 TrimFace trims a face given new minimum and maximum values for the (u,v)- coordinates. More...
 
TIGL_EXPORT gp_Pnt WireGetPoint (const TopoDS_Wire &wire, double alpha)
 
TIGL_EXPORT void WireGetPointTangent (const TopoDS_Wire &wire, double alpha, gp_Pnt &point, gp_Vec &normal)
 

Typedef Documentation

◆ ShapeMap

typedef std::map<std::string, PNamedShape> ShapeMap

Enumeration Type Documentation

◆ IntStatus

enum IntStatus
Enumerator
BetweenPoints 
OutsideBefore 
OutsideAfter 
NoIntersection 

Function Documentation

◆ AllSame()

template<typename ForwardIter >
bool AllSame ( ForwardIter  begin,
ForwardIter  end 
)

Returns true, if all elements are the same

◆ ApproximateArcOfCircleToRationalBSpline()

TIGL_EXPORT opencascade::handle<Geom_BSplineCurve> ApproximateArcOfCircleToRationalBSpline ( double  cornerRadius,
double  uMin = 0,
double  uMax = M_PI/4,
double  tol = 1e-6,
double  y_position = 0.,
double  z_position = 0. 
)

ApproximateArcOfCircleToRationalBSpline The result of this function is a non-rational B-Spline curve that approximates an arc of circle in the y-z plane. Its center is given by the y- and z-position. The angle is given in rad. The direction of rotation is counter-clockwise, starting with alpha=0 on the positive y-axis, with z=0.

Parameters
cornerRadiusRadius of the circle
uMinStarting parameter in rad. Range: [0,2*Pi]
uMax
tolTolerance
y_position
z_position
Returns
opencascade::handle<Geom_BSplineCurve>

◆ BuildFace() [1/4]

TIGL_EXPORT TopoDS_Face BuildFace ( const gp_Pnt &  p1,
const gp_Pnt &  p2,
const gp_Pnt &  p3,
const gp_Pnt &  p4 
)

◆ BuildFace() [2/4]

TIGL_EXPORT TopoDS_Face BuildFace ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2 
)

◆ BuildFace() [3/4]

TIGL_EXPORT TopoDS_Face BuildFace ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2,
const gp_Vec &  dir 
)

◆ BuildFace() [4/4]

TIGL_EXPORT TopoDS_Face BuildFace ( const TopoDS_Wire &  wire)

◆ BuildRuledFace()

TIGL_EXPORT TopoDS_Face BuildRuledFace ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2 
)

◆ BuildWire()

TIGL_EXPORT TopoDS_Wire BuildWire ( const gp_Pnt &  p1,
const gp_Pnt &  p2 
)

◆ BuildWireFromEdges()

TIGL_EXPORT TopoDS_Wire BuildWireFromEdges ( const TopoDS_Shape &  edges)

◆ BuildWireRectangle()

TIGL_EXPORT TopoDS_Wire BuildWireRectangle ( const double  heightToWidthRatio,
const double  cornerRadius = 0.0,
const double  tol = Precision::Approximation() 
)

BuildWireRectangle Builds a rectangular wire in (y,z) - plane with width 1, center of coordinate system is the center of the rectangle.

Parameters
heightToWidthRatio
cornerRadius
tol
Returns
TopoDS_Wire

◆ BuildWiresFromConnectedEdges()

TIGL_EXPORT void BuildWiresFromConnectedEdges ( const TopoDS_Shape &  shape,
TopTools_ListOfShape &  wireList 
)

◆ BuildWireSuperEllipse()

TIGL_EXPORT TopoDS_Wire BuildWireSuperEllipse ( const double  lowerHeightFraction,
const double  mLower,
const double  mUpper,
const double  nLower,
const double  nUpper,
const double  tol = Precision::Approximation() 
)

BuildWireSuperellipse Builds a superelliptic wire in (y,z) - plane with width 1 and height 1.

Parameters
lowerHeightFractionFraction of height of the lower semi_ellipse relative to the toal height
mLowerExponent m for lower semi-ellipse
mUpperExponent m for upper semi-ellipse
nLowerExponent n for lower semi-ellipse
nUpperExponent n for upper semi-ellipse
tolTolerance required for approximation of the superellipse as a b-spline curve
Returns

◆ CheckCommonVertex()

TIGL_EXPORT bool CheckCommonVertex ( const TopoDS_Edge &  e1,
const TopoDS_Edge &  e2 
)

◆ Clamp() [1/3]

TIGL_EXPORT int Clamp ( int  val,
int  min,
int  max 
)

◆ Clamp() [2/3]

TIGL_EXPORT double Clamp ( double  val,
double  min,
double  max 
)

◆ Clamp() [3/3]

TIGL_EXPORT size_t Clamp ( size_t  val,
size_t  min,
size_t  max 
)

◆ CloseWire()

TIGL_EXPORT TopoDS_Wire CloseWire ( const TopoDS_Wire &  wire)

◆ CloseWires() [1/2]

TIGL_EXPORT TopoDS_Wire CloseWires ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2 
)

◆ CloseWires() [2/2]

TIGL_EXPORT TopoDS_Wire CloseWires ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2,
const gp_Vec &  dir 
)

◆ Contains()

template<typename ArrayLike , typename ValueType >
bool Contains ( const ArrayLike &  array,
ValueType  val,
ValueType  tolerance 
)

Checks, whether an array contains a value or not.

Parameters
arrayThe array to be searched in
valThe value to be saerched for
toleranceThis functions is typically used with floating point values. The tolerance allows to search for a value within the specified tolerance.

◆ CutShapes()

TIGL_EXPORT TopoDS_Shape CutShapes ( const TopoDS_Shape &  shape1,
const TopoDS_Shape &  shape2 
)

◆ Degrees()

double Degrees ( double  radians)
inline

◆ EdgeGetPoint()

TIGL_EXPORT gp_Pnt EdgeGetPoint ( const TopoDS_Edge &  edge,
double  alpha 
)

◆ EdgeGetPointTangent()

TIGL_EXPORT void EdgeGetPointTangent ( const TopoDS_Edge &  edge,
double  alpha,
gp_Pnt &  point,
gp_Vec &  normal 
)

◆ EdgeGetPointTangentBasedOnParam()

TIGL_EXPORT void EdgeGetPointTangentBasedOnParam ( const TopoDS_Edge &  edge,
double  alpha,
gp_Pnt &  point,
gp_Vec &  tangent 
)

◆ EdgeSplineFromPoints()

TIGL_EXPORT TopoDS_Edge EdgeSplineFromPoints ( const std::vector< gp_Pnt > &  points)

◆ FileExtension()

TIGL_EXPORT std::string FileExtension ( const std::string &  filename)

◆ FindAllConnectedEdges()

TIGL_EXPORT void FindAllConnectedEdges ( const TopoDS_Edge &  edge,
TopTools_ListOfShape &  edgeList,
TopTools_ListOfShape &  targetList 
)

◆ FindIndex()

template<typename ForwardIter , typename Compare >
size_t FindIndex ( ForwardIter  begin,
ForwardIter  end,
Compare  comp 
)

Searches for a entry in a range and returns its index.

This function can be used with std::arrays, std::vectors and also possible other containers supported by std::distance

If the index is not found, the size of the range will be returned instead

◆ GetArea()

TIGL_EXPORT double GetArea ( const TopoDS_Shape &  shape)

◆ GetCenterOfMass()

TIGL_EXPORT gp_Pnt GetCenterOfMass ( const TopoDS_Shape &  shape)

◆ GetCentralFacePoint()

TIGL_EXPORT gp_Pnt GetCentralFacePoint ( const class TopoDS_Face &  face)

◆ GetComponentHashCode()

TIGL_EXPORT int GetComponentHashCode ( tigl::ITiglGeometricComponent )

◆ GetEdge()

TIGL_EXPORT TopoDS_Edge GetEdge ( const TopoDS_Shape &  shape,
int  iEdge 
)

◆ getEdgeContinuity()

TIGL_EXPORT TiglContinuity getEdgeContinuity ( const TopoDS_Edge &  edge1,
const TopoDS_Edge &  edge2 
)

◆ GetEndVertices()

TIGL_EXPORT void GetEndVertices ( const TopoDS_Shape &  shape,
TopTools_ListOfShape &  endVertices 
)

◆ GetFace()

TIGL_EXPORT TopoDS_Face GetFace ( const TopoDS_Shape &  shape,
int  iFace 
)

◆ GetFaceAndUV()

TIGL_EXPORT boost::optional<UVResult> GetFaceAndUV ( TopoDS_Shape const &  shape,
gp_Pnt const &  pnt,
double  tol = 1e-3 
)

Given a point on a shape, GetFaceAndUV finds all faces which contain the point and determines its (u,v)-coordinates on that face.

It is assumes that the point is on the shape. Typically this function would be used on the output of ProjectPointOnShape.

Parameters
shapeInput shape
pntInput point
tola tolerance for the squared distance of the point
Returns
a boost::optional<UVResult> instance containing the face together with the (u,v) coordinates of the point on that face, if the algorithm succeeded

◆ GetFacesByName()

TIGL_EXPORT TopoDS_Shape GetFacesByName ( const PNamedShape  shape,
const std::string &  name 
)

◆ GetFirstPoint() [1/3]

TIGL_EXPORT gp_Pnt GetFirstPoint ( const TopoDS_Shape &  wireOrEdge)

◆ GetFirstPoint() [2/3]

TIGL_EXPORT gp_Pnt GetFirstPoint ( const TopoDS_Wire &  w)

◆ GetFirstPoint() [3/3]

TIGL_EXPORT gp_Pnt GetFirstPoint ( const TopoDS_Edge &  e)

◆ GetIntersectionPoint() [1/3]

TIGL_EXPORT bool GetIntersectionPoint ( const TopoDS_Face &  face,
const TopoDS_Edge &  edge,
gp_Pnt &  dst,
double  tolerance = Precision::Confusion() 
)

◆ GetIntersectionPoint() [2/3]

TIGL_EXPORT bool GetIntersectionPoint ( const TopoDS_Face &  face,
const TopoDS_Wire &  wire,
gp_Pnt &  dst,
double  tolerance = Precision::Confusion() 
)

◆ GetIntersectionPoint() [3/3]

TIGL_EXPORT bool GetIntersectionPoint ( const TopoDS_Wire &  wire1,
const TopoDS_Wire &  wire2,
intersectionPointList intersectionPoints,
const double  tolerance = Precision::SquareConfusion() 
)

◆ GetLastPoint() [1/3]

TIGL_EXPORT gp_Pnt GetLastPoint ( const TopoDS_Shape &  wireOrEdge)

◆ GetLastPoint() [2/3]

TIGL_EXPORT gp_Pnt GetLastPoint ( const TopoDS_Wire &  w)

◆ GetLastPoint() [3/3]

TIGL_EXPORT gp_Pnt GetLastPoint ( const TopoDS_Edge &  e)

◆ GetLength() [1/2]

TIGL_EXPORT Standard_Real GetLength ( const TopoDS_Wire &  wire)

◆ GetLength() [2/2]

TIGL_EXPORT Standard_Real GetLength ( const TopoDS_Edge &  edge)

◆ GetListOfShape()

TIGL_EXPORT void GetListOfShape ( const TopoDS_Shape &  shape,
TopAbs_ShapeEnum  type,
TopTools_ListOfShape &  result 
)

◆ GetMinMaxPoint()

TIGL_EXPORT bool GetMinMaxPoint ( const TopoDS_Shape &  shape,
const gp_Vec &  dir,
gp_Pnt &  minPnt,
gp_Pnt &  maxPnt 
)

◆ GetNearestFace()

TIGL_EXPORT TopoDS_Face GetNearestFace ( const TopoDS_Shape &  src,
const gp_Pnt &  pnt 
)

◆ GetNumberOfEdges()

TIGL_EXPORT unsigned int GetNumberOfEdges ( const TopoDS_Shape &  shape)

◆ GetNumberOfFaces()

TIGL_EXPORT unsigned int GetNumberOfFaces ( const TopoDS_Shape &  shape)

◆ GetNumberOfSubshapes()

TIGL_EXPORT unsigned int GetNumberOfSubshapes ( const TopoDS_Shape &  shape)

◆ GetShapeExtension()

TIGL_EXPORT void GetShapeExtension ( const TopoDS_Shape &  shape,
double &  minx,
double &  maxx,
double &  miny,
double &  maxy,
double &  minz,
double &  maxz 
)

◆ GetSingleFace()

TIGL_EXPORT TopoDS_Face GetSingleFace ( const TopoDS_Shape &  shape)

◆ GetSubShapes()

TIGL_EXPORT std::vector<TopoDS_Shape> GetSubShapes ( const TopoDS_Shape &  shape,
TopAbs_ShapeEnum  type 
)

◆ GroupFaces()

TIGL_EXPORT ListPNamedShape GroupFaces ( const PNamedShape  shape,
tigl::ShapeGroupMode  groupType 
)

◆ Handle()

TIGL_EXPORT Handle ( Geom_BSplineCurve  ) const &

◆ IndexFromUid()

template<typename T >
TIGL_EXPORT Handle (TColgp_HArray1OfPnt) OccArray( const std TIGL_EXPORT Handle (TColgp_HArray1OfPnt) OccArray( const std TIGL_EXPORT Handle (TColStd_HArray1OfReal) OccFArray( const std TIGL_EXPORT Handle (TColStd_HArray1OfInteger) OccIArray( const std size_t IndexFromUid ( const std::vector< std::unique_ptr< T > > &  vectorOfPointers,
const std::string &  uid 
) const

Converters between std::vectors and opencascade vectors.

◆ IntersectLinePlane()

TIGL_EXPORT IntStatus IntersectLinePlane ( gp_Pnt  p1,
gp_Pnt  p2,
gp_Pln  plane,
gp_Pnt &  result 
)

◆ IsEqual()

TIGL_EXPORT Standard_Boolean IsEqual ( const TopoDS_Shape &  s1,
const TopoDS_Shape &  s2 
)

◆ IsFaceBetweenPoints()

TIGL_EXPORT bool IsFaceBetweenPoints ( const TopoDS_Face &  face,
gp_Pnt  p1,
gp_Pnt  p2 
)

◆ IsFileReadable()

TIGL_EXPORT bool IsFileReadable ( const std::string &  filename)

◆ IsPathRelative()

TIGL_EXPORT bool IsPathRelative ( const std::string &  )

◆ IsPointAbovePlane()

TIGL_EXPORT bool IsPointAbovePlane ( const gp_Pln &  pln,
gp_Pnt  point 
)

◆ IsPointInsideFace()

TIGL_EXPORT bool IsPointInsideFace ( const TopoDS_Face &  face,
gp_Pnt  point 
)

◆ IsPointInsideShape()

TIGL_EXPORT bool IsPointInsideShape ( const TopoDS_Shape &  solid,
gp_Pnt  point,
Bnd_Box const *  bounding_box = nullptr 
)

◆ LinspaceWithBreaks()

TIGL_EXPORT std::vector<double> LinspaceWithBreaks ( double  umin,
double  umax,
size_t  n_values,
const std::vector< double > &  breaks = {} 
)

◆ Mix()

TIGL_EXPORT double Mix ( double  x,
double  y,
double  a 
)

◆ NormalizeAngleDeg()

TIGL_EXPORT double NormalizeAngleDeg ( double  angleDeg)

◆ ProjectPointOnLine()

TIGL_EXPORT Standard_Real ProjectPointOnLine ( gp_Pnt  p,
gp_Pnt  lineStart,
gp_Pnt  lineStop 
)

◆ ProjectPointOnPlane()

TIGL_EXPORT gp_Pnt2d ProjectPointOnPlane ( gp_Pln  pln,
gp_Pnt  p 
)

◆ ProjectPointOnShape()

TIGL_EXPORT gp_Pnt ProjectPointOnShape ( const TopoDS_Shape &  shape,
const gp_Pnt &  point,
const gp_Vec &  direction 
)

◆ ProjectPointOnWire()

TIGL_EXPORT Standard_Real ProjectPointOnWire ( const TopoDS_Wire &  wire,
gp_Pnt  p 
)

◆ ProjectPointOnWireAtAngle()

TIGL_EXPORT Standard_Real ProjectPointOnWireAtAngle ( const TopoDS_Wire &  wire,
gp_Pnt  p,
gp_Dir  rotationAxisAroundP,
double  angle 
)

◆ Radians()

double Radians ( double  degree)
inline

◆ RemoveDuplicateEdges()

TIGL_EXPORT TopoDS_Shape RemoveDuplicateEdges ( const TopoDS_Shape &  shape)

◆ ReplaceAdjacentWithMerged()

template<class ArrayType , typename BinaryPredicate , typename BinaryMerge >
void ReplaceAdjacentWithMerged ( ArrayType &  list,
BinaryPredicate  is_adjacent,
BinaryMerge  merged 
)

◆ ReplaceFaceInShape()

TIGL_EXPORT TopoDS_Shape ReplaceFaceInShape ( TopoDS_Shape const &  shape,
TopoDS_Face const &  new_face,
TopoDS_Face const &  old_face 
)

ReplaceFaceInShape returns a new shape that corresponds to the input shape, except that old_face is replaced by new_face.

Parameters
shapeThe input shape
new_facethe new face that shall take the place of the old shape
old_facethe old face to be replaced
Returns
the shape with the replaced faces

◆ SortWireEdges()

TIGL_EXPORT TopoDS_Wire SortWireEdges ( const TopoDS_Wire &  wire)

◆ SplitShape()

TIGL_EXPORT TopoDS_Shape SplitShape ( const TopoDS_Shape &  src,
const TopoDS_Shape &  tool 
)

◆ TiglAxisToCTiglPoint()

TIGL_EXPORT tigl::CTiglPoint TiglAxisToCTiglPoint ( TiglAxis  axis)

◆ TransformedShape() [1/2]

TIGL_EXPORT TopoDS_Shape TransformedShape ( const tigl::CTiglTransformation transformationToGlobal,
TiglCoordinateSystem  cs,
const TopoDS_Shape &  shape 
)

◆ TransformedShape() [2/2]

TIGL_EXPORT TopoDS_Shape TransformedShape ( const tigl::CTiglRelativelyPositionedComponent component,
TiglCoordinateSystem  cs,
const TopoDS_Shape &  shape 
)

◆ TrimFace()

TIGL_EXPORT TopoDS_Face TrimFace ( TopoDS_Face const &  face,
double  umin,
double  umax,
double  vmin,
double  vmax 
)

TrimFace trims a face given new minimum and maximum values for the (u,v)- coordinates.

Parameters
faceThe face to be trimmed
uminnew minimum u value
umaxnew maximum u value
vminnew minimum v value
vmaxnew maximum v value
Returns
the trimmed face

◆ WireGetPoint()

TIGL_EXPORT gp_Pnt WireGetPoint ( const TopoDS_Wire &  wire,
double  alpha 
)

◆ WireGetPointTangent()

TIGL_EXPORT void WireGetPointTangent ( const TopoDS_Wire &  wire,
double  alpha,
gp_Pnt &  point,
gp_Vec &  normal 
)