I have created a texgen model using a deformed FE-mesh as input data. The TexGen model looks like this
Code: Select all
###############################
Yarn = CYarn()
upVW = XYZ(1,0,0)
Yarn.AssignInterpolation(CInterpolationBezier())
yarnsection = CYarnSectionInterpNode(1, 0,1)
Yarn.AddNode(CNode(XYZ( 1.432, 2.321 ,0.132),XYZ() ,upVW))
Points = [XY(0.435029525407,0.199547127674), XY(....
yarnsection.AddSection(CSectionPolygon(Points))
#Add more points and sections ...
Yarn.AssignSection(yarnsection)
Yarn.SetResolution(res)
DefTextile.AddYarn(Yarn)
AddTextile("xxx" ,yyy)
##########################################Code: Select all
tmpYarn = Textile.GetYarn(0) # first yarn
sec = tmpYarn.GetYarnSection()
#then I think the info I'm looking for is in
sec = tmpYarn.GetYarnSection(XXXXX)but I don't know on which format YARN_POSITION_INFORMATION is?const YARN_POSITION_INFORMATION PositionInfo,
int iNumPoints,
bool bEquiSpaced = false
Can anybody help me?
Regards
Fredrik