Download

Online

Gallery

Blog

  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: 4
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 5626 times and has 3 replies Next Thread
javadch
Newbie




Joined: Dec 29, 2014
Post Count: 1
Status: Offline
Reply to this Post  Reply with Quote 
Adding custom properties to the model objects

I am developing a pligin (as well as a model of electrical objects) that uses the lamps and other electrical model objects to calculate the wiring requirements. for this purpose I need to add some extra attributes like power consumption, generated heat, complying standard and so on. or to add the max ampere to a wall mount plug.
How is it possible to edit the current furniture items? and also how can I use other free tools to construct such model objects.
A concrete instruction would be highly appreciated.
[Dec 29, 2014, 12:15:22 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1545
Status: Offline
Reply to this Post  Reply with Quote 
Re: Adding custom properties to the model objects

To create your own models, see alternatives on the 3D models page Blender, Art of Illusion, Sketchup etc. are all good (but very different) alternatives. In addition, you could look at editing advanced properties for your models. See the DefaultFurnitureCatalog.Properties (and there is a short intro on how p. 9 of the SVG/properties guide).

If you create your own models, note that in addition to LIGHT_SOURCE and other properties, you can also add PLAN_ICON to use electrical symbols for each item to change their display in the 2D view.

ok
[Dec 30, 2014, 12:21:21 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: 9141
Status: Offline
Reply to this Post  Reply with Quote 
Re: Adding custom properties to the model objects

Okh, I don't think that javadch wants to imports models, but rather he wants to store additional data. wink

javadch, you could store your data in the description property of a piece of furniture which is not displayed in the user interface at the moment. Or if you want to organize your data differently, you could use setVisualProperty / getVisualProperty methods in Home class to store and retrieve a map with furniture as key and some serializable data as value.
If you want something better, you'll have to to create a derived version of Sweet Home 3D something more complicate than programming a plug-in, but then you'll have the choice through customized controllers to override what you want.

See also this thread
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
[Dec 30, 2014, 3:12: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 
okh
Advanced Member




Joined: May 12, 2013
Post Count: 1545
Status: Offline
Reply to this Post  Reply with Quote 
Re: Adding custom properties to the model objects

Okh, I don't think that javadch wants to imports models, but rather he wants to store additional data. wink
Ah yes, commendable wish smile. Sorry if I confused things. Just a question of wishful thinking on my part, I guess. Sat with an electrician yesterday to calculate electric requirements, wire-diameters, voltage-drop and fuses for a 12V solar system (I did make models of standard batteries and solar panels for the project). Would be interesting to see any related work. ok
[Dec 31, 2014, 12:15:15 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 2006-2024 eTeks - All rights reserved