Page 1 of 11 123 ... LastLast
Results 1 to 20 of 219
  1. #1
    Member dfelinto's Avatar
    Join Date
    Jun 2005
    Location
    Rio de Janeiro, Brasil
    Posts
    666

    Google Sketchup import script

    Hi all!

    Today I installed Google Sketchup in my Ubuntu Linux 6.06 (thanks WINE)!
    Works fine, (with exception of the menu) but the only export options is Google Earth and Google Sketchup(KMZ).



    But, since Google released the format of KMZ files (using a bad Collada file) the JMS script don't work anymore.

    Anyone have any news about that ??

    Regards,
    Dalai Felinto
    Rio de Janeiro - Brasil

    PS;: sorry my BABELFISH english



  2. #2
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by dfelinto
    But, since Google released the format of KMZ files (using a bad Collada file) the JMS script don't work anymore. Anyone have any news about that ??
    use simple google earth export instead of the 'google earth 4' .



  3. #3
    Member dfelinto's Avatar
    Join Date
    Jun 2005
    Location
    Rio de Janeiro, Brasil
    Posts
    666
    I'm trying to import the edges too (just like I talked before).

    The work is going well, but I have a question - what this function do:

    Code:
    def cree_FORME(v,TESSEL) :
                VE=[(v[0]-DOCUMENTORIGINE[0])* 85331.2,
                       (v[1]-DOCUMENTORIGINE[1])* 110976.0,
                        (v[2]-DOCUMENTORIGINE[2])  ]
                TESSEL.append(VE)
    Or better: of where they come these values (85331.2 and 110976.0)?

    I will apreciate any help.

    Regards,
    Dalai
    sorry the english again
    Last edited by dfelinto; 10-Aug-06 at 11:07.



  4. #4
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by dfelinto
    Or better: of where they come these values (85331.2 and 110976.0)?
    These 2 constants are needed to give a visual thickness in Blender .

    I exported a cube of 1x1x1 meter from sketchup and found with a very simple equation how the x, y and z should be multiplied to get a cube of 1.0 x 1.0 x 1.0 in blender .



  5. #5
    Member dfelinto's Avatar
    Join Date
    Jun 2005
    Location
    Rio de Janeiro, Brasil
    Posts
    666
    Is too much hard!

    Well, the file with some changes is here:
    http://www.casadosonho.art.br/3D/kmz...andLines_19.py

    But still don't work

    For today it is enough.

    Thanks jms, regards,
    Dalai Felinto
    EDIT: Any help will be very apreciated
    Last edited by dfelinto; 10-Aug-06 at 13:15.



  6. #6
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Could you post me a few examples of file with edges ?



  7. #7
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    http://jmsoler.free.fr/util/blenderf...hMesh_Z018d.py
    modified version which creates a mesh with all the edges and broken lines found in the file .



  8. #8
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by jms
    http://jmsoler.free.fr/util/blenderf...hMesh_Z018d.py
    modified version which creates a mesh with all the edges and broken lines found in the file .
    I did a few tests with dxf 2d files imported in Google Sketchup and reexported in simple kmz . It seems to work rather well .



  9. #9
    Member dfelinto's Avatar
    Join Date
    Jun 2005
    Location
    Rio de Janeiro, Brasil
    Posts
    666
    Look at theses files:
    http://www.casadosonho.art.br/3D/planta_baixa.dwg
    http://www.casadosonho.art.br/3D/planta_baixa.kmz
    http://www.casadosonho.art.br/3D/planta_baixa2.kmz

    Can you see the difference? If some "geometry"(i.e. faces) is in file, then the importation is ok, else (a pure 2D file) the importer doesn't work.
    The problem is in the code below:
    Code:
            if POLYGON_NUMBER==0 :
    And an automatic "remove double" will be fine too.

    Anyway, my dream is becaming true import DWG in Blender


    Merci beaucoup jms,
    au revoir
    Dalai Felinto



  10. #10
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    The first file seems to be damaged . But not a big problem, i could do something with the two others :
    http://jmsoler.free.fr/didacticiel/b...e_import-0.1.9



  11. #11
    Member dfelinto's Avatar
    Join Date
    Jun 2005
    Location
    Rio de Janeiro, Brasil
    Posts
    666
    Thanks jms,
    the script is beautifull

    Now I can recommend Blender for all of my student collegues without the frustation in importing CAD files.

    This newness deserves a notice in the BlenderNation.

    This kind of thing makes me fill very happy in using Open Source and help (a little help from my part, I know ).

    Good night (in Brasil is 21:00)!
    And goob bye,
    Dalai Felinto



  12. #12
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Not ended : I will add an option to deselect "free edges" management .
    Basic users mainly need to import polygons quickly .



  13. #13
    Member ideasman42's Avatar
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    5,331
    JMS, some advice instead of adjusting the script

    Set Vertex mode in python with
    Blender.Mesh.Mode(Blender.Mesh.SelectModes.VERTEX)

    use more of blenders functions- Blender.sys.sep rather then importing nt or posix, seems overkill anyway.

    [O.select(0) for O in Blender.Object.Get()] - use the scenes objects only.

    your updating the mesh in a loop which is a bit inefficient, would be worth working out a way not to do this.
    Podcast * dotfiles * My Wiki * Blender/Stackexchange
    ideasman42<at>gmail.com



  14. #14
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by cambo
    use more of blenders functions- Blender.sys.sep rather then importing nt or posix, seems overkill anyway.
    Do you really believe that I import nt or posix just for the separator ?


    Recall : the module Blender.sys (which is just a double and, in fact, re-level to nt and posix modules ) makes the scripts unusable on PowerPC G3/G4 and MorphOS . This is already in the bug tracker . It seems that this part of the current guidelines aims to prevent the use of the bundle scripts on non-conventional OS .

    Guillaume "Yomgui" Roguez, maintainer of the blender portage on Morphos, already asked me to do not use this Blender.sys and directly work with the python's official os and os.path modules .
    Last edited by jms; 12-Aug-06 at 05:38.



  15. #15
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by cambo
    your updating the mesh in a loop which is a bit inefficient, would be worth working out a way not to do this.
    Please, do not forget to what kind of results you are going to with this kind of advises :




  16. #16
    Member ideasman42's Avatar
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    5,331
    MorphOS - is unsupported, the maintainer needs to address this bug.
    Guillaume "Yomgui" Roguez needs to fix this, sure this importer may work, but a whole lot more in blender will not.

    of course removing me.update() cant be done thaughtlessly, best way to do it is to have a dummy mesh for filling that you reuse, that way editmode enter/exit is fast. and you only have to update the NMesh once.
    Last edited by ideasman42; 12-Aug-06 at 05:49.
    Podcast * dotfiles * My Wiki * Blender/Stackexchange
    ideasman42<at>gmail.com



  17. #17
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by cambo
    of course removing me.update() cant be done thaughtlessly, best way to do it is to have a dummy mesh for filling that you reuse, that way editmode enter/exit is fast. and you only have to update the NMesh once.
    The NMesh version (the version for true security data ) was not updated since the 0.1.4 one .



  18. #18
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    New version is coming ...



  19. #19
    Member ideasman42's Avatar
    Join Date
    Mar 2004
    Location
    Australia
    Posts
    5,331
    You miss the point about secure data-
    It dosent realy even apply to an importer because an importer dosent modify existing data.

    Data safty is only an issue for scripts that are improperly use the api - Leaving the users mesh modified withoput finishing or distroying teh data,
    scripts that correctly use Mesh are just as safe as NMesh.
    Podcast * dotfiles * My Wiki * Blender/Stackexchange
    ideasman42<at>gmail.com



  20. #20
    Member
    Join Date
    Mar 2002
    Location
    PACA, France
    Posts
    3,701
    Originally Posted by cambo
    You miss the point about secure data-
    I don't think so .
    It dosent realy even apply to an importer because an importer dosent modify existing data.
    Should not but it could .
    Data safty is only an issue for scripts that are improperly use the api -
    Chances to improperly modifiy data are tragicaly higest, without any rescue, with Mesh . Thing that you absoloutely do not want to understand .
    Leaving the users mesh modified withoput finishing or distroying teh data,
    scripts that correctly use Mesh are just as safe as NMesh.
    In french : "des salades !"

    In fact, your project is to do not let the choice to the user : use Mesh or nothing . But this means that users will loose their time to make a data copy when NMesh did it automatically . In fact, as I already said in an other thread, NMesh works as Blender works internaly, making a copy for editing and Mesh doesn't .
    Last edited by jms; 12-Aug-06 at 06:52.



Page 1 of 11 123 ... LastLast

Similar Threads

  1. BVH import to Action [Solved]
    By joeg in forum Python Support
    Replies: 31
    Last Post: 08-Aug-10, 04:53
  2. .blend append and link script
    By zenoscope in forum Python Support
    Replies: 0
    Last Post: 16-Jan-06, 07:25
  3. Poser import script?
    By andreas99 in forum Python Support
    Replies: 8
    Last Post: 23-Jun-05, 23:25
  4. Obj Import Script Problem
    By rstehwien in forum Python Support
    Replies: 15
    Last Post: 01-Jan-04, 18:32
  5. Can the Import export script be fixed a little bit ?
    By youngbatcat in forum Python Support
    Replies: 15
    Last Post: 30-Dec-03, 23:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •