3D to 2D.

General discussion about TexGen.

Moderators: Martin, Developers

Post Reply
UOMO
Regular
Posts: 45
Joined: Tue Feb 24, 2015 10:02 am

3D to 2D.

Post by UOMO »

Dear all/Louise,

I am using a textile model where I typically generate a mesh based on 10-node tetrahedra (3D).
I am wondering if it is likely to select a given plane, and then generate a 2D mesh instead o triangles?
Is there a certain class already that could help me for this purpose?.

See a Figure attached.

Thank you.
Attachments
FigureExtract2D.jpg
FigureExtract2D.jpg (64.04 KiB) Viewed 8405 times
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: 3D to 2D.

Post by louisepb »

Hi,

There isn't anything which will do this exactly. The closest that I can think of is in the tetgen export where (in SaveTetgenMesh) where it calls textile.AddSurfaceToMesh(mesh, DomainMeshes, true) which returns a mesh for each face of the domain containing a quad element for the outside edges and a series of polygons for however many yarns are cut by the domain (you could set the domain to cut through the plane you're interested in).
It then uses these points and calls Triangulate to generate the triangular mesh. If you look at the code in TetgeGenMesh.cpp you can see how it does this.

Sorry not to have a straightforward answer but this is the closest that I can think of at the moment. Let me know if you have any questions about this.
Best wishes,
Louise
UOMO
Regular
Posts: 45
Joined: Tue Feb 24, 2015 10:02 am

Re: 3D to 2D.

Post by UOMO »

louisepb wrote:Hi,

There isn't anything which will do this exactly. The closest that I can think of is in the tetgen export where (in SaveTetgenMesh) where it calls textile.AddSurfaceToMesh(mesh, DomainMeshes, true) which returns a mesh for each face of the domain containing a quad element for the outside edges and a series of polygons for however many yarns are cut by the domain (you could set the domain to cut through the plane you're interested in).
It then uses these points and calls Triangulate to generate the triangular mesh. If you look at the code in TetgeGenMesh.cpp you can see how it does this.

Sorry not to have a straightforward answer but this is the closest that I can think of at the moment. Let me know if you have any questions about this.
Best wishes,
Louise

Sorry for the late reply. Thank you! I have almost fixed it using Matlab. But I will look into the procedure that you suggest.
Best,
/UOMO.
Josephgarcia
Posts: 2
Joined: Thu Feb 14, 2019 7:20 am
Location: TX, USA
Contact:

Re: 3D to 2D.

Post by Josephgarcia »

Dear,

Would you please upload your final attachment. I read your post and i have some interest about your experiment. If you have no problem please upload the final one.

I'm eagerly waiting for it.

Best Regards,

Joseph
louisepb
Project Leader
Posts: 998
Joined: Tue Dec 08, 2009 2:27 pm
Location: Nottingham

Re: 3D to 2D.

Post by louisepb »

Hi Joseph,

I didn't hear any more about whether Uomo was successful in creating the triangular mesh of the surface but I think that this is still my best suggestion about how to achieve this.

Best regards,
Louise
Josephgarcia
Posts: 2
Joined: Thu Feb 14, 2019 7:20 am
Location: TX, USA
Contact:

Re: 3D to 2D.

Post by Josephgarcia »

Ohh thanks dear. Got it :D
Post Reply