India
Joined: Jul 10, 2024
Post Count: 4
Status:
Offline
Automating the creation of walls, placement of doors,
Hello Team,
We have a use case where we need to upload a blueprint image as a background, and have the outer walls, inner walls, doors, and staircase automatically drawn in a 3D view, which can then be exported as a PNG format. Is this feasible through a custom plugin? The custom plugin should be smart enough to automatically calculate the dimensions of the outer walls, doors, and staircase. Alternatively, do we have any other way to automate this process? Thanks
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Automating the creation of walls, placement of doors,
If you know how to guess where walls and doors are placed in an image, feel free to create a plug-in able to create the matching objects with Sweet Home 3D API. Good luck!
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
India
Joined: Jul 10, 2024
Post Count: 4
Status:
Offline
Re: Automating the creation of walls, placement of doors,
So you mean to say if we are able to identify where the walls, doors and staircases need to be placed in the selected background image, then we can able to draw and place those objects(Walls, doors etc.) through API's ?
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Automating the creation of walls, placement of doors,
Yes, to create a wall, you have to create an instance of Wall class then add it to the Home instance returned by getHome method in the plug-in you'll define. For doors and staircases, you have to find the CatalogDoorOrWindow or CatalogPieceOfFurniture instance you want in the furniture catalog stored in user preferences, then use the catalog object to create a HomeDoorOrWindow or HomePieceOfFurniture instance, change its coordinates and size before adding it to the home instance with addPieceOfFruniture method. Objects added to home will appear in the plan and the 3D view accordingly.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
India
Joined: Jul 10, 2024
Post Count: 4
Status:
Offline
Re: Automating the creation of walls, placement of doors,
Okay, Thanks for the clarification. Before creating a walls and other objects. My custom plugin should read the uploaded background image to read coordinates. Do we have any option to do the same ?
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Automating the creation of walls, placement of doors,
Retrieve home controller instance with getHomeContoller method in the plug-in, then you can let the user choose a file with the showOpenDialog method available in the ContentManager instance bound to home controller. Reading the content of the file as an image can be done with Java standard javax.imageio.ImageIO class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
Croatia
Joined: Jan 14, 2025
Post Count: 30
Status:
Offline
Re: Automating the creation of walls, placement of doors,
It would be something like converting bitmap to vector in Coreldrw. With vector s, walls can easily be extruded in one of the 3D programs. But of course it doesn't work perfectly and architecture still requires precision. Mostly I think it's impossible to do.