# LabVIEW

cancel
Showing results for
Did you mean:

Solved!
Go to solution

## Re: 3D Object - Draw Cylinder from array data

@əʞɐſ wrote:

Awesome, it looks like you have made good progress. What did you learn when you did your "fancy footwork" to make you triangles work? I'd be curious to see if I can get to the point where I can turn any model into something that has correct normals that I can display.

Basically I look at every data point per slice and pair it with the corresponding points in the next slice up (think like you were 3D printing).

I am not sure how this would work if points did not line up exactly with the layer above it.

A few post above this one I sort of explained the logic behind creating the triangle strips. Essentially you create a point cloud where you use each point multiple times to create the individual triangles. I did this by stepping through the current layer (A) and the next layer (B) and taking point Ai, Ai+1, Bi to make the first triangle then points Ai+1, Bi, Bi+1 to make the second triangle. I then follow that pattern for the entire layer and rinse and repeat for number of layers -1.

Message 21 of 27
(696 Views)

## Re: 3D Object - Draw Cylinder from array data

Just to let you know that you can use the Haro3D library (free from NI Tools Network) to upload .stl models and have the normals automatically calculated. You can also upload .obj models with texture (as shown below).

Marc Dubois
Message 22 of 27
(681 Views)

## Re: 3D Object - Draw Cylinder from array data

@MarcDub wrote:

Just to let you know that you can use the Haro3D library (free from NI Tools Network) to upload .stl models and have the normals automatically calculated. You can also upload .obj models with texture (as shown below).

.stl models have the normal information stored in them.

```facet normal ni nj nk
outer loop
vertex v1x v1y v1z
vertex v2x v2y v2z
vertex v3x v3y v3z
endloop
endfacet```

Do you mean that the Haro3D library could take a .stl file with no normal data (i.e. 0, 0, 0) and return the actual normal values?

Message 23 of 27
(671 Views)

## Re: 3D Object - Draw Cylinder from array data

Yes, the Mesh_Read function has an input to recalculate or not the normals.

When Recalculate normals is true:

When it is false:

Marc Dubois
Message 24 of 27
(661 Views)

## Re: 3D Object - Draw Cylinder from array data

Dear Marc!

Does it exist your Haro 3D Library for LV2016 ?

Message 25 of 27
(415 Views)

## Re: 3D Object - Draw Cylinder from array data

@Curr93 wrote:

Dear Marc!

Does it exist your Haro 3D Library for LV2016 ?

The Haro3D library is compatible with LabVIEW 2016 and later.

Marc Dubois
Message 26 of 27
(409 Views)

## Re: 3D Object - Draw Cylinder from array data

Dear Marc

Thank you very much for sharing your knowledge, I have old VIPM version.

Message 27 of 27
(397 Views)