#334 bad results from 3dm import

open-accepted
Sean Morrison
5
2012-10-10
2012-10-09
Anonymous
No

I got someone to export the solid works in 3dm, but the results were not good.

Discussion

1 2 3 > >> (Page 1 of 3)

  • Anonymous
    2012-10-09

    log file

     
    Attachments

  • Anonymous
    2012-10-09

    ascii export of the results

     
    Attachments
  • Sean Morrison
    Sean Morrison
    2012-10-09

    I confirmed the failures on your geometry. The exported 3dm is not valid -- there are problems with the complex entity names. The objects were exported with names like "(#42052) Saddle Side Panel" which is not valid for 3dm. (I believe the parenthesis, #, and spaces are not legal)

    There is a programmatic way to fix the files (model.Audit(true)) that I'll see if we can get added to our importer to try and automatically fix such problems.

    As a workaround, the STL files will all import but will require a little work to combine all of the data back into a single model (STL requries one object per file).

     
  • Sean Morrison
    Sean Morrison
    2012-10-09

    • assigned_to: nobody --> brlcad
    • milestone: 387263 --> other bug / workaround
    • status: open --> pending-accepted
     

  • Anonymous
    2012-10-09

    about the stl files, there is a zip file with them here
    https://ia701500.us.archive.org/32/items/CEB_Press_IV/CEBIV.stl
    when i try to read one :
    mdupont@mdupont-Aspire-7750G ~/Downloads/OSE/STL $ /usr/brlcad/bin/stl-g -d '01-001-00-0 - 01-063-00-0-1 01-060-00-0-1.STL' test.g
    Converting Part: 01-001-00-0
    Using solid name: s.01-001-00-0
    01-001-00-0 has no solid parts, ignoring

     

  • Anonymous
    2012-10-09

    • status: pending-accepted --> open-accepted
     
  • Sean Morrison
    Sean Morrison
    2012-10-09

    That's because they lie. It's really a .tgz file. The opensourceecology.org folks named the files odd. Unpack it and the data is there. STL data is a pain to deal with as it's a lowest common denominator format, but something like this should get you going:

    mv CEBIV.stl CEBIV.stl.tar.gz
    tar zxvf CEBIV.stl.tar.gz
    mv STL CEBIV.STL
    cd CEBIV.STL
    rm -f cebiv.g
    j=0
    for i in *.STL ; do
    printf "\nOBJECT #%s " $j
    name="`echo $i | sed 's/.STL//g' | sed 's/ /_/g'`"
    stl-g -b -N "$name" "$i" "$name.g"
    mged cebiv.g dbconcat -s $name.g _$j
    j=`expr $j \+ 1`
    done
    mged cebiv.g g cebiv all*

    From there, you can run "mged cebiv.g" and there will be a top-level "cebiv" object that you can draw (e.g. "draw cebiv ; rt -F/dev/X -s1024").

    Basically, that script iterates over all STL files, converts them to BRL-CAD format, and adds them all to one database. For convenience, it strips the STL suffix and spaces so objects in BRL-CAD and file names make a little more sense. All said and done, you have a cebiv.g that has the geometry sans hierarchy.

    Seeing what the STL looks like, things are looking a lot better with the 3dm importer. It imported all geometry in the original 3dm file. It just didn't put the objects into position due to lacking support for instance references. I've added the item to our TODO.

     
  • Sean Morrison
    Sean Morrison
    2012-10-09

    • status: open-accepted --> pending-accepted
     
1 2 3 > >> (Page 1 of 3)