View Full Version : Primitive command line CAD?

03-01-2007, 09:13 AM

I'm sorry if this is the wrong section (or wrong forum!) for this question, but I can't think of anywhere more appropriate. I'm in a bit of a quandary. Using Mediachance Multimedia Builder, I've made a program for helping the user to plan out a project. The project could be pretty much anything, but it will always have different kinds of elements that the user arranges, deletes, renames, creates, interconnects, etc.

Anyway, this program was completed a week ago. Since then, it occurred to me it'd be great to add a new section to the program where the user could see their project as a 3D arrangement. All the planning they've done in the program would be translated into a primitive 3D "mindmap" - nice and retro.

Now I know exactly how I want the translation to be done, and I know exactly how I want the 3D result to look. The problem is, I have no idea how to achieve it. I would appreciate any advice from the people around here on how to do it.

What I want is a simple black background, and the elements of the user's project shown as primitive 3D shapes - a cube, a cone, a sphere and so on. And we're talking VERY primitive, like this:


I want the 3D presentation to be binded into the MMB app - a window within the window. I know for a fact this is possible and that MMB can send instructions to a binded app.

The user should be able to add new elements (shapes) during runtime and to change the colours of shapes, using buttons and dialogues in the host app. They should also be able to click on any shape and the app would send an instruction to the MMB app ("shape clicked: cube16), which would display the details of the project element that the shape represents.

It seems there are two options here.

a) I find an executable that already exists for this task. It would be controllable from the command line, and my program would feed instructions to it: "create x number of spheres, position sphere 1 here, sphere 2 here, colour sphere 6 rgb(128,0,92)" etc. Unfortunately I've been scouring the net for the last few days and haven't found anything.

b) I code such a program myself.

The latter option would require me to learn a new programming language. Since I know a little BASIC, I've experimented with making such a program using DarkBASIC, but when I embed it the program takes about five seconds to load up! And it's a huge file - 6mb for just 10 lines of code.

Now, if necessary, I'm happy to learn a new program - preferably BASIC - but does anyone know of an existing software utility that does what I want already? Secondly, if you think I'd be better creating the program myself, can you recommend a program to code it in?

Here are the requirements:

1. The app must be able to generate an infinite number of primitive 3D shapes, during runtime.
2. The app is almost 100% controlled from the host app.
3. The app can send information to the host app (shape clicked / mouse dragged to xyz pos / shape's xyz pos / etc.)
4. The app can compute distance+angle between two shapes for creating a link between them (the grey line in the image above)
5. Ideally, the app can take camera instructions from the host app, so that the user can move around their 3D plan.

Finally, if you can think of a better forum for me to ask this question in, please let me know as I don't like treading on people's toes. Once again, I apologise if this is the wrong place but I'm at a loss here.

Thanks in advance for any help,

03-01-2007, 07:13 PM
Have you done searches for "visualization" software?

03-01-2007, 10:06 PM
You probably won't find something that does exactly what you want, so you'll be coding it.

Two suggestions:

a) FXRuby (ie. ruby + fox toolkit). One of its demos does (opengl demo) about 80% of what you want already.

b) If you want something faster and sticking with basic, I highly recommend BlitzMax (it is commercial, but pretty cheap). It is probably one of the fastest and oldest basics you can use (and, unlike most other basic options, it is multiplatform).

03-03-2007, 12:23 AM
You might also want to look at vpython which gives a simple interface for creating interactive 3d geometry:


I haven't used it myself, but it looks like it could be programmed to do what you want.


CGTalk Moderation
03-03-2007, 12:23 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.