Joined: Mar 18, 2024
Post Count: 10
Status:
Offline
Wall paint with step size.
Hello Guys! I am new here and I am a developer I am making some changes for myself in this application SweetHome3D. I want to create walls or lines and make the wall step 0.6" instead of 0.1" when a specific button is toggled.
Who can help to guide me on how to do it in the app? Could someone explain where I can make changes in the app?
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Wall paint with step size.
You may change this value by returning a different value in the getMagnetizedLength method of the length unit(s) you want to use (like in LengthUnit.INCH#getMagnetizedLength). Replacing precision by 0.6f in the computing of magnetizedLength in getMagnetizedInchLength will do it in your case. Keep in mind that length value are stored in centimeters so you'll have to return inches converted to centimeters. Note also that this rounding is used only when magnetism is active, is also applied to some other measured lengths like room sides and depends on the zoom factor in the plan in the current implementation.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer
Joined: Mar 18, 2024
Post Count: 10
Status:
Offline
Re: Wall paint with step size.
In addition, the wall should be drawn in the same way as the original, but in the label (tip in the right bottom of the moved wall) where we see length, angle, and thickness. I would like to see updating the length of the wall in runtime with 0.6" step) as in the video that was sent above.
France
Joined: Nov 7, 2005
Post Count: 9369
Status:
Offline
Re: Wall paint with step size.
This is exactly what it does, except the video shows a step of 6" not 0.6".
By the way, note that if you want to build a solution based on Sweet Home 3D, you'll have to distribute it under the GNU General Public License, including the source code of your modifications.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D developer