Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3633 times and has 4 replies Next Thread
aperezm
Newbie




Joined: May 25, 2009
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
field multiPartModel; any use yet?

Hello:
I´ve seen this field defined at DefaultFurnitureCatalog, but no use of it. Is there anything defined about it? There are no results on the forums, so I assume there´s nothing about it.

Thanx in advance.
Alied

[Note: this thread was started on sourceforge.net forums]
[May 25, 2009, 5:33:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9426
Status: Offline
Reply to this Post  Reply with Quote 
Re: field multiPartModel; any use yet?

The best documentation is the code itself. ;-)

If you follow the use of the multiPartModel flag step by step, you'll see that it's stored in com.eteks.sweethome3d.tools.ResourceURLContent instances and used by com.eteks.sweethome3d.io.DefaultHomeOutputStream$HomeObjectOutputStream class that handles the recording of a home.
This flag tells if a resource is a multi part resource stored in a directory with other required resources. In the facts, the multiPartModel flag is set for all the OBJ files of a catalog or a home file that comes with a MTL file and texture image files, to tell HomeObjectOutputStream class that it should save an OBJ file and all the files that are in the same directory as the OBJ file.
Look in SH3D and SH3F files, and you'll see that as soon as an OBJ file isn't alone, it's in a subdirectory and it's multiPartModel is true.


----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
[May 25, 2009, 5:57:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
aperezm
Newbie




Joined: May 25, 2009
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: field multiPartModel; any use yet?

Merci Emmanuel,
That´s not exactly what I was looking for.
Sometimes, on ne vois pas que ce que on veut voir.


[May 25, 2009, 6:37:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
aperezm
Newbie




Joined: May 25, 2009
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: field multiPartModel; any use yet?

on ne vois que ce que on veut voir.
(excusez mon français)


[May 25, 2009, 6:39:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
aperezm
Newbie




Joined: May 25, 2009
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: field multiPartModel; any use yet?

This was the original e-mail I sent to Emanuel:

Reading
sweethome3d, came with this field: MULTI_PART_MODEL. I haven´t find
any other use. I´m interested because I´m using part of your code in
an application, and I need to load objects scattered on several .3ds
files.

How can I take advantage of this? I was thinking of inheriting from
CatalogPieceOfFurniture and create my model from a .ini file. I
already have the code to load an join the objects according to
corresponding points, but it would be better if support or this is
already done. Even if I have to handle it on my own, if it is not
already done, I could contribute my code to do so.

And this was hs answer:

As I answered to you on the forum, this flag could interest you at recording time since if you place all the 3DS files in the same sub directory and set the multiPartModel# key to true, current IO classes will record all the 3DS files in the same directory as the one referenced by ResourceURLContent.
If I had to program it myself, the model# keys would reference files at a new format MYFORMAT describing how to assemble the 3DS files in the same directory as your MYFORMAT file. Then I would program a new Java 3D loader able to handle the MYFORMAT files and tell Sweet Home 3D to add the class of this loader to the supported ones with com.eteks.sweethome3d.j3d.additionalLoaderClasses system property (used in ModelManager).
If you use classpath correctly, this way of doing will even avoid you to compile Sweet Home 3D main jar. ;-) See also my comments at https://sourceforge.net/tracker/?func=detail&...id=152568&atid=784668

A last thing : please post again your need on the forum, and I'll post my answer to let everyone share this idea. ;-)

Best regards
--
Emmanuel PUYBARET
Email : puybaret@eteks.com
Web : http://www.eteks.com
http://www.sweethome3d.eu


Once again, merci beaucoup.
[May 26, 2009, 2:30:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved