2D CAD examples?

Good evening,

I’m trying to do a simple 2D CAD, with draggable blocks and arrows and the such. I know C++, but I’m starting with OpenGL.
Anyone know where I can find examples, demos, tuts, or anything for a CAD like this?

Thanks in advance.

I don’t know of any tutorials that teach you how to write a 2D CAD or any other application as well. You do that by learning the various elements that go into an application.

For 2D, you would use a orthographic projection.

What kind of CAD applications?

Mainly you need an editable scene graph system that allows for selection and event processing for objects, something much like in GUI tool kit widgets…

As for selection, I recommend using a ray-intersection selection test. Orthographic views are mainly for 2D editing.

I would recommend using something like Ogre3D since it has a scene manager built-in. And you can still use OpenGL as a rendering API.