[PR] [0.18] [0.19_pre] Arch Stair - More Geometry Control? Profile Generator

A forum dedicated to the Draft, Arch and BIM workbenches development.
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

[PR] [0.18] [0.19_pre] Arch Stair - More Geometry Control? Profile Generator

Postby paullee » Mon Jun 18, 2018 10:30 pm

EDIT: Riser Thickness, 31.3.2019

Hi, I am trying the Arch Stair (again).

The settings are great to automatically generate a stair.

I find the need to set the length of the intermediate landing, but it seems there is nothing in the combo data tab nor wiki.

Possible to control it somewhere? Through python script?
Screenshot from 2018-06-19 06-27-34.png
Screenshot from 2018-06-19 06-27-34.png (282.35 KiB) Viewed 1810 times
Last edited by paullee on Mon May 20, 2019 5:58 pm, edited 15 times in total.
User avatar
yorik
Site Admin
Posts: 11397
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Stair - Control Legnth of Landing?

Postby yorik » Tue Jun 19, 2018 1:26 am

Basically at the moment the length of the landing is calculated by taking the total length of the stairs baseline and subtracting the total length of steps. But the stairs tool was never carried very far, it needs a lot of work yet...
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Postby paullee » Tue Jun 19, 2018 8:15 pm

yorik wrote:
Tue Jun 19, 2018 1:26 am
Basically at the moment the length of the landing is calculated by taking the total length of the stairs baseline and subtracting the total length of steps. But the stairs tool was never carried very far, it needs a lot of work yet...
Thanks!

I attempt to understand the code, though farrrrrrrr from understanding the whole, it is noted obj.Width.Value is used for the 'landing depth'.

I try introduced 'Landing Depth' property and add in essence the following... prima facia it works... now if 'Landing Depth' is not '0', the landing depth follow this input.

The whole modified file attached (ArchStairs.py), see if it helps and any problem (I do not understand most of other code/calculation) ... I would try an alternative to calculate the stair length / height based on input of individual tread and riser....

Code: Select all

        if obj.LandingDepth:
            reslength = edge.Length - obj.LandingDepth.Value
        else:
            reslength = edge.Length - obj.Width.Value
p.s.
I can only use gedit and without more knowledge in programming best practice, I add 'by paul' to signify the changes made.

set at '0'
Screenshot from 2018-06-20 04-02-17.png
Screenshot from 2018-06-20 04-02-17.png (325.31 KiB) Viewed 1747 times
set at '1000'
Screenshot from 2018-06-20 04-02-41.png
Screenshot from 2018-06-20 04-02-41.png (324.3 KiB) Viewed 1747 times
set at '2000'
Screenshot from 2018-06-20 04-02-55.png
Screenshot from 2018-06-20 04-02-55.png (327.93 KiB) Viewed 1747 times
Attachments
ArchStairs.py
(25 KiB) Downloaded 27 times
User avatar
yorik
Site Admin
Posts: 11397
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Stair - Control Length of Landing?

Postby yorik » Wed Jun 20, 2018 2:52 pm

That seems very good!

Would you like to make a pull request on github and become an official FreeCAD developer? ;)
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Postby paullee » Wed Jun 20, 2018 11:32 pm

Hi, no problem to share anything I can manage to contribute if found helpful.

In the meantime, I never and haven't learned how to use github (except download FC :) ).

Before then, the revision of code was attached in last post.
User avatar
Kunda1
Posts: 4812
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Stair - Control Length of Landing?

Postby Kunda1 » Wed Jun 20, 2018 11:39 pm

@chrisb started a great thread about learning how to use git and GitHub (can't find it ATM). There is also a short tutorial on the wiki github
Feel free to ask queations, folks are happy to help as you know
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 16895
Joined: Tue Mar 17, 2015 9:14 am

Re: Arch Stair - Control Length of Landing?

Postby chrisb » Thu Jun 21, 2018 5:22 am

Kunda1 wrote:
Wed Jun 20, 2018 11:39 pm
@chrisb started a great thread about learning how to use git and GitHub (can't find it ATM).
Do you mean this: https://forum.freecadweb.org/viewtopic. ... 10#p197792 ?
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Postby paullee » Thu Jun 21, 2018 10:22 pm

Hi, thanks all for the information!

There are lots to read in fact, it's fun though... I started to read python, workbench creation, may need to learn gimp/inkscape to draw icon, since I found FC trying to learn something that maybe like Revit or ArchiCAD (both I never use) ... and like Yorik once comment 'end up coding' - though I am never and far far far from being a programmer of any kind (I had a book on 6502 assembly / machine code you won't believe it, if anyone know what is 6502) ;)

Spent/Spending lots of time figuring out how python basic works and 'experimenting' how to use Sketch (SketchPython) + ArchWall to build floor layout in a better workflow that is easier for design revision... haven't really started a real model for any project / assignment yet... hoping something is useful in the end for this 'experiment.

Thanks again!
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Postby paullee » Sat Jun 23, 2018 12:19 am

Hi, just drop into earlier discussion (again) noting Arch Structure already has a Precast Stair which calculate based on input tread and riser! No need to attempt any code myself :D
yorik wrote:
Sat Sep 17, 2016 9:47 pm
(Thank Joancabeza who bring this up again)

The Precast Stair code is more straightforward for me to understand, though it apparently lacks some features like stringer, nosing (which I do not need at the moment).

Now if I manage to, and with some time, I would attempt a vertical stairwell with intermediate landing (rather than a straight flight with a landing that can be done now in Arch Stair).

Any thought how you would like / have planned to do / develop further with these 2 approach of Stairs (Arch Structure Precast Stair / Arch Stair)?

Screenshot from 2018-06-23 08-04-02.png
Screenshot from 2018-06-23 08-04-02.png (530.79 KiB) Viewed 1581 times
Screenshot from 2018-06-23 08-00-55.png
Screenshot from 2018-06-23 08-00-55.png (284.23 KiB) Viewed 1581 times
paullee
Posts: 1600
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Postby paullee » Sat Jun 23, 2018 10:45 am

Hi, further 'experiment' below which turn ArhcStair._Stairs.makeStraightStairsWithLanding(self,obj,edge) into kind of frankenstein...

I am testing introducing another property (Flight = "Straight" or "Return"). Now a straight staircase with a landing would 'return' in opposite direction after landing if "Return" is selected, some progress... with some queries and maybe comments needed to further develop if find useful.
  1. 1st simple English Q: What is correct terminology for this typology of staircase? I am afraid 'Return' is not the correct term.
  2. The makeStraightStairsWithLanding(self,obj,edge) is 'manipulated' to make this happen - I do not have full picture of the Arch / ArchStair / ArchPrecast (another query in last post) and have no better idea what to do if I want to introduce this 'feature'.
  3. I have a glance at YouTube how Revit is working with stairs and found the stairs 'components' could be edited individually after creation.... I am thinking if another experiment I am having a SketchPython to create a nos. of ArchWall may work similarly... or if there is already a plan and idea to work in this direction or another?
You can see the landing is not totally 'correct' as there is bit sticking out.... other parameters like Structure Offset would not works together nicely etc etc... Just an experiment.

"Experiment" ArchStair.py attached
Screenshot from 2018-06-23 18-20-49.png
Screenshot from 2018-06-23 18-20-49.png (316.08 KiB) Viewed 1556 times
Flight == "Return"
Screenshot from 2018-06-23 18-21-23.png
Screenshot from 2018-06-23 18-21-23.png (316.13 KiB) Viewed 1556 times
Attachments
ArchStairs.py
(26.22 KiB) Downloaded 22 times