Sean,
 
Thank you very much. I tried it and got it to work!
 
Harun

On Mon, Jun 14, 2010 at 10:11 AM, Christopher Sean Morrison <brlcad@mac.com> wrote:

On Jun 9, 2010, at 11:53 AM, Harun Bayraktar wrote:

> Hi,
>
> I would like to calculate the center of gravity and moments of
> inertia of a combination object. The sequence of MGED commands I
> use are as follows:
>
> opendb intersect.g y
> make hex.s arb8
> make seg.s tgc
> attr set hex.s GIFTmater 2
> attr set seg.s GIFTmater 2
> comb int.c u seg.s + hex.s
> gqa -Am -f density_table hex.s
> I use the density_table file:
> 0 10.0 dummy0
> 2 10.0 dummy2
> 3 10.0 dummy3
> I get the following when I run the gqa command:
>
> bad LOS (0) on /int.c/seg.s
> bad LOS (0) on /int.c/seg.s

The main problem is that you don't have any regions defined.  A
"region" is our language for a "part" where a given boolean recipe
goes from being a shape (i.e., template) and turns into something
solid that occupies space.

The "LOS" error it shows is a "line-of-sight equivalence factor that
regions define for describing how much material a given region
represents.  For example, a 50% porous metal object might be modeled
as a simple solid block but then have its LOS set to 50%.  Normally,
this just defaults to 100% equivalence hence my suspicion that you
either need a region or there is something wrong with the seg.s object.

You manually set GIFTmater attributes, but you shouldn't have needed
to and you generally don't want to be setting attributes on
individual primitives (as they are, by definition, just shapes).  Try
creating a region first:

r int.r u int.c

That will set los and GIFTmater on int.r -- you can change the
material_id (aka GIFTmater) on int.r using the attr set command.
Then you can run gqa on that int.r region.  See if you still get the
LOS error.

Cheers!
Sean


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit.  See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
BRL-CAD Users mailing list
brlcad-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/brlcad-users