Parametrically defined or scripted home

This topic has been viewed 22021 times and has 4 replies
Thread status: Active
Discuss anything here [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
honzik
Posts: 3
Joined: Thu Nov 03, 2022 1:22 pm
Country: Czechia

Parametrically defined or scripted home

Post by honzik »

Hello,

first of all, thanks a lot for this amazing program!

I would like to use SweetHome3D "parametrically".
As a minimum example, assume a rectangular room surrounded by walls.
I would like to have an option to resize the room based on given dimensions (width and height), without a need to redraw it manually.

In reality, I would have many such rooms and walls, stacked together, dimensions of each room being independent parameter and I would like to define these parameters and see the result "easily" (without manual redrawing).
In an extreme case, the home would be "scripted".

Is it somehow possible currently?

If no, I would create a Python tool for this kind of scripting, producing a XML file loadable by SweetHome3D.
Would anybody be interested in such feature?
Just if I should publish the code once it is eventually finished.

Thanks
Jan
User avatar
hansmex
Posts: 4027
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: Parametrically defined or scripted home

Post by hansmex »

Even if only as a thought experiment, it would be interesting to see how such a script would work.
It seems to me relatively easy to define a set of rooms with a few basic parameters, but how would you define the placement of rooms relative to each other?

Recently, I've played around a bit with AI generators, and although they produce something that vaguely resembles a house, they're impossible to live in because of the haphazard orientation of the rooms.

H
Hans

new website - under constuction
hansdirkse.info
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Parametrically defined or scripted home

Post by Puybaret »

Jan, why not trying to program your idea in Java from a plug-in? You would have no need to generate a SH3D file, just have to call Sweet Home 3D API.
Emmanuel Puybaret, Sweet Home 3D creator
honzik
Posts: 3
Joined: Thu Nov 03, 2022 1:22 pm
Country: Czechia

Re: Parametrically defined or scripted home

Post by honzik »

Even if only as a thought experiment, it would be interesting to see how such a script would work.
It seems to me relatively easy to define a set of rooms with a few basic parameters, but how would you define the placement of rooms relative to each other?

Recently, I've played around a bit with AI generators, and although they produce something that vaguely resembles a house, they're impossible to live in because of the haphazard orientation of the rooms.

H
Thanks for the reply.

The placement of the rooms would be defined basically as "first wall width + first room width + second wall width + second room width + ...".
I did not meant automatic room placement.

As an example, I have a long hall (hallway, corridor, ...) with several rooms on one side. My use case would be something like:
- what if I switch these two rooms (which would shift all other rooms and would need complete redrawing), how would it look like?
- what if I enlarge this and this room and make this room smaller, what would it look like?
- ...
honzik
Posts: 3
Joined: Thu Nov 03, 2022 1:22 pm
Country: Czechia

Re: Parametrically defined or scripted home

Post by honzik »

Jan, why not trying to program your idea in Java from a plug-in? You would have no need to generate a SH3D file, just have to call Sweet Home 3D API.
Thanks for the reply.

Using Java and the SweetHome3D API, I am able to create a home programatically and save it, so basically what I was looking for, thanks for the tip.

Still maybe I will play with the possibility to use Python :-) but it is a secondary problem, left for my leisure time.

Thanks
Jan
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest