projection of room walls on a 2D plan

This topic has been viewed 7233 times and has 4 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
deverne
Newbie
Posts: 2
Joined: Mon Feb 21, 2011 10:02 pm
Contact:

projection of room walls on a 2D plan

Post by deverne »

Hello,

I'm a newbie to Sweet Home 3D and a new Java developer.
I work on house plan with Sweet Home 3D which is a very nice application.

I need to generate 2D plan of the wall from the 3D model. I read at the SH3D API which is very well documented and try for one week to generate a SVG file containing the projection of the wall.

Today, the result is not as good as expected. I encounter the following issues:
- Unable to locate the door and windows on the wall and draw them at the right place.

- Unable to detect precisely which room is behind a given wall. What is the way to do that?

- Look's like sometimes the room boundary points are in clockwise order, and sometime in anticlockwise. So I suspect that some of my rooms are drawn in reverse order...

- Difficult to remove the very little walls generating when a door is encountered in a wall. Like in the following draw:

Code: Select all

Before:
Wall 1                Wall 5
-------+  Wall 3   +---------
    W2 +-----------+ W4

Code: Select all

After:
Wall 1
-----------------------------
The code is available for every one. Where should I sent it? Just ask it ?

The obtained plans are very useful to prepare the future quotations...

Thanks for your help,

Deverne
User avatar
hansmex
Advanced Member
Posts: 4031
Joined: Sat Sep 26, 2009 11:36 am
Country: Netherlands

Re: projection of room walls on a 2D plan

Post by hansmex »

Deverne,

I can't follow what you're trying to explain, and it's not because of my English...
If you share your SH3D file, maybe that would explain some things. You can also share a Java file, maybe someone else understands that (but not me).

1 - The command Plan --> Export to SVG format produces an SVG file with a high quality 2D plan, but I guess that's not what you want? Do you need a cross-section? Can you give an example of what you need? Some image from Google Images maybe?
2 - I tried drawing a few rooms in all kinds of orders: clockwise, counterclockwise, random direction walls. When I inspect the inserted rooms with the AdvancedEdit plug-in, all room points are given in clockwise order, so that doesn't confirm your suspicion, although the plug-in may sort room points in that order.

Hans
Hans

Ryzen 7-9700X, 32 GB RAM, 500 GB SSD, 2x 2 TB SSD, Geforce GTX 1060 3 GB
User avatar
Puybaret
Expert
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: projection of room walls on a 2D plan

Post by Puybaret »

Deverne,
I'm not sure to fully understand what kind of projection you're trying to build, and for which purpose.
A drawing is sometimes much more helpful than any word.
If you're trying to create a parallel projection, using Java 3D parallel projection should help you to get a result much faster (but you won't get an SVG output).
You can upload your code anywhere and add a link to it here.
Emmanuel Puybaret, Sweet Home 3D creator
deverne
Newbie
Posts: 2
Joined: Mon Feb 21, 2011 10:02 pm
Contact:

Re: projection of room walls on a 2D plan

Post by deverne »

Hello Hansmex and Puybaret,

Thanks for your quick reply. I wrote a blog entry at Deverne Blog explaining more precisely what I try to do.

What I want is a SVG file containing: What I want

The code I wrote is:
RoomWalls.zip

The result I obtain is:
Current version

Thanks for your help,

Deverne
Jerry2012
Newbie
Posts: 14
Joined: Fri Oct 12, 2012 12:57 am

Re: projection of room walls on a 2D plan

Post by Jerry2012 »

Hi,

are there any news on this topic, this wall projection tool would be perfect to use.
Did someone finish it?

best regards, Jerry
Post Reply New Topic