how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

This topic has been viewed 3933 times and has 8 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
rahul18bisht
Posts: 21
Joined: Mon Mar 21, 2011 5:35 am
Country: dehradun, uttarakhand, india

how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by rahul18bisht »

i am developing code for creating walls at 90 degress only, by the user, in which user can create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees.??????????????

plz help and provide sample code for this
User avatar
alied
Posts: 40
Joined: Tue Sep 08, 2009 9:53 pm
Country: Rosario, Santa Fe, Argentina

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by alied »

check PlanController.java and PlanComponent.java
change the behaviour in the state CREATE_WALL (I'm typing from memory, so the actual name might be different)
rahul18bisht
Posts: 21
Joined: Mon Mar 21, 2011 5:35 am
Country: dehradun, uttarakhand, india

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by rahul18bisht »

may you provide sample coding for above problem of walls at 90 degrees only plzzzz.?????????
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by Puybaret »

What is your project?
Emmanuel Puybaret, Sweet Home 3D creator
rahul18bisht
Posts: 21
Joined: Mon Mar 21, 2011 5:35 am
Country: dehradun, uttarakhand, india

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by rahul18bisht »

in our project we have to calculate the cost of home built using sweethome3d existing public lincense code in our java swing project.
Problem is that we have to restrict user that he/she can create walls only at 90 degrees, neither greater nor less than 90 degrees, only at 90 degrees.
So , how to do that, or what changes to do in sweethome3d existing code.????????????????????
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by Puybaret »

I would be happy to help you further but first, I would like to be sure that you understand the spirit of open source projects:
Are you aware (or your client if you do some consulting service) that if you build a software derived from a GNU GPL project like Sweet Home 3D and want to distribute it, you will be obliged to redistribute it under the same license, making the source code of the modification publicly available?
Emmanuel Puybaret, Sweet Home 3D creator
rahul18bisht
Posts: 21
Joined: Mon Mar 21, 2011 5:35 am
Country: dehradun, uttarakhand, india

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by rahul18bisht »

yeah !!! sure i am understand the spirit of open source project, and will make it publicly available, once we overcome from the problems, we are facing to create wall at 90 degrees only.

So, plz sir ,, could you explain or provide sample code what to do in order to create walls at 90 degrees only, not other than 90 degrees at floor plan area ???????????????
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by Puybaret »

What didn't you understand in alied answer?
To be more accurate, you would have to change WallDrawingState class implementation in PlanController class. There's one value to change there and you'll get a 90° step instead of a 15° step when magnetism is on!

By the way, stop flooding in the forum.
Emmanuel Puybaret, Sweet Home 3D creator
rahul18bisht
Posts: 21
Joined: Mon Mar 21, 2011 5:35 am
Country: dehradun, uttarakhand, india

Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees

Post by rahul18bisht »

thanks sir for answering !!!
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 2 guests