Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 5
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 3020 times and has 4 replies Next Thread
Shralen
Member
Member's Avatar

Canada/Québec
Joined: Jul 26, 2020
Post Count: 63
Status: Offline
Reply to this Post  Reply with Quote 
3D staircase odd render



I added an L-shaped staircase to my house, but as you can see we can see through the laundry room. I put all the floor downstairs red so you could see it better.

Is there a way to fix this?
----------------------------------------
I'm more comfortable writing in English, but I can also write in French.
 ,___,
(OvO)   Hoot
 /)_)
 "    "
[Dec 31, 2024, 9:00:00 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1230
Status: Offline
Reply to this Post  Reply with Quote 
Re: 3D staircase odd render

This is caused by the staircase floor cutout. By default the cutout is the same as the bounding box of staircase (i.e the width and depth of the object).

There are two ways to solve this.

The first one is difficult but it is the 'clean' way: export the staircase and import it in a library. In the library you can set a custom cutout that follows the threads. To do this you need to learn how SVG paths are created because a cutout is a SVG path. Here is a manual: https://www.sweethome3d.com/SVGPathMiniManualForSweetHome3D.pdf.

The second method is to export the staircase and import it as a normal object, i.e. NOT a staircase. That way it doesn't cut the square hole. Then you have to manually change the upper floor to create the hole for the staircase. This is relatively easy by adding/deleting/moving points of the room in the plan. With magnetism on room points snap to corners of the walls which makes is even easier.
----------------------------------------
Dodecagon.nl
950+ 3D models, manuals, and projects
[Dec 31, 2024, 9:36:15 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Shralen
Member
Member's Avatar

Canada/Québec
Joined: Jul 26, 2020
Post Count: 63
Status: Offline
Reply to this Post  Reply with Quote 
Re: 3D staircase odd render

The clean way look a bit too complex for me. So I'll just use the other option for now. Maybe I'll try the other option in the future.

Also the model I used is the second Quarter landing staircase found in http://www.sweethome3d.com/freeModels.jsp
----------------------------------------
I'm more comfortable writing in English, but I can also write in French.
 ,___,
(OvO)   Hoot
 /)_)
 "    "
[Dec 31, 2024, 11:35:13 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Keet
Advanced Member
Member's Avatar

Netherlands
Joined: Apr 8, 2022
Post Count: 1230
Status: Offline
Reply to this Post  Reply with Quote 
Re: 3D staircase odd render

The clean way look a bit too complex for me.
It's not that difficult if you understand that a cutout just is a path that goes vertical and horizontal in percentages.

First rotate and mirror the staircase as in your plan. Export and import it so it is in that position after import.
Note the width and depth. Measure each staircase part using the dimension lines. Notice that the shorter horizontal dimensions add up to the width and the shorter vertical dimensions add up to the depth.



Now to calculate the SVG Path cutout. Understand that width is 100% represented as 1 and depth is also 100% represented as 1. The shorter dimension are fractions of 100% (1).

If you positioned the staircase correctly the start point is easy: top-left = 0,0 or 0.0,0.0 .
So the first part of the path is 'M0,0'

Now we have to go vertical to reach the 97.7 length. The calculation is really simple: 97.7/228.3 = 0.427945686.
97.7 is the length we want to go vertical and 228.3 is the depth of the object, i.e. 100% or 1. To go vertical we use 'v'.
The vertical number for the path is v0.427945686 but using 3 or 4 numbers after the decimal point is usually more than enough precision: v0.4279.

We now have "M0,0 v0.4279".

Now we need to go horizontal. Basically we do the same calculation but now with the horizontal numbers: 129.4/225=0.575111111 or 0.5751.
To go horizontal we use 'h': h0.5751.

We now have "M0,0 v0.4279 h0.5751".

Vertical again: 130.6/228.3=0.572054314 > v0.5720
Horizontal again: 95.6/225=0.424888889 > h0.4249
Vertical again: 228.3/228.3=1. Because we want to go up instead of down the number is negative: v-1.
And back to the origin is 'z'.

Notice that v0.4279 + v0.5720 = 1 (or should be 1, I missed that sad At least h0.5751 + h0.4249 = correctly 1).

The full cutout: "M0,0 v0.4279 h0.5751 v0.5720 h0.4249 v-1 z"

Import the staircase in a Furniture Library. Modify the staircase in the library. Check 'Staircase' and replace the "Cutout Shape" with the SVG path we created: M0,0 v0.4279 h0.5751 v0.5720 h0.4249 v-1 z
Save and save the library. Import in Sweet Home 3D and you will find your staircase with the correct cutout.

The library with the staircase: https://dodecagon.nl/upload/staircasecutout/staircase.sh3f

Extra: You can shorten the cutout a little where the start of staircase (bottom) is by shortening the second vertical number. Just make sure that the vertical going back up (the last negative one) is the same number as the two verticals going down.
You can go beyond 1 to create a cutout that is larger than the object itself, for example if you want a little space around the staircase. Most likely you want start with M not at 0,0 but with one or both numbers a small negative. If you create an image with the dimensions before starting to calculate that is not so difficult.
Don't forget the MiniManual I linked to in my first answer. It explains the same but with more options for navigating points.
----------------------------------------
Dodecagon.nl
950+ 3D models, manuals, and projects
----------------------------------------
[Edit 2 times, last edit by Keet at Jan 1, 2025, 1:32:18 PM]
[Jan 1, 2025, 10:17:39 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Shralen
Member
Member's Avatar

Canada/Québec
Joined: Jul 26, 2020
Post Count: 63
Status: Offline
Reply to this Post  Reply with Quote 
Re: 3D staircase odd render

Wow. I understand some part of the explanation, but I got a bit lot in the equation part. Math is not something I'm super good at. It is a bit hard for me.

Still I thank you for the explanation. It was interesting to see how SVG work.

Also a big thank you for the library, that help a lot.
----------------------------------------
I'm more comfortable writing in English, but I can also write in French.
 ,___,
(OvO)   Hoot
 /)_)
 "    "
[Jan 2, 2025, 8:26:18 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

  Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads  
© Copyright 2024 Space Mushrooms - All rights reserved