silikonken.blogg.se

Getting started with brl cad
Getting started with brl cad













  1. #GETTING STARTED WITH BRL CAD HOW TO#
  2. #GETTING STARTED WITH BRL CAD PATCH#

What happened is that, after I started writing the tests, I was not even halfway through and I realized that I needed to understand what exactly does this Pipe primitive look like and what are the parameters that govern it’s making.

#GETTING STARTED WITH BRL CAD PATCH#

So I was trying to write some tests for the Pipe implementation done by Andrei Popescu, after applying a patch submitted by Andrei Ilinca. I’m enjoying this work and hoping to see more of challenges with time.

getting started with brl cad

As this was happening, it was not possible to free it right away. Here is how I handled it :īu_free(itr, "Pipe::DeleteControlPoint::itr") This was coming up because the wdb_pipept pointer that was being used to traverse the pipe segment list was always getting modified due to the routine. Wait a minute, there was one more error still popping up : invalid pointer in free(). Size of list growing after each iteration the elements being inserted were also correct. I tried to understand my error messages and after thinking and searching for reasons, finally came to a conclusion : The destination list entries were not being allocated memory before being inserted into the list and hence the pointers were getting messed up after the first iteration. Moral : Learn to interpret such error messages, because we can’t afford to be perfect all the time. Be a little careless and you screen will be all littered with huge error messages. Now, as we were dealing with pointers, memory management (allocation and freeing) becomes very crucial.

#GETTING STARTED WITH BRL CAD HOW TO#

I have learnt how to Google things and I thought that should help right now. I tried printing the list size after each iteration and figured out that the list was getting initialized in first iteration, but getting down to 0 size after first iteration.

getting started with brl cad

And for that, I had to understand what was happening in BU_LIST_* routines and what was causing the output list to be of size 0. Well, I could pull off a decent task of understanding at least what was happening. I was having a hard time because all work was done using pointers and that is not my strong area. I had been trying to understand what exactly was going on in the function since yesterday evening. Yes, finally I understood today that what was the problem in the Pipe implementation and I had found the Big Fish : the function rt_pipe_copy was not working properly and hence was messing up my tests and giving test failures.















Getting started with brl cad