Print at Dec 15, 2025, 6:39:19 PM
Posted by Bubblobill at Jun 28, 2019, 2:37:05 PM
Building a bespoke staircase constructor plugin - need help
So I have decided to try my hand at making a plugin. Unfortunately I have never programmed in Java before and it is doing my head in. I have made a fair bit of headway, the code can be found on Project on Github.

I'm fairly sure I have chosen a difficult project to cut my teeth on, what I need now is assistance and advice.

  • Have I approached this correctly?
  • Should I pack my bags and go home?
  • What should I do from here?


Anyone that wants to help out with the rest of the code is welcome to contribute.

Regards,

Jay

Posted by dorin at Jun 30, 2019, 7:17:01 PM
Re: Building a bespoke staircase constructor plugin - need help
For shore is a difficult project (at least for starting in any programming language).
Have I approached this correctly?

Depend of Your mind structure.
From my side (inspired by Asimov):
I know the final. For this I start with the end; what I want to happen in the end.
Than I think what I need for this, who provide'it (usually the end user).
I consider the user to be a most common person(over 65 old) who could use my soft; I keep this in mind and I try to make'it accordingly(specially the UI).
So, You have to reconsider the approach.
Should I pack my bags and go home?

NO WAY BACK!!! Get Up and fight!
Anyone that wants to help out with the rest of the code is welcome to contribute.

Well not too much for the start:
1. I modify a little Your project. Could be find HERE
2. First observation on ApplicationPlugin.properties file:
field class MUST be the same as package from class files
3. Second= in src directory You must have .java not .class
You could see the differences in folder.
Happy programming cool !
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law

Posted by Bubblobill at Jul 9, 2019, 6:21:19 AM
Re: Building a bespoke staircase constructor plugin - need help
Cheers Dorin. Going to have a look at it now.
Jay

Posted by dorin at Jul 9, 2019, 6:56:19 AM
Re: Building a bespoke staircase constructor plugin - need help
One more inspiration on this site .
It do approximately what You want but You need to generate 3D objects not only flat.
So, could be a very long way.
I suggest You to start with more common stairs and than to add country specific restrictions.
Also You must decide the approach:
1. Do an plugin, or
2. Do an separate application.
While You don't need too much from SH3D You could choose the 2.
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law

Posted by Bubblobill at Jul 9, 2019, 8:41:17 AM
Re: Building a bespoke staircase constructor plugin - need help
Nice find. I will see if there are things to adopt/steal.

I've been constructing a selection of parts to form the staircase and trying to work out how to get them into java. Manipulating them will be my next hurdle.

This is what I am aiming for in quality.
One step


More steps


Lots of steps


Posted by Bubblobill at Jul 18, 2019, 5:51:20 AM
UI draft
I have been beating my head against Java UIs and now it hurts.

Importing 3D objects and displaying them is proving to be beyond me so far so I have put it aside to work on the initial set-up interface. So far they should make sense to most people.

From SH3D I mostly want the user to select the levels that will contain the staircase. I use this to determine the total rise which influences the number of steps required, how many landings, etc.


Basic step design is in prototype and looks like this


Step rise selection will be limited (eventually) to integer divisions of the total rise.

I also intend to give alternative nosing profiles beyond the default half-round.

If anyone can give guidance on importing, resizing, positioning and displaying objects in a j3d display canvas I am all ears.

Posted by dorin at Jul 18, 2019, 6:56:23 AM
Re: UI draft
1. It's a good training to exercise with UI, You will need it.
2. An other source of inspiration could be useful. Read it and You will find also some regulations (riser height, recommended outcome, angle of the stair, etc).
3.
If anyone can give guidance on importing, resizing, positioning and displaying objects in a j3d display canvas

I suggest for inspiration to study the code of:
-Modify posture (SH3D)
-Modify opening (SH3D)
-Modify furniture (FurnitureLibraryEditor)

4. You will have also to generate 3D objects (read Export as new furniture & Shape generator plugins)
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law

Posted by Bubblobill at Jul 23, 2019, 12:23:40 PM
Technical question about level heights
When I am determining the total rise for a staircase I am doing it based on the following calculation for spanning levels/floors.

Elevation(Highest Level) + Height(Highest Level) - Elevation(Lowest level)

What I need to know is:
- Does Level Height include Floor Thickness?
- Does Level Elevation measure to the bottom of the floor or the top of the floor?

I think that for the last step to come out even with the floor I might need to adjust my formula to;

Elevation(Highest Level) + Height(Highest Level) + Floor Thickness(Highest Level) - Elevation(Lowest level)

but I am not 100%. I may just be overthinking it.

Posted by Mike53 at Jul 23, 2019, 1:06:09 PM
Re: Technical question about level heights
Hi Bill
You may find some of the info Here helpful, it shows calculations for stairs 1 step down and with top tread level, plus many other things, i used it when calculating the stairs i have made.
I cannot help with the java wizardry, sorry, but good luck
Mike

Posted by dorin at Jul 24, 2019, 7:18:35 AM
Re: Technical question about level heights
About levels You could read this
- Does Level Height include Floor Thickness?
No.
Next level elevation=elevation+floor thickness+level height of previously level
----------------------------------------
A computer program does what you tell it to do, not what you want it to do. Murphy's Law
When all else fails, read the instructions. Murphy's Law
If you don't like "AS IS", DIY. Dorin's law

Posted by Wiebenor at Dec 19, 2021, 12:33:47 AM
Re: Technical question about level heights
Definitely liking the idea of an automatic stair generator or some such thing, and I can't wait to see it come to fruition, if it'll work...

Posted by Puybaret at Dec 19, 2021, 4:45:52 PM
Re: Technical question about level heights
You could try to generate stairs with Dorin's Multiplier plug-in.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator