Implementation of ICAD


The inputs are entered through a GUI by the user. First, the customer’s details are entered into the system followed by the area details i.e., the length and breadth of the plot, and the square feet area of the building. Then, the details of each room is entered and on clicking a button, the plan module is reached.

       The total number of rooms given as input by the user is calculated. Depending on the sum, generate a square mesh such that the number of the squares in each row and column of the mesh is the square root of the perfect square greater than but close to the sum. The largest dimension among all the rooms is selected as the dimension of each square in the mesh. The colour corresponding to each room is added to an arraylist. Each room and its corresponding colour are added to separate arraylists. On clicking a button, the plan is generated such that random number, r, whose value can change between 1 and 362880 is generated. A random, non-repeatable sequence of number is generated and stored in an array. If the random number is less than counter value then return; otherwise, increment the counter till the random number. The number sequence is generated after a recursive function that generates such a random number sequence is called.

Thus, a room is placed in each square of the mesh according to the combination sequence generated. If a room is blank, then an entire square is alotted to the blank space. The rooms are optimized by bringing the rooms of the same rows together. The rooms are made such that the bottom of each room of the each odd row and the top of each room of the each even row are at the same height. The consequtive odd and even rows are then brought together and then recursively, such groups of rows are brought together. The gaps generated between the rooms during the plan generation are filled by button clicks. The X and Y coordinates of the 2 button clicks are taken and used to generate a rectangle. Another button click is made so that the colour of the rectangle on which the button is clicked is taken and is applied to the free space selected. The breadth of the rectangle on which the click was made is reduced by a factor so that the area of the free space is reduced from the area of the room. Doors are generated by using 2 button clicks and drawing a line between the coordinates where button clicks where made. Windows are generated by using 2 button clicks and drawing a line between the coordinates where button clicks where made. The length of the window can be selected from the list.

The side view module is composed of the data mapped from top view module. These details include the overall length of the house. Side view module involves placing the doors and windows in the plan. Once these data are placed, these details are taken and used for generation of the side view module. These details about the doors and windows include their length, coordinates etc. The details are then implemented to generate the front view. After generation, the required colour is provided by the user to the side view. Tools are also provided to include sunshades, terrace etc.

Comments

Popular posts from this blog

Difference between "diff" and "sdiff" commands in Unix

Anonymous classes in C++