[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: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

Hi, bypassing the problem 'missing railing on one side', I return to the Very Original intent of attempt to tweak the code - setting Tread Depth and Riser Height (in addition to setting Landing Depth)! :D The updated ArchStairs.py with this feature and some minor bug fix is attached.


Setting Tread Depth and Riser Height

The existing Tread Depth and Riser Height attributes in the properties are 'result' calculated from other parameters.

Now, following attributes / properties are introduced. They could be set rather than auto-generated similar to Landing Depth.
- Tread Depth Enforce *
- Riser Height Enforce *

What are Overridden?

The result is it overrides following cases:-
- Length is ignored: The overall length would be Tread Depth Enforce x Nos. of Steps
- Height is ignored: The overall height would be Riser Height Enforce x Nos. of Steps
- If base object like DLine, DWire, Sketch is used, their length / height are also ignored
- The above point would have issues when multiple objects are used to general 'multi-segment stairs' - e.g. when the 1st segment length is overridden, there would be a gap or overlapping - have idea how to treat this...later


* Remark:
Should they be better called below?
- Tread Depth Override
- Riser Height Override


p.s.
You can see the 'connecting bit' between flight and landing is 'out-of-sync' - haven't fixed yet...
Screenshot from 2018-07-15 11-28-26.png
Screenshot from 2018-07-15 11-28-26.png (246.95 KiB) Viewed 1767 times
Screenshot from 2018-07-15 11-28-37.png
Screenshot from 2018-07-15 11-28-37.png (253.76 KiB) Viewed 1767 times
Screenshot from 2018-07-15 11-28-49.png
Screenshot from 2018-07-15 11-28-49.png (262.24 KiB) Viewed 1767 times
Screenshot from 2018-07-15 11-31-05.png
Screenshot from 2018-07-15 11-31-05.png (260.22 KiB) Viewed 1767 times
Attachments
ArchStairs.py
(47.81 KiB) Downloaded 52 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

The connecting bit is fixed... along with a nos. of bug found along with...

Note that the Tread Depth as calculated is not correct (not about Tread Depth Enforce)...



Screenshot from 2018-07-16 04-09-06.png
Screenshot from 2018-07-16 04-09-06.png (220.58 KiB) Viewed 1740 times
Screenshot from 2018-07-16 04-11-54.png
Screenshot from 2018-07-16 04-11-54.png (235 KiB) Viewed 1740 times
Attachments
ArchStairs.py
(49.24 KiB) Downloaded 56 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

paullee wrote: Sat Jul 14, 2018 2:07 am Hi, the command should now add a simple railing on landing as experiment ... on one side only :oops:
yorik wrote: Thu Jul 12, 2018 1:06 am
Hi, it turn out the stairs object should be forced recomputed before makeWire... :D

Solved, thanks.

Code: Select all

        
stair.recompute()

Screenshot from 2018-07-17 07-48-56.png
Screenshot from 2018-07-17 07-48-56.png (282.82 KiB) Viewed 1716 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

Some findings and progress...
  1. For reason unknown, the experimental makeRailing() in Win 7 still only produce railing on 1 side :oops:
  2. The makeRailing() on my Fedora 27 produce railing on both 2 sides
  3. Now, the makeStairs() produce railings on straight stair flight in addition to multi-edge landing :)
I suspect the circular extrusion (testing with ArchPipe) is expensive in cpu calculation and graphic demand?

Should use rectangular profiles?
Screenshot from 2018-07-18 06-29-05.png
Screenshot from 2018-07-18 06-29-05.png (272.2 KiB) Viewed 1692 times
User avatar
regis
Posts: 749
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by regis »

paullee wrote: Tue Jul 17, 2018 10:40 pm Some findings and progress...
  1. For reason unknown, the experimental makeRailing() in Win 7 still only produce railing on 1 side :oops:
  2. The makeRailing() on my Fedora 27 produce railing on both 2 sides
  3. Now, the makeStairs() produce railings on straight stair flight in addition to multi-edge landing :)
