Print at Dec 18, 2025, 6:19:46 AM View all posts in this thread on one page
Posted by rahul18bisht at Mar 21, 2011, 5:50:05 AM
how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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

Posted by alied at Mar 21, 2011, 5:13:50 PM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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)

Posted by rahul18bisht at Mar 22, 2011, 6:17:34 AM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
may you provide sample coding for above problem of walls at 90 degrees only plzzzz.?????????

Posted by Puybaret at Mar 22, 2011, 6:41:24 AM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
What is your project?
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator

Posted by rahul18bisht at Mar 22, 2011, 1:38:14 PM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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.????????????????????

Posted by Puybaret at Mar 22, 2011, 2:07:16 PM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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

Posted by rahul18bisht at Mar 26, 2011, 6:24:57 AM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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 ???????????????

Posted by Puybaret at Mar 26, 2011, 8:38:24 AM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
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

Posted by rahul18bisht at Mar 28, 2011, 7:29:26 AM
Re: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
thanks sir for answering !!!