I have another question here regarding above matter. I'm trying to generate the geometry via python scripts and I had followed some steps that you have published before. However, there are some errors in my code and I'm hoping you could help me. Below is the sample of my code that I'd written and the error messages that I received.
# Create a 12x12 weave with yarn spacing of 1 and thickness of 0.36
m = 12
n = 12
t = 0.36
sp = 1
weave = CTextileWeave2D(m, n, sp, t, 1, False)
weave.SetGapSize(0)
# Define some parameters
# Width of the weft yarns is less than the weft spacing
weftyarnwidth = 0.8
# Width of the warp yarns set equal to the warp spacing
warpyarnwidth = 0.8
# Yarn height equal to the vertical distance between yarns at cross overs
yarnheight = t/2
# Set the weave pattern
weave.SwapPosition(0, 3)
weave.SwapPosition(0, 1, 2)
weave.SwapPosition(0, 1, 1, 1)
weave.SwapPosition(1, 1, 1)
weave.SwapPosition(2, 1)
weave.SwapPosition(3, 0)
weave.SwapPosition(9, 0)
weave.SwapPosition(8, 0)
weave.SwapPosition(7, 1, 1)
weave.SwapPosition(6, 1, 1, 1)
weave.SwapPosition(6, 1, 2)
weave.SwapPosition(6, 3)
# Adjust the yarn widths and heights
weave.SetYarnWidths(warpyarnwidth)
weave.SetYarnHeights(yarnheight)
weave.SetXYarnWidths(0, 0.
weave.SetXYarnHeights(0, t/2)
weave.SetXYarnSpacings(0, sp)
weave.SetYYarnWidths(0, 0.
weave.SetYYarnHeights(0, t/4)
weave.SetYYarnSpacings(0, sp)
# Assign the domain and get its limits
weave.AssignDefaultDomain()
Domain = weave.GetDefaultDomain()
Min = XYZ()
Max = XYZ()
Domain.GetBoxLimits( Min, Max )
#Add the textile with the name "TextileNo"
AddTextile("TextileNo", Textile)
#Saving the geometry
SaveToXML("TextileNo.tg3")
error messages: Traceback (most recent call last):
File "gui", line 1, in <module>
File "C:\Users\Public\Documents\YANIE\ABAQUSTexGen\MembraneAlgorithm\MembraneProject\TexGen\FibreVolumeFractionLamina\optislang\geometry.py", line 19, in <module>
weave.SwapPosition(0, 1, 2)
File ".\Python\libxtra\TexGen\Core.py", line 2490, in SwapPosition
TypeError: CTextileWeave2D_SwapPosition() takes exactly 3 arguments (4 given)
What had happened actually?
Yanie