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

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

EDIT: 0.21_pre - viewtopic.php?p=675984#p675984
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 8729 times
Last edited by paullee on Mon May 20, 2019 5:58 pm, edited 15 times in total.
User avatar
yorik
Founder
Posts: 13630
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Arch Stair - Control Legnth of Landing?

Post by yorik »

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
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Post by paullee »

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 8666 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 8666 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 8666 times
Attachments
ArchStairs.py
(25 KiB) Downloaded 135 times
User avatar
yorik
Founder
Posts: 13630
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Arch Stair - Control Length of Landing?

Post by yorik »

That seems very good!

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

Re: Arch Stair - Control Length of Landing?

Post by paullee »

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
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Arch Stair - Control Length of Landing?

Post by Kunda1 »

@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
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
chrisb
Veteran
Posts: 53785
Joined: Tue Mar 17, 2015 9:14 am

Re: Arch Stair - Control Length of Landing?

Post by chrisb »

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 ?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Post by paullee »

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
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Post by paullee »

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 8500 times
Screenshot from 2018-06-23 08-00-55.png
Screenshot from 2018-06-23 08-00-55.png (284.23 KiB) Viewed 8500 times
paullee
Veteran
Posts: 5092
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing?

Post by paullee »

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 8475 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 8475 times
Attachments
ArchStairs.py
(26.22 KiB) Downloaded 155 times
Post Reply