Member Avatar for shAq

I am writing a 3D graphics program to read and display *.stl files. These are stereo lithography files generated by 3DMax. Any idea how to do that?

This file format consists of data as in following format:
*********************************************
solid Object01
facet normal -9.999635e-001 -7.604078e-008 -8.545205e-003
outer loop
vertex 1.033284e+001 2.616666e+002 1.262733e+002
vertex 1.018371e+001 3.096116e+002 1.437232e+002
vertex 1.033283e+001 3.126886e+002 1.262733e+002
endloop
endfacet
facet normal -9.999635e-001 -9.204930e-008 -8.545161e-003
outer loop
vertex 1.03328....
**********************************************
1>What data type do i read the coordinate values into?
I have tried the floating point data type but it gives a floating point format not linked error. (I tried to read the values into a structure POINT with 3 floating point variables to store x,y and z values.)

2>How do i convert the coordinate values to those that could be outputted by the

>but it gives a floating point format not linked error.
Wow, I haven't seen that error in a long time. It used to be a frequently asked question, maybe you should get a newer compiler.

>How do i convert the coordinate values to those that could be outputted by the
Don't click on "Submit Reply" until you've finished typing your post. :rolleyes: By the way, you can edit this post, so don't create another post or another thread, please.

Member Avatar for shAq

Where's the edit/modify button?
It does not show up in my first post. But it is present in this post.

What I wanted to know was how to convert the coordinates to those that could be displayed by the C++ graphics library.

I use Turbo C++ v3.0. Which new compiler has similar graphics library?

>It does not show up in my first post. But it is present in this post.
You only have a short time to edit your post.

>I use Turbo C++ v3.0.
Yes, I know.

>Which new compiler has similar graphics library?
Hmm, how about getting a modern compiler and learning a modern graphics library? Seriously, you'll find that computers are more cooperative if you get with the times.

hello,
i am doing a project on representation of combustion chamber geometry in GT Power for which i have to use a C program which can read .stl files. I am not good at C programming, so can you please help me out with this. Or maybe give me the C program that you were writing. I would be grateful to you.
Thank You

I am writing a 3D graphics program to read and display *.stl files. These are stereo lithography files generated by 3DMax. Any idea how to do that?

This file format consists of data as in following format:
*********************************************
solid Object01
facet normal -9.999635e-001 -7.604078e-008 -8.545205e-003
outer loop
vertex 1.033284e+001 2.616666e+002 1.262733e+002
vertex 1.018371e+001 3.096116e+002 1.437232e+002
vertex 1.033283e+001 3.126886e+002 1.262733e+002
endloop
endfacet
facet normal -9.999635e-001 -9.204930e-008 -8.545161e-003
outer loop
vertex 1.03328....
**********************************************
1>What data type do i read the coordinate values into?
I have tried the floating point data type but it gives a floating point format not linked error. (I tried to read the values into a structure POINT with 3 floating point variables to store x,y and z values.)

2>How do i convert the coordinate values to those that could be outputted by the

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.