Hi ,
I have a problem, I draw the following figure using the mesh. But occasionally, the shape is inadvertently depicted. If it is possible to tell me where is my problem.
thanks.
this is my code :
Hi mostafa can you give us the complete source code in a zip please. I think the problem is that you calcul the normal for each face, it will be better in this case to calculate the normal of each vertex instead.
Like i see the faces are quad (2 triangles) so each quad face have 2 triangles with 2 shared vertex.
So i think try to create 2 triangles for represented a quad at each iteration instead of one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Jerome.D ,
Thank you very much for your answer.
My idea is to create mesh objects from Nastran's output files (.nas).
The structure of the triangles is based on Nastran files.Usually, after several Importing and creating mesh objects, this problem occurs and there is no definite time.Thanks if you checked the attached file. There is also an example of Nastran file for importing.
Hi mostafa i've juste compiled your project under Delphi CE in 64 bits and import your NAS file All is ok see the screenshot. Do you use the last GLScene v1.7 or perhaps you need to update your graphic driver
Hi Jerome,
Thank you very much.
I'm using version 1.5.
Sometimes it's just right, but it's often the same problem. I'm wondering why I'm just having trouble viewing NAS files. Is there a problem with my code or because there are no normal vectors in the NAS file? However, I'm making normal vectors using Mesh[j].BuildNormals(IntegerList, momTriangles);.
Last edit: Mostafa 2018-11-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi ,
I have a problem, I draw the following figure using the mesh. But occasionally, the shape is inadvertently depicted. If it is possible to tell me where is my problem.
thanks.
this is my code :
Last edit: Mostafa 2018-11-04
Hi mostafa can you give us the complete source code in a zip please. I think the problem is that you calcul the normal for each face, it will be better in this case to calculate the normal of each vertex instead.
Like i see the faces are quad (2 triangles) so each quad face have 2 triangles with 2 shared vertex.
So i think try to create 2 triangles for represented a quad at each iteration instead of one.
Hi Jerome.D ,
Thank you very much for your answer.
My idea is to create mesh objects from Nastran's output files (.nas).
The structure of the triangles is based on Nastran files.Usually, after several Importing and creating mesh objects, this problem occurs and there is no definite time.Thanks if you checked the attached file. There is also an example of Nastran file for importing.
Hi mostafa i've juste compiled your project under Delphi CE in 64 bits and import your NAS file All is ok see the screenshot. Do you use the last GLScene v1.7 or perhaps you need to update your graphic driver
Last edit: Jerome.D (BeanzMaster) 2018-11-06
Hi Jerome,
Thank you very much.
I'm using version 1.5.
Sometimes it's just right, but it's often the same problem. I'm wondering why I'm just having trouble viewing NAS files. Is there a problem with my code or because there are no normal vectors in the NAS file? However, I'm making normal vectors using Mesh[j].BuildNormals(IntegerList, momTriangles);.
Last edit: Mostafa 2018-11-07