On Jan 18, 2011, at 9:42 PM, John Anderson wrote:

>     Now that we have asc2g and g2asc working reasonably, I took a look 
> at the import/export of ASCII files in MGED. The export simply runs 
> g2asc, so produces the same result as running g2asc. The import, 
> however, runs asc2g, then dbconcats the result into the currently open 
> db. By default, dbconcat ignores the _GLOBAL object; so title, units, 
> and color table do not get imported.

Perhaps three command-line options to dbconcat for overriding the title, units, 
and color table.  Checkboxes could be presented on the GUI whether to override 
or not, defaulting to not override so we match current behavior.

> This seems entirely reasonable when 
> the import is actually concating into an existing db that already has 
> stuff in it. But if we are importing into an empty db (i.e., title == 
> "Untitled BRL-CAD Database", units == "mm", no color table, and no other 
> object in the db), perhaps we should also import the _GLOBAL object 
> attributes. Or maybe or slightly more complex set of rules, or user 
> input, should determine what parts of the _GLOBAL object get imported.

Seems reasonable to me to auto-import the settings without user prompting if 
_GLOBAL is in some canonical default form.  Otherwise, though, I would think 
we'd want to treat those three features independently.  It's merely a storage 
implementation detail that we stash them as attributes on the _GLOBAL object.  
I could see wanting to import a color table and units but not the title, for 
example.

Cheers!
Sean


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-devel

Reply via email to