Thursday, November 29, 2007

Creating VRML with point cloud

The new functionality was added to the OFF to VRML file converter I developed. Now it has an option to create, in the VRML file, a point cloud of the model instead of the traditional mesh. Below is an example of such output.

Point cloud for a 3D model with vertices colored according to its order

Wednesday, November 28, 2007

Converting OFF to VRML (and more)

I developed in C++ a small tool that converts 3D models stored in OFF files to VRML files. Besides this simple task, I add a couple of functionalities, such as computing the bounding box of the shape and coloring the vertices according to it's order in the vertex list (just for fun).

The original model from the OFF file, without any processing

The VRML model with the bounding box and the colored vertices

A screenshot of the application output

Tuesday, November 27, 2007

It was just a 'void' !!!

When I compiled a small application I wrote in C++ in Release Mode, the resulting 'exe' file crashed unexpectedly. Indeed the same code compiled in Debug Mode works fine. Initially I thought that it must be due to some failures in variables initialization, but no. When coding, I am usually very careful with that details.

I spent the whole afternoon trying to solve the problem. After a while I had already located the problem. The error occurs when accessing a list. Then I just had to figure out what I did wrong and solve it. But this apparently simple task was indeed a hard challenge. Finally, when I discovered the problem I was astonished by how strange it was.

I am using a list of pointers to instances of a class I defined. However, when I created the class, it was like this:

class MyClass : public {

Here, the class constructor does not have any parameters. It works perfectly fine in Debug Mode but it generates an error in Release Mode when using a list of pointers to this class. The solution was simple. I just have to change the constructor as depicted below.

class MyClass : public {

Damn! So much time lost because of a simple 'void'. Damn!

Tuesday, November 13, 2007

QiQA Demonstration Video

Last week we created a short video to be shown in the "3as Jornadas de Inovação", an exposition organized by ADI. In this video we illustrate the main features of Quick Quotation Assistant (QiQA), a prototype developed within workpackage WP 5.1: Part and Tool Design of the Eurotooling 21 project.

Monday, November 05, 2007

Compiling C++ on MS VS without IDE

Although many people ignore this functionality, it is possible to use the Microsoft Visual Studio .NET without opening the IDE. Indeed, many tasks can be made from the command line, thus providing a way to improve the scripting capabilities of this tool. For instance, to compile a project from the command line, only two steps are necessary:

  1. Set the environment variables (eventually they can be already set)

    Run "VCvars32.bat" (in .NET2003)

  2. Compile the project

    Call $ DevEnv project_name /Build configuration_name
With these functionalities, some scripting skills and using the task scheduler, complex tasks can be easily automated.