Is_SphereWithGeneric (FUN) ¶ FUNCTION Is_SphereWithGeneric : UDINT Intersects a sphere given by the center point c and the radius with an arc or an axis-space-line. (Returns an error in other cases.) Returns the number of intersections found in increasing order along the element. Note If the sphere and the PathElem intersect at infinitely many points, the function will return at most Cnst.IS_SPHERE_MAX_ROOTS roots. It may occur that intersections are not found by the algorithm. InOut: Scope Name Type Comment Return Is_SphereWithGeneric UDINT Inout aRoots ARRAY [0..(Cnst.IS_SPHERE_MAX_ROOTS - 1)] OF LREAL The points of intersection, that means arc(aRoots[i]) is a point on the sphere. The points are returned in increasing order in the direction of the arc. Inout Const c SM3M.SMC_VECTOR3D The center of the sphere. ef ElemFun Input radius LREAL The radius of the sphere. Must be positive. Output bError BOOL Returns TRUE if an error occurred.
Is_SphereWithPoly (FUN) ¶ FUNCTION Is_SphereWithPoly : UDINT Intersects a sphere given by the center point c and the radius with a polynomial given by n+1 coefficients a[0] .. a[n], p(x) = Sum(0 <= i <= n, a[i] * x^i). Returns the number of intersections found in increasing order along the polynomial. InOut: Scope Name Type Comment Return Is_SphereWithPoly UDINT Inout aRoots ARRAY [0..(Cnst.IS_SPHERE_MAX_ROOTS - 1)] OF LREAL The points of intersection, that means p(aRoots[i]) is a point on the sphere. The points are returned in increasing order in the direction of p. Inout Const c SM3M.SMC_Vec The center of the sphere. Input radius LREAL The radius of the sphere. Must be positive. pA POINTER TO SM3M.SMC_Vec Pointer to the array of vector-valued coefficients of the polynomial p(x) = Sum(0 <= i <= n, pA[i] * x^i). n UDINT The degree of the polynomial. Must not be greater than (Cnst.IS_SPHERE_MAX_ROOTS-1)/2. dX0 LREAL Roots are returned only in the interval [dX0 .. dX1]. dX1 LREAL Roots are returned only in the interval [dX0 .. dX1].
Is_Lines_2D (FUN) ¶ FUNCTION Is_Lines_2D : BOOL Computes the point of intersection of two 2D lines. If there is none, or infinitely many, FALSE is returned. InOut: Scope Name Type Return Is_Lines_2D BOOL Inout v SM3M.SMC_VECTOR3D Inout Const l1 Line l2 Line
Is_PlaneWithLineAS (FUN) ¶ FUNCTION Is_PlaneWithLineAS : UDINT Intersects an axis space line with a plane. Returns an error for other element functions. Returns the number of intersections found in increasing order along the element. InOut: Scope Name Type Comment Return Is_PlaneWithLineAS UDINT Inout aRoots ARRAY [0..(SM3M.SMC_MAX_POLY_DEGREE - 1)] OF LREAL The points of intersection. Inout Const ef ElemFun The axis space line that intersects the plane. vN SM3M.SMC_VECTOR3D The unit normal vector on the plane pointing away from the origin. Input d LREAL The distance of the plane to the origin. Output bError BOOL Returns TRUE if an error occurred.
PathElem_AddData_Serialize (FUN) ¶ FUNCTION PathElem_AddData_Serialize : BOOL InOut: Scope Name Type Return PathElem_AddData_Serialize BOOL Input stream SM0.IOutStream Inout Const addData PathElem_AddData
PathElem_CalculateRelativePositionRight (FUN) ¶ FUNCTION PathElem_CalculateRelativePositionRight : LREAL For an absolute position dS_abs on the path, finds the path element at the position and returns a position dS_rel relative to the start of the element, handling rounding errors in a way that dS_rel lies to the right of the exact position, i.e. dS_abs <= sum(path, 0, k-1) + dS_rel. Undefined, if dS_abs is not inside the path. InOut: Scope Name Type Inout Const path PathQueue Input pp PathPosition Return PathElem_CalculateRelativePositionRight LREAL Output pElem POINTER TO PathElem k UDINT
Frame_SanityCheck (FUN) ¶ FUNCTION Frame_SanityCheck : BOOL InOut: Scope Name Type Return Frame_SanityCheck BOOL Inout Const f0 SM3M.SMC_Frame f1 SM3M.SMC_Frame Input dEpsCart LREAL dEpsOrientation LREAL
IsKinSupportingOriAxisInterpolation (FUN) ¶ FUNCTION IsKinSupportingOriAxisInterpolation : BOOL Returns whether the given kinematics supports orientation mode axis. InOut: Scope Name Type Inout errCtx SMRE.ErrorContext Input kin TRAFO.MC_KIN_REF_SM3 Return IsKinSupportingOriAxisInterpolation BOOL Output kinCoupled TRAFO.ISMCoupledKinematics kinPos TRAFO.ISMPositionKinematics_Offset kinOri TRAFO.ISMOrientationKinematics
Line (STRUCT) ¶ TYPE Line : STRUCT A line, represented by a point on the line and a direction vector. InOut: Name Type Comment v SM3M.SMC_VECTOR3D Start point (may be any point on the line) d SM3M.SMC_VECTOR3D Unit direction vector
MvtIdRange ¶ MvtIdRange_Contains (Function) MvtIdRange_ContainsRange (Function) MvtIdRange_Create (Function) MvtIdRange_CreateSingle (Function) MvtIdRange_Extend (Function) MvtIdRange_Union (Function)