Wall paint with step size.

This topic has been viewed 7498 times and has 6 replies
Thread status: Active
Questions about extending features and developing plug-ins [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
Post Reply New Topic
AlexDeveloper
Posts: 10
Joined: Mon Mar 18, 2024 10:27 am

Wall paint with step size.

Post by AlexDeveloper »

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?

Thanks for help very very much!!
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Wall paint with step size.

Post by Puybaret »

You may change this value by returning a different value in the [font=courier new]getMagnetizedLength[/font] method of the length unit(s) you want to use (like in LengthUnit.INCH#getMagnetizedLength). Replacing [font=courier new]precision[/font] by [font=courier new]0.6f[/font] in the computing of [font=courier new]magnetizedLength[/font] 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 creator
AlexDeveloper
Posts: 10
Joined: Mon Mar 18, 2024 10:27 am

Re: Wall paint with step size.

Post by AlexDeveloper »

Thanks for your answer!
But this is not what I meant)

I made a short video that may assist you with this question in terms of what I was thinking.

please look at this video from different pplication.(it is safe) (video about measurements of the wall)

It is about displaying measurements of the drawing wall in the bottom right label where we see length, angel, and thickness.

Best, Alex
AlexDeveloper
Posts: 10
Joined: Mon Mar 18, 2024 10:27 am

Re: Wall paint with step size.

Post by AlexDeveloper »

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.

Thank you very much) [O:)]
AlexDeveloper
Posts: 10
Joined: Mon Mar 18, 2024 10:27 am

Re: Wall paint with step size.

Post by AlexDeveloper »

Can someone help me with this issue?
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Wall paint with step size.

Post by Puybaret »

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 creator
AlexDeveloper
Posts: 10
Joined: Mon Mar 18, 2024 10:27 am

Re: Wall paint with step size.

Post by AlexDeveloper »

Thank you very much! I wish you the best and you very helped me!
*I use Sweet Home 3D only for personal purposes and study)
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest