10-19-2017 05:45 AM
hi there
i want to use the vertex array of a 3d picture ( like box or cone in LabVIEW which as scene object), but an error 1057 is occurred in (to more specific class). please help
10-19-2017 06:10 AM
@ssara wrote:
hi there
i want to use the vertex array of a 3d picture ( like box or cone in LabVIEW which as scene object), but an error 1057 is occurred in (to more specific class). please help
A SceneBox object is not a SceneMesh class, so casting it will fail. You can cast the drawable to a SceneGeometry class, or a SceneBox class, but the only useful properties are X, Y and Z Length. If you want vertices of a box, you're on your own.
10-19-2017 06:27 AM
wiebe@CARYA wrote:
A SceneBox object is not a SceneMesh class, so casting it will fail. You can cast the drawable to a SceneGeometry class, or a SceneBox class, but the only useful properties are X, Y and Z Length. If you want vertices of a box, you're on your own.
but these values are the length of the box not the vertices !
any method to convert it or create the box or cone vertices??
10-19-2017 06:47 AM
I'm afraid you'll have to do the math yourself. There just don't seem to be a way to get it from the objects. Underlying reason is probably that the engine is build around\over OpenGL, that support these box, cylinder, sphere (teapot) functions, and they're not meshes but build in objects. Nice if you want a box, cylinder or teapot, not so nice if you want the vertices...
10-19-2017 07:25 AM
i found the (using meshes.vi) example in the help examples , there is a create mesh.vi in the geometries toolkit.
is it useful in this issue or not??
10-19-2017 07:37 AM
Guess if you can get it to create a box\cube, it would get you vertices of it's mesh.
10-19-2017 07:59 AM
but i dont know how can i use this vi.
surely there is a method to convert the scene object and extract its vertices than build it again from primitives.
any help please
10-19-2017 08:26 AM
@ssara wrote:
but i dont know how can i use this vi.
I don't know that VI and don't have that library. So can't help you with that.
ssara wrote:surely there is a method to convert the scene object and extract its vertices than build it again from primitives.
Well, the scene graph is made for drawing 3D stuff. I agree it would be convenient in some cases to get this information, but it surpasses the intended (limited) purpose of the library.
The rational behind this is: you tell me to draw an object, so you must already know everything you know about it. This leads to the ironic situation that if you set the vertices, you can get them although there is no need. If you don't set them you can get them even if you want to...
So building a box from a mesh would solve the problem.