Qt-interest Archive, October 2007
[OT] OpenGL Model creation question
Message 1 in thread
I'm completely new to OpenGL, but I'd like to take an existing 3D CAD
object (created by SolidWorks) and put it into a Qt program. Does
anyone have any pointers on how to do something like this? Basically
I'm wondering if there is any sort of tool that would convert an
existing 3D CAD model into the appropriate C++ OpenGL commands to render
that object on an OpenGL scene.
Sorry for the off-topic post, I dug around a little on Google, but I'm
so new to OpenGL, that I don't think I'm even putting in the correct
terms to get what I'm looking for (or it really doesn't even exist).
Sean
--
[ signature omitted ]
Message 2 in thread
Murphy, Sean M. wrote:
> I'm completely new to OpenGL, but I'd like to take an existing 3D CAD
> object (created by SolidWorks) and put it into a Qt program. Does
> anyone have any pointers on how to do something like this? Basically
> I'm wondering if there is any sort of tool that would convert an
> existing 3D CAD model into the appropriate C++ OpenGL commands to render
> that object on an OpenGL scene.
>
> Sorry for the off-topic post, I dug around a little on Google, but I'm
> so new to OpenGL, that I don't think I'm even putting in the correct
> terms to get what I'm looking for (or it really doesn't even exist).
>
> Sean
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
>
you can look at http://artis.imag.fr/Software/QGLViewer/
--
[ signature omitted ]
Message 3 in thread
> > I'm wondering if there is any sort of tool that would convert an
> > existing 3D CAD model into the appropriate C++ OpenGL commands to
> > render that object on an OpenGL scene.
>
> you can look at http://artis.imag.fr/Software/QGLViewer/
Ok, I took a look at this link, and I think this might sort of be the
opposite of what I'm looking for. On the page:
http://artis.imag.fr/Software/QGLViewer/introduction.html under the
section "The QGLViewer class" there is this:
void Viewer::draw()
{
// Your OpenGL 3D code goes here.
// It consists in geometry description using glBegin() ... glEnd()
blocks.
// Camera's GL_MODELVIEW and GL_PROJECTION matrices are handled by the
QGLViewer.
}
What I'm looking for is a tool that writes this draw() function (all the
glVertex3d() calls between the glBegin() and glEnd() calls) for me based
on an existing 3D CAD drawing.
Sean
--
[ signature omitted ]
Message 4 in thread
You might have a look at openscenegraph, and convert your solidworks
model to a format supported by openscenegraph. (they have a text based
one, maybe a python filter to convert from STL to their format).
On 10/30/07, Murphy, Sean M. <sean.murphy@xxxxxxxxxx> wrote:
> > > I'm wondering if there is any sort of tool that would convert an
> > > existing 3D CAD model into the appropriate C++ OpenGL commands to
> > > render that object on an OpenGL scene.
> >
> > you can look at http://artis.imag.fr/Software/QGLViewer/
>
> Ok, I took a look at this link, and I think this might sort of be the
> opposite of what I'm looking for. On the page:
> http://artis.imag.fr/Software/QGLViewer/introduction.html under the
> section "The QGLViewer class" there is this:
>
> void Viewer::draw()
> {
> // Your OpenGL 3D code goes here.
> // It consists in geometry description using glBegin() ... glEnd()
> blocks.
> // Camera's GL_MODELVIEW and GL_PROJECTION matrices are handled by the
> QGLViewer.
> }
>
> What I'm looking for is a tool that writes this draw() function (all the
> glVertex3d() calls between the glBegin() and glEnd() calls) for me based
> on an existing 3D CAD drawing.
>
> Sean
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
>
>
--
[ signature omitted ]
Message 5 in thread
Murphy, Sean M. wrote:
> I'm completely new to OpenGL, but I'd like to take an existing 3D CAD
> object (created by SolidWorks) and put it into a Qt program. Does
> anyone have any pointers on how to do something like this? Basically
> I'm wondering if there is any sort of tool that would convert an
> existing 3D CAD model into the appropriate C++ OpenGL commands to render
> that object on an OpenGL scene.
>
> Sorry for the off-topic post, I dug around a little on Google, but I'm
> so new to OpenGL, that I don't think I'm even putting in the correct
> terms to get what I'm looking for (or it really doesn't even exist).
>
> Sean
>
>
By putting it "into a Qt program," do you mean being able to manipulate
it in 3D? (pan, zoom rotate) or something else?
If this is what you want to do, you will have to (1) write the Qt
program to do your manipulations and (2) convert your geometry model
into something your Qt program can read. Most CAD programs can export
to BYU or STL formats, and these would be the easiest to use.
Of course, (1) is far more difficult and time-consuming that (2). My
attempts at (2) may be found at
http://www.gemacs.com/cem/modules/smartview.php
Buddy Coffey
Applied Research Associates, Inc.
Computational and Applied Electromagnetics
--
[ signature omitted ]
Message 6 in thread
> By putting it "into a Qt program," do you mean being able to
> manipulate it in 3D? (pan, zoom rotate) or something else?
Yes exactly. A better explanation of what I'm trying to do is I'm
trying to create an accurate 3D representation of a real world object
(an airplane) on a QGLWidget. My organization has already done the work
of creating a 3D CAD drawing of the airplane, so someone else has
already done the work of converting a ton of real world measurements
into elements that build up the model of the airplane. I'm looking to
avoid having to duplicate the tedious job of taking all those real world
measurements and converting them into a bunch of OpenGL calls to create
the airplane model in an OpenGL context.
> If this is what you want to do, you will have to (1) write
> the Qt program to do your manipulations and (2) convert your
> geometry model into something your Qt program can read. Most
> CAD programs can export to BYU or STL formats, and these
> would be the easiest to use.
>
> Of course, (1) is far more difficult and time-consuming that
> (2). My attempts at (2) may be found at
> http://www.gemacs.com/cem/modules/smartview.php
I totally get that I'll have to do 1) on my own, I'm trying to
understand how I get the GL model to start with. Basically I was
looking at the Hello GL example
(http://doc.trolltech.com/4.3/opengl-hellogl.html) and saw in
glwidget.cpp file there was a function called makeObject() that contains
a bunch of OpenGL calls just to create a simple 3D model out of our
beloved Qt symbol. Since I'm dealing with an airplane, there are a lot
more calls that I would have to do to create an airplane by hand, and
since someone else here has an accurate 3D model of the airplane, I'm
looking for some tool that would create the makeObject() function for
me. After that it's still up to me to do everything else, but at least
at that point I'd have an accurate model.
I'll look into BYU and STL formats, those acronyms mean nothing to me at
this point, unless they refer to Brigham Young University and Standard
Template Library!
Sean
--
[ signature omitted ]