Hello,
I'm trying to create a geometry and rotate is by 45 degrees. When I rotate the model (only the textile), I see that in the TexGen output window it displays "Couldn't mesh closed loop on domain edge". And when I try to produce a volume mesh it doesn't produce one. Can you please help me with this. I have the code attached below.
# Create a textile
Textile = CTextile()
wl= 6.0
width=2.6
x=(wl-2*width)/4
#x=0.15
d=5.5e-3
N=2000
n=0.4
p =wl/4 #A quarter of the weave length
a = 0.014275 #amplitude
c = 0.18 #Middle nodes
h = 0.012
ys=2*x+(wl-4*x)/2
hf=0
R=80
#Yarn 1
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p+hf, p+hf, a)))
yarn.AddNode(CNode(XYZ(-c+hf, p+hf, h)))
yarn.AddNode(CNode(XYZ(c+hf, p+hf, -h)))
yarn.AddNode(CNode(XYZ(p+hf, p+hf, -a)))
yarn.AddNode(CNode(XYZ(2*p-c+hf, p+hf, -h)))
yarn.AddNode(CNode(XYZ(2*p+c+hf, p+hf, h)))
yarn.AddNode(CNode(XYZ(3*p+hf, p+hf, a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))
yarn.AddRepeat(XYZ(0, wl, 0))
Textile.AddYarn(yarn)
#Yarn2
yarn=CYarn()
yarn.AddNode(CNode(XYZ(-p+hf, 3*p+hf, -a)))
yarn.AddNode(CNode(XYZ(-c+hf, 3*p+hf, -h)))
yarn.AddNode(CNode(XYZ(c+hf, 3*p+hf, h)))
yarn.AddNode(CNode(XYZ(p+hf, 3*p+hf, a)))
yarn.AddNode(CNode(XYZ(2*p-c+hf, 3*p+hf, h)))
yarn.AddNode(CNode(XYZ(2*p+c+hf, 3*p+hf, -h)))
yarn.AddNode(CNode(XYZ(3*p+hf, 3*p+hf, -a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ(wl, 0, 0))
yarn.AddRepeat(XYZ(0, wl, 0))
Textile.AddYarn(yarn)
#Yarn3
yarn=CYarn()
yarn.AddNode(CNode(XYZ(p+hf, -p+hf, -a)))
yarn.AddNode(CNode(XYZ(p+hf, -c+hf, -h)))
yarn.AddNode(CNode(XYZ(p+hf, c+hf, h)))
yarn.AddNode(CNode(XYZ(p+hf, p+hf, a)))
yarn.AddNode(CNode(XYZ(p+hf, 2*p-c+hf, h)))
yarn.AddNode(CNode(XYZ(p+hf, 2*p+c+hf, -h)))
yarn.AddNode(CNode(XYZ(p+hf,3*p+hf, -a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
yarn.AddRepeat(XYZ(wl, 0, 0))
Textile.AddYarn(yarn)
#Yarn4
yarn=CYarn()
yarn.AddNode(CNode(XYZ(3*p+hf, -p+hf, a)))
yarn.AddNode(CNode(XYZ(3*p+hf, -c+hf, h)))
yarn.AddNode(CNode(XYZ(3*p+hf, c+hf, -h)))
yarn.AddNode(CNode(XYZ(3*p+hf, p+hf, -a)))
yarn.AddNode(CNode(XYZ(3*p+hf, 2*p-c+hf, -h)))
yarn.AddNode(CNode(XYZ(3*p+hf, 2*p+c+hf, h)))
yarn.AddNode(CNode(XYZ(3*p+hf,3*p+hf, a)))
yarn.AssignInterpolation(CInterpolationBezier())
yarn.AssignSection(CYarnSectionConstant(CSectionPowerEllipse((wl-4*x)/2 , 2*a, n, 0)))
yarn.SetResolution(R)
yarn.AddRepeat(XYZ( 0, wl, 0))
yarn.AddRepeat(XYZ(wl, 0, 0))
Textile.AddYarn(yarn)
Textile.AssignDomain(CDomainPlanes(XYZ(0.0, 0.0, -2*a), XYZ(8.485, 8.485, 2*a)))
AddTextile("Singleply45", Textile)
Couldn't mesh closed loop on domain edge
Moderators: Martin, Developers
Re: Couldn't mesh closed loop on domain edge
Hi,
I'm not sure what is happening here. I suspect that it's something to do with the fact that they are such thin yarns.
I will investigate when I get the chance and get back to you.
Best wishes,
Louise
I'm not sure what is happening here. I suspect that it's something to do with the fact that they are such thin yarns.
I will investigate when I get the chance and get back to you.
Best wishes,
Louise
Re: Couldn't mesh closed loop on domain edge
Hi,
I've taken a look at this and the reason you're getting the "Couldn't mesh closed loop on domain edge" errors is because the domain slices through the yarns on the top and bottom surfaces. If you do the X-ray rendering you will be able to see this.
I changed the position of the domain to + and - 0.035 (a random guess at something which wouldn't cut off the yarns). The Volume Mesh export then works fine. I haven't got as far as working out exactly why the export fails when top/bottom surface of the yarn is cut off but hopefully this will give you a workaround in the meantime.
If you need the domain to be the specified size then you maybe need to change the yarn cross-sections so that they fit into the domain.
Hope that helps,
Louise
I've taken a look at this and the reason you're getting the "Couldn't mesh closed loop on domain edge" errors is because the domain slices through the yarns on the top and bottom surfaces. If you do the X-ray rendering you will be able to see this.
I changed the position of the domain to + and - 0.035 (a random guess at something which wouldn't cut off the yarns). The Volume Mesh export then works fine. I haven't got as far as working out exactly why the export fails when top/bottom surface of the yarn is cut off but hopefully this will give you a workaround in the meantime.
If you need the domain to be the specified size then you maybe need to change the yarn cross-sections so that they fit into the domain.
Hope that helps,
Louise
Re: Couldn't mesh closed loop on domain edge
Hi,
Thank you very much. It should be a good enough fix for now!
Thank you very much. It should be a good enough fix for now!