Staircase generator plug-in

This topic has been viewed 1148049 times and has 72 replies
Thread status: Active
Test the features and bug fixes of future versions [img]http://www.sweethome3d.com/images/flags/en_small.gif[/img]
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Staircase generator plug-in

Post by Puybaret »

Special cases can be created by assembling intermediate staircases.
For example, if you need a handrail with brackets along a wall then a handrail with a balluster, you can assemble an intermediate straight staircase, two intermediate square spiral staircases and a simple straight staircase.

Image

Happy New Year to you all [:)]
Attachments
StaircaseWithStorageRoom.sh3d
(182.14 KiB) Downloaded 770126 times
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
captaincook
Posts: 403
Joined: Fri Oct 20, 2017 3:16 pm
Country: France

Re: Staircase generator plug-in

Post by captaincook »

Bonjour Emmanuel.

Et bien j'ai suivi vos conseils à la lettre et le résultat est pratiquement identique à mon escalier d'origine.
J'ai simplement recopier la rambarde d'origine sur le nouveau.

Image

Bonne journée et encore un grand merci.
User avatar
Keet
Posts: 1807
Joined: Fri Apr 08, 2022 7:13 am
Country: Netherlands

Re: Staircase generator plug-in

Post by Keet »

The staircase generator sets the system PC user as the creator of the generator staircase. This is NOT something you want to happen if you share your created home here on the site.
I suggest that the generator dialog includes a field to set the creator name.

Oh, and the Roof generator does the same. Something for Dorin to fix [;)]
Dodecagon.nl
1300+ 3D models, manuals, and projects
User avatar
Keet
Posts: 1807
Joined: Fri Apr 08, 2022 7:13 am
Country: Netherlands

Re: Staircase generator plug-in

Post by Keet »

Daniels118 found the source of the problem:

Code: Select all

HomePieceOfFurniture roofPiece = new HomePieceOfFurniture(new CatalogPieceOfFurniture(null, roofName, null, iconContent, modelContent, size.x, size.z, size.y, 0, true, null, System.getProperty("user.name"), true, null, null));
(In the roof generator thread: https://sweethome3d.com/support/forum/v ... ,150#57817 )

Dorin tested with replacing the value with null which worked and will be avialable in the next update.
Maybe the same solution could be used for the roof generator.
Dodecagon.nl
1300+ 3D models, manuals, and projects
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Staircase generator plug-in

Post by Puybaret »

I consider that when you want to share a model, you prefer to have some kind of credit.
If you fear your login may be disclosed, just edit the OBJ file and replace your login by whatever you want.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
Keet
Posts: 1807
Joined: Fri Apr 08, 2022 7:13 am
Country: Netherlands

Re: Staircase generator plug-in

Post by Keet »

I consider that when you want to share a model, you prefer to have some kind of credit.
If you fear your login may be disclosed, just edit the OBJ file and replace your login by whatever you want.
Sorry, but I see that the other way around: never disclose a login name, it's a security leak. In many cases it will not be the name you want to use to get credit with anyway. If I want credit under a specific name I can edit the object file to insert that name but I don't want to edit EVERY object I want to share, and again with updates.
My username is different on PC and laptop and none are 'Keet', the name I would use to get credit for a shared object. Similar situations will go for most users I believe.

To explain the severity of the problem besides it being a security leak: For several years now I am creating dozens of different houses for a valley/island with most of the furniture, doors, windows, etc. custom made. This problem means I will have to edit every single house. When I have shared the projects (in a year or two) I will have to do all of that again every time I have updated houses and share again.

I'm a software developer. I can create a script or program to run over all houses and do the editing but most other users will not be capable to correct something that the software shouldn't have done in the first place. It's also easy to forget such a last run over the projects before sharing.
If I ever disclosed usernames in software output I would be out of business, please change this to something else. The most perfect way would be to have a preference setting where you can set a name for credit in exports but anything other than a login name would do. Changing 'System.getProperty("user.name")' to '"creator"' is probably the easiest bug fix you have ever done [:)]
Dodecagon.nl
1300+ 3D models, manuals, and projects
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Staircase generator plug-in

Post by Puybaret »

As some other plug-ins may use this way of doing and you don’t want it, you could try to set the user.name property to another value with the Java option [font=courier new]-Duser.name=myname[/font] (this option can be set using the same way as the -Xmx option used to increase memory and explained in the FAQ).
This should fix this way of doing that you consider as a security leak.
Emmanuel Puybaret, Sweet Home 3D creator
User avatar
Keet
Posts: 1807
Joined: Fri Apr 08, 2022 7:13 am
Country: Netherlands

Re: Staircase generator plug-in

Post by Keet »

As some other plug-ins may use this way of doing and you don’t want it, you could try to set the user.name property to another value with the Java option [font=courier new]-Duser.name=myname[/font] (this option can be set using the same way as the -Xmx option used to increase memory and explained in the FAQ).
This should fix this way of doing that you consider as a security leak.
That works! (Although I'm still of the opinion that it's a serious security leak that should not have been introduced in the first place.)

I also found a second way around this which might be usefull for other users: Use the furniture library editor for every single object you create where you can set the creator name for each object. Once you add furniture in your plan that is imported through a furniture library the name is used as set in the library. This also allowes to use multiple different creator names if you wish to do so.
Dodecagon.nl
1300+ 3D models, manuals, and projects
Tungmeister
Posts: 6
Joined: Sat Jul 29, 2023 9:31 am
Country: UK

Re: Staircase generator plug-in

Post by Tungmeister »

I might provide a longer list of materials in a coming version since some of you think it's really necessary. I'll update the translation at that moment.
Could you share how to set randomized coordinates for the textures as you did for the threads and risers?
Source code is included in the plug-in so you can have a look by yourself. It's just a random offset added to x and y texture coordinates, a different offset being drawn for each tread and riser...
Could you help me remove the random values please? My stairs have a stair runner on them so I need the texture to be uniform across all the steps. I downloaded the source and replaced the random values with 0s however after compiling and adding the plugin sweethome just hangs on the splash screen and I can't work out what I'm doing wrong.
User avatar
Puybaret
Posts: 9440
Joined: Mon Nov 07, 2005 12:00 pm
Country: Paris, France
Contact:

Re: Staircase generator plug-in

Post by Puybaret »

Did you compile the plug-in with Java 8 or options to generate Java bytecode compatible with Java 8 (or Java 11 or 15 if you use Sweet Home 3D with those versions)?
You could also create the stair runner with a smaller staircase without stringers and handrails. Just elevate it a bit to make it appear on top of the stairs of the main staircase, like in the following example.

Image
Emmanuel Puybaret, Sweet Home 3D creator
Post Reply New Topic

Who is online

Users browsing this forum: No registered users and 1 guest