Hi Raj,

Thanks for adding the VOl primitive support !

It looks real good, but you won't get away without a few questions :-)

1) have you tested it in any way ? It would be good if you add a test
case in the "tests" sub-directory (see the other tests), and make sure
the primitive can actually be saved to a geometry file (*.g) and you can
display it using mged or archer ! Trying to ray-trace it (from
mged/archer) is also nice, but not strictly required;

2) please come up with a simple default for the "mat" parameter too,
just to have a simple example of how it works ! If it's not possible to
add a default value, then check and throw error if the parameter was not
set in wdb.py "vol" method (see the "sketch"/"combination" methods there
for how it can be done);

3) same problem in the VOL.__init__ -> either provide a default (you can
do it inside the __init__ method if the parameter's value is "None"), or
check and raise error if missing;

4) please copy the "mat" parameter too in VOL.__init__ if copy=True;

If you need to talk, I'm on IRC right now for a while...

Cheers,
Csaba



On Sa, 2014-03-08 at 17:30 +0530, K RAJ KOUSHIK REDDY wrote:
> hi bryan,
> 
> 
> Please find a pull request.
> 
> 
> https://github.com/ncsaba/python-brlcad/pull/1
> 
> 
> 
> Thanks.
> 
> 
> On Wed, Mar 5, 2014 at 7:25 PM, Christopher Sean Morrison
> <brl...@mac.com> wrote:
>         
>         On Mar 5, 2014, at 3:29 AM, K RAJ KOUSHIK REDDY wrote:
>         
>         
>         > Sean,
>         >
>         > Thanks for the quick and prompt reply.
>         >
>         > I also wish to know what are the default values of fields in
>         rt_vol_internal. (similar to rpc at [1]) Also, if you can tell
>         me where to find these default values or they are mere common
>         sense. :-)
>         
>         
>         I'm not sure what you mean by default values.  There aren't
>         any defaults -- you specify the values.  If you're asking what
>         those values should be, that entirely depends on what datafile
>         you feed it.
>         
>         It's a "volumetric primitive" which is voxel geometry.  Volume
>         data is commonly described with many slices of 2D bitmap image
>         data (e.g., think CT scan or MRI scan data). You provide that
>         data in raw format as a file.  That's the first field.  The
>         rest of the fields describe the data like the dimensions of a
>         voxel in terms of width, height, depth, and how much data
>         there is.  The high/low fields are how it knows what data to
>         keep or throw away (again, think CT scan data) since volume
>         data tends to be very noisy.
>         
>         Your best bet is to try and manually create a vol primitive
>         first using mged and the 'in' command.  It'll prompt you for
>         all the parameters needed, so you can play with different
>         values to see how they influence object creation.  Creating a
>         VOL is very similar (but NOT identical) to creating an EBM,
>         which is described at http://brlcad.org/wiki/EBM
>         
>         You should be able to create a series of simple bw images,
>         concatenate them together, and use them as an input.
>         
>         Cheers!
>         Sean
>         
>         
>         
> ------------------------------------------------------------------------------
>         Subversion Kills Productivity. Get off Subversion & Make the
>         Move to Perforce.
>         With Perforce, you get hassle-free workflows. Merge that
>         actually works.
>         Faster operations. Version large binaries.  Built-in WAN
>         optimization and the
>         freedom to use Git, Perforce or both. Make the move to
>         Perforce.
>         
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
>         _______________________________________________
>         BRL-CAD Developer mailing list
>         brlcad-devel@lists.sourceforge.net
>         https://lists.sourceforge.net/lists/listinfo/brlcad-devel
>         
> 
> 
> ------------------------------------------------------------------------------
> Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
> With Perforce, you get hassle-free workflows. Merge that actually works. 
> Faster operations. Version large binaries.  Built-in WAN optimization and the
> freedom to use Git, Perforce or both. Make the move to Perforce.
> http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
> _______________________________________________
> BRL-CAD Developer mailing list
> brlcad-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/brlcad-devel



------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Developer mailing list
brlcad-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to