I suspect the circular extrusion (testing with ArchPipe) is expensive in cpu calculation and graphic demand?

Should use rectangular profiles?

Screenshot from 2018-07-18 06-29-05.png
Hey nice to see your stair progress, will be joining you as soon as I can get my linux mint system setup right. Got a couple random ideas about this stairs I'll like to check with you when I am ready.
User avatar
regis
Posts: 749
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by regis »

Hey lots of kudos on that stair stuff, it is really dope, works right out of the box, and so smooth, I don't know that yet, I haven't even tried to play and tweak the settings, it just works as expected.
So I did a new Linux re-install and tried to rebuild my system up partially somewhat,
So I had to do all the app image things one more time, but this time I organised the files in a way not to get mixed up etc.
So I just tried the file out of curiosity, and i'm not having the same problems as before. so cool. I'm impressed.
Nice work. :D
Attachments
Screenshot from 2018-07-24 21-08-58.png
Screenshot from 2018-07-24 21-08-58.png (249.72 KiB) Viewed 1595 times
Screenshot from 2018-07-24 21-06-50.png
Screenshot from 2018-07-24 21-06-50.png (234.06 KiB) Viewed 1595 times
User avatar
regis
Posts: 749
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by regis »

Your stair landing tool is pretty cool, when drawing a simple non linear shape on the ground plan it creates a landing on the ground,
this is so cool because it even provides for the possibility of creating side walks, curbs etc, and linking this with a profile tool like
railing enhances the possibilities even further. Nice development.
Attachments
Screenshot from 2018-07-24 21-29-41.png
Screenshot from 2018-07-24 21-29-41.png (302.38 KiB) Viewed 1592 times
Screenshot from 2018-07-24 21-20-04.png
Screenshot from 2018-07-24 21-20-04.png (305.81 KiB) Viewed 1593 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

Hi, thanks! And try the latest ArchStair.py :)

I don't have much time to work recently - though i find I have been obsessed with this coding for 4 weeks or more!
(I should be working on some other 'experiment'...)

By memory, this version:-
  1. Should create 2 railings on both sides
  2. For 'multi-segment' staircases, the railing created should now be a continuous bar, rather then segments for different 'segments of staircases'
  3. Now, change the width of each 'segment of staircases', the continuous railing bar should follow
    (of cos, w/o proper 'offset' at those 'turns' between different segments...)
  4. Currently the railing is formed by ArchPipe
  5. Hard-coded the height (900mm by memory), offset from edge (90mm if not wrong)
  6. But you can tweak the ArchPipe attributes/properties
  7. E.g. you can 'Offset End' and 'Offset Start'
  8. Can customize the 'Profile'
  9. No separate tool to create back the railing/ArchPipe if it is deleted by accident
    (can use python to do that just not automated...)
Some questions / survey hopefully can direct what should be done / more intuitive for users:-
  1. I am hesitating where should i put the properties of the railing, e.g. height, offset...
  2. e.g. make a new object similar to ArchPipe but with above properties
  3. Should have a boolean "Railing" "No Railing"?
  4. What 'features' are most commonly wanted for railing? 'End Treatment'?
  5. I have not tried to make the landing accept different width for each 'turn'...
  6. Or a vertical shaft of staircase repeating for 50 storeys...
  7. or more landings / customise steps for each of the flight in a simple stairs...
Bits of ideas only...

Screenshot from 2018-07-25 22-35-44.png
Screenshot from 2018-07-25 22-35-44.png (222.32 KiB) Viewed 1581 times
Screenshot from 2018-07-25 22-36-58.png
Screenshot from 2018-07-25 22-36-58.png (278.93 KiB) Viewed 1581 times
Screenshot from 2018-07-25 22-37-16.png
Screenshot from 2018-07-25 22-37-16.png (232.13 KiB) Viewed 1581 times
Attachments
ArchStairs.py
(57.22 KiB) Downloaded 53 times
User avatar
regis
Posts: 749
Joined: Sun Jul 12, 2015 8:17 am
Contact:

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by regis »

