3

Anybody have some experience with the graphical languages which is primarily designed for drawing? My question is about an alternative to AutoCAD and/or similar drawing software in terms of writing code to create the drawing. I couldn't find any of those types of languages if exists, primarily designed for as programming engineering drawings.

For example: I want to be able to create cylinders, rectangle, circles etc given the size and want to be able to manipulate those with adding, subtracting, extruding and so on...Also some annotation features would be great.

Update: As far as I have made my research, I think creating some engineering-drawing library atop of blender (which is itself a nice animating tool) might be great. Does somebody knows of anything that is in progress or already exists in this field?

2

2 Answers 2

2

The LaTeX world has long history of attempts to express line art diagrams in the document source code. The current favourite seems to be TikZ.

However, it falls somewhat short of providing full CSG (Constructive Solid Geometry) support.

If you do want 3D and CSG, POV-Ray lets you create objects and scenes by editing good old text-file sources (reference, examples). But on the other hand, POV-Ray won't generate engineering-style line drawings so far as I know.

With regard to your updated question: be aware that Blender already has a very nice Python API (and the ability to get a Python shell in the app) which lets you get at virtually all the Blender state and is probably the easiest way to implement extension plugins for procedural modelling, applying effects and import/export to other formats. Maybe it would work for "drawings" too. Whether it's useful also depends how important you regard the Java aspect; I'm not aware of a Java API but I have written C++ apps which exported models in the form of python code to be executed by Blender.

1

I'm not aware of anything that most people would recognise as a programming language which was primarily designed for CAD and similar applications. I would hazard a guess that most of the well known CAD packages (commercial and open-source) are written in Fortran, C or C++. sure, they may use something else for GUIs and such like, but the hard-core comp-geom stuff is going to be in a classic, compiled-for-speed, programming language.

There are languages (eg LOGO) which provide native support for drawing operations, but I'm not aware that any of these have been successfully used in published CAD systems.

It is not, though, a coincidence that many introductory texts on object-oriented programming take their examples from the domain of drawings and shapes -- you know, a Shape is the super-type of a Circle and of a Rectangle and of a Polygon; all of them implement the Draw method, and so on. The rise of OO is intimately tied up with the rise of graphical programs.

Finally, you might be interested in Processing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.