Hi all,

The brlcad bu_bitv is very intelligently implemented. But it turns out to
be very difficult to wrap that in the python code which is required for BOT
primitive

Below, I explain the situation further.

-> The bu_bitv has a vector "bits" which is a unsigned char type of data.
(of size 2 as per the definition)

-> Now during the initialization of a bu_bitv, only the required memory is
allocated as required by the number of bits. So for example if I have only
8 bits to store the api is programmed such that the memory which will be
allocated will be = sizeof(bu_bitv) - 2(substract the 2) + 1 (allocate a
byte for 8 bits)

->Now while importing a structure in python code we cannot determine
whether extra memory has been allocated or not!

Please suggest remedial measure I should adopt. I spent a long time
understanding the code and what is happening. ;-) Please use the below
links for understanding further.

bot structure : [1]
bit_v : [2]
A typical usage of bit_v for bot : [3]

Cheers!
Raj.

[1] http://brlcad.org/xref/source/include/rtgeom.h#L620
[2] http://brlcad.org/xref/source/include/bu.h#L1365
[3] http://brlcad.org/xref/source/src/libged/typein.c#L1018
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to