Sweet Home 3D Forum Category:Help Forum:Developers Thread: how to restrict user to create walls at 90 degrees only, not greater and less than 90 degree, only at 90 degrees
No member browsing this thread
Thread Status: Active Total posts in this thread: 9
india
Joined: Mar 21, 2011
Post Count: 21
Status:
Offline
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.??????????????
Argentina
Joined: Sep 8, 2009
Post Count: 40
Status:
Offline
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)
india
Joined: Mar 21, 2011
Post Count: 21
Status:
Offline
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.????????????????????
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
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
india
Joined: Mar 21, 2011
Post Count: 21
Status:
Offline
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 ???????????????
France
Joined: Nov 7, 2005
Post Count: 9426
Status:
Offline
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