paullee wrote: Wed Jul 25, 2018 3:29 pm Hi, thanks! And try the latest ArchStair.py :)

I don't have much time to work recently - though i find I have been obsessed with this coding for 4 weeks or more!
(I should be working on some other 'experiment'...)

By memory, this version:-
  1. Should create 2 railings on both sides
  2. For 'multi-segment' staircases, the railing created should now be a continuous bar, rather then segments for different 'segments of staircases'
  3. Now, change the width of each 'segment of staircases', the continuous railing bar should follow
    (of cos, w/o proper 'offset' at those 'turns' between different segments...)
  4. Currently the railing is formed by ArchPipe
  5. Hard-coded the height (900mm by memory), offset from edge (90mm if not wrong)
  6. But you can tweak the ArchPipe attributes/properties
  7. E.g. you can 'Offset End' and 'Offset Start'
  8. Can customize the 'Profile'
  9. No separate tool to create back the railing/ArchPipe if it is deleted by accident
    (can use python to do that just not automated...)
Some questions / survey hopefully can direct what should be done / more intuitive for users:-
  1. I am hesitating where should i put the properties of the railing, e.g. height, offset...
  2. e.g. make a new object similar to ArchPipe but with above properties
  3. Should have a boolean "Railing" "No Railing"?
  4. What 'features' are most commonly wanted for railing? 'End Treatment'?
  5. I have not tried to make the landing accept different width for each 'turn'...
  6. Or a vertical shaft of staircase repeating for 50 storeys...
  7. or more landings / customise steps for each of the flight in a simple stairs...
Bits of ideas only...
Does work well on my end so far.
paullee wrote: Wed Jul 25, 2018 3:29 pm I am hesitating where should i put the properties of the railing, e.g. height, offset...
Hesitating between what ideas? The way it looks to me is that railings are their own thing,
so they have their own property, just like windows can fit in a wall and have their won properties.
Perhaps what I see is how to control segmented railings.
For example there might be corners which don't need railings on the same draft-wire that defines.
So an option similar to the windows in menu where you can add elements or subtract elements that constitute the railing as per what was selected.
But nice job.
Attachments
Screenshot from 2018-07-25 20-12-18.png
Screenshot from 2018-07-25 20-12-18.png (305.55 KiB) Viewed 1569 times
paullee
Veteran
Posts: 5134
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Stair - Control Length of Landing? More Geometry Control? + Bug Report ['pre-Pull Request' ?]

Post by paullee »

Thanks for testing and ideas.

Maybe in the meantime I just add properties in the Stairs Object to control simple railing Height and Offset. Yes could have a menu to add / remove element constitute railing - seem not having the knowledge to do it by myself yet :oops: Though you can manually create which segment of railing through python :)
  1. Every Stairs Object now has attributes of OutlineLeft, OutlineRight, OutlineLeftAll, OutlineRightAll - which simply is the wire geometries of the railing you see generated by code
  2. OutlineLeft(Right)All is simply the wire geometry connecting all its 'last segment' stairs railing gemetries
  3. So if s = Gui.Selection.getSelection()[0] of your selected 'segment' of stairs.
  4. import Draft, w = Draft.makeWire(s.OutlineLeft) will make a 3d wire of the railing skeleton
  5. import Arch, Arch.makePipe(w) should make only just the segment of railing you want...
  6. ... maybe I should current Arch.makeStairs to just do the above 'semi-automate' it
Some 'bugs' / 'features not implemented' found more I use it ... little surprise to find railing follow when stairs align Right or Center...
Screenshot from 2018-07-27 07-26-16.png
Screenshot from 2018-07-27 07-26-16.png (258.76 KiB) Viewed 1544 times
Screenshot from 2018-07-27 07-50-54.png
Screenshot from 2018-07-27 07-50-54.png (261.03 KiB) Viewed 1544 times
Post Reply