SURSUB
ModelingUsed to specify a userdefined surface element and its derivatives for a reference surface element.
Use
Userdefined surfaces are typically used in conjunction with pointtosurface and curvetosurface constraints. Userdefined surface calling a SURSUB for the calculation of the values:
<Reference_ParamSurface
id = "555"
is_u_closed = "TRUE"
is_v_closed = "TRUE"
u_start = "1."
u_end = "1."
v_start = "1."
v_end = "1."
usrsub_param_string = "USER(1,400,100)"
usrsub_dll_name = "NULL"
/>
Format
 Fortran Calling Syntax

SUBROUTINE SURSUB (ID, PAR, NPAR, ALPHA, BETA, IORD, IFLAG, VALUES)
 C/C++ Calling Syntax

void STDCALL SURSUB (int *id, double *par, int *npar, double *alpha, double *beta, int *iord, int *iflag, double *values)
 Python Calling Syntax

def SURSUB(id, par, npar, alpha, beta, iord, iflag): return values
 MATLAB Calling Syntax

function values = SURSUB(id, par, npar, alpha, beta, iord, iflag)
Attributes
 ID
 [integer]
 TIME
 [double precision]
 PAR
 [double precision]
 NPAR
 [integer]
 IORD
 [integer]
 ALPHA
 [double precision]
 BETA
 [double precision]
 IFLAG
 [logical]
Output
 VALUE
 [double precision]
Example
def SURSUB(id, par, npar, alpha, beta, iord, iflag):
isurtyp =int(par[0])
cosa = cos(pi*(alpha))
cosb = cos(pi*(beta))
sina = sin(pi*(alpha))
sinb = sin(pi*(beta))
values = []
r = par[1]
if iord == 0:
values.append(r*cosa*cosb)
values.append(r*cosa*sinb)
values.append(r*sina)
return values