Cut Objects for perspective view

This topic has been viewed 13423 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
gromit
Posts: 1
Joined: Mon Nov 02, 2009 2:35 pm

Cut Objects for perspective view

Post by gromit »

Hello,

first of all congratulations for this project, is a very good development.
I have been working on a modification of the code to allow to cut objects, like walls, doors or windows, to prevent them hidding rooms on obliques perspectives. So, not just changing githe eight of the objects, but actually cutting them at a certain height, including the glass of the window. This is now working on my computer and looks nice. This way is posible to lower certain walls and objects to a half to make a better view.

Image

I use ModelClip class of java3d and basically I have added a new property in the HomePieceOfFurniture class, with all the support to propagate the changes to controllers and view.
Now if you modify the new property 'cut height' of any object, it gets cut at that eight.

I had to change several classes in the model and the views. If you are interested I could send the changes in a controlled way, is not that much.
And I have some questions, for example how to get the windows and doors attached to a wall, if there is a direct method. I have not seen it.

Regards!
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Cut Objects for perspective view

Post by Puybaret »

Very nice. [:)]
Feel free to submit your code as an attachment of a feature request.

There's no direct method to get the wall which windows and doors are attached to.
Don't be misled by the isBoundToWall method: it tells if a door or window was dropped on a wall last time it was moved, and is used just to adjust resizing behavior of doors and windows.
Holes in walls are computed in the createWallGeometries method of Wall3D class, but you probably saw that already.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
alied
Posts: 40
Joined: Tue Sep 08, 2009 9:53 pm
Country: Rosario, Santa Fe, Argentina

Re: Cut Objects for perspective view

Post by alied »

Hi, I've been doing some work, and I get to the problem of knowing which window is attached to a wall.

Maybe this can help:

Code: Select all

    
private boolean isBoundToWall(Wall wall, HomeDoorOrWindow doorOrWindow) {
        return doorOrWindow.isBoundToWall() && wall.intersectsRectangle(doorOrWindow.getPoints()[0][0], 
                                        doorOrWindow.getPoints()[0][1], 
                                        doorOrWindow.getPoints()[2][0], 
                                        doorOrWindow.getPoints()[2][1]);
    }
Kentusky
Posts: 2
Joined: Thu Aug 29, 2013 11:10 am

Re: Cut Objects for perspective view

Post by Kentusky »

That's exactly what I'm trying to achieve. Any news about that? [:((] [:)]
ZsoltET
Posts: 1
Joined: Thu Dec 11, 2014 6:50 pm

Re: Cut Objects for perspective view

Post by ZsoltET »

Hi, I have a question about the section cut. There is a way to cut out not only walls, but to cut my object 2(windows, doors). I found your post with invisible box, but that only cuts the walls, and that can be done only with the wall height. Sry for my english:)

Maybe this one was done I just can't figured it out.
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests