[Working Macro][work in progress] Curved Path Stairs

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

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

It is really @ABeton concept how to do a stair with non-linear flight, and @Roy_043's programming knowledge how to improve performance, that is great indeed 8-)

EDIT - And forgot to mention your task panel @balrobs is awesome too :D I can't create a task panel (yet ?)
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

As option to save time for recomputing the model during design development:-
  1. as now each Tread is 1 solid instead of 2, and bottom is faceted in any rate, it looks good enough though splitters on sides are not removed, so
  2. trying not to Fuse all the Solid of each Tread to save time (makeCompound instead - EDIT : see below post, seems no need )
  3. not to RemoveSplitter to save time
  4. to be worked as an option user can select in Data Tab e.g., until last moment, export to TechDraw, IFC etc.
Then on my i3 pc :-
  1. last version (Fusing all Tread solids + RemoveSplitter at the end) : 1.94s
  2. this version : 1.52s
This may be important as I like to try (when there is a gap :) ) making the bottom as a 1 continuous curvilinear surface instead of current faceted faces of flat bottom surface of every tread... then the whole recomputing time may become back to tens of second again.

Maybe @Roy_043 or other advance programmer can push to another limit ? :D

CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(16.65 KiB) Downloaded 27 times
Screenshot from 2022-01-30 11-17-14.png
Screenshot from 2022-01-30 11-17-14.png (181.32 KiB) Viewed 1841 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

It seems no needs to makeCompound() of all separate solids before boolean :roll:

1.23s


(As only a python and FC beginner, I am really try and error and recording steps for my own future reference only :lol: )
CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(16.68 KiB) Downloaded 34 times
Screenshot from 2022-01-30 11-47-48.png
Screenshot from 2022-01-30 11-47-48.png (180.13 KiB) Viewed 1825 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

yorik wrote: Ping
The algorithm @ABeton developed is inspiring -

Maybe add an Boolean Common, in addition to Addition and Subtraction, to every Arch Objects ? :D
(Then, needs to select the order of operation ?)

@ABeton's Macro generate an Solid out of the custom shape from a Sketch, and to Boolean Common with a 'base flight' (this also works with curve), to result in the various more customisable flight. Currently, some customisation of the 'landing' shape is possible, would be awesome if flight has more options, and this is possible in other Arch Object also.

In fact, this concept open up more possibilities - a Sketch to contain more information of a flight or landing:-
- 1 wire / edges to signify the 'path'
- 1 (close) wire / edges to signify the 'outline' of the flight / landing (to boolean common)
- (1 wire to signify the floor opening to create - something like Window's subVolume)
...

Any comments ? :D
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by balrobs »

paullee wrote: Sun Jan 30, 2022 3:35 am ...
This may be important as I like to try (when there is a gap :) ) making the bottom as a 1 continuous curvilinear surface instead of current faceted faces of flat bottom surface of every tread... then the whole recomputing time may become back to tens of second again.
...
Hi @paullee,
while you are on the bottom surface why not try to implement the thickness variable to give user better way to control the stair geometry? Do you think it's possible?
stair_thickness.jpeg
stair_thickness.jpeg (39.04 KiB) Viewed 1752 times
Thanks for your persistence ;)
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

balrobs wrote: Sun Jan 30, 2022 9:30 am while you are on the bottom surface why not try to implement the thickness variable to give user better way to control the stair geometry? Do you think it's possible?

Seems workable. Can you have a look at original Arch Stair and examine the original setting interpretation for consistency in attributes / terms ?

EDIT - Arch_Stairs

The original wiki does not explain or illustrate the exact meaning of the attributes - better still someone after examining them can update the wiki :)

By the way, may be some structural engineer could explain in what way they would dimension a stair.
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by balrobs »

paullee wrote: Sun Jan 30, 2022 12:33 pm ...
Seems workable. Can you have a look at original Arch Stair and examine the original setting interpretation for consistency in attributes / terms ?
...
Of course, this property in the original stair is called "Structure thickness".
stair_properties.png
stair_properties.png (59.53 KiB) Viewed 1674 times
paullee wrote: Sun Jan 30, 2022 12:33 pm ...
By the way, may be some structural engineer could explain in what way they would dimension a stair.
...
I'm an old structural engineer and because of this I know that it's very important to control that "Structure thickness" variable.
When I dimension such a curved staircase I would model it with a curved 2D-surface with a thickness of "Structure thickness".
Tomorrow back on my office machine I will send some pics for better understanding!
Cheers
edit
Last edited by balrobs on Sun Jan 30, 2022 3:58 pm, edited 1 time in total.
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

balrobs wrote: Sun Jan 30, 2022 2:22 pm Of course, this property in the original stair is called "Structure thickness".
...
I'm an old structural engineer and because of this I know that it's very important to control that "Structure thickness" variable.
When I dimension such a curved staircase I would model it with a curved 2D-surface with a thickness of "Structure thickness".
Tomorrow back on my office machine I will send some pics for better understanding!
edit
So you are the person :lol:

So the original ArchStair, with this attribute in 0mm and 150mm, looks like below screencaptures - consistent with yours thought?

Screenshot from 2022-01-31 04-15-23.png
Screenshot from 2022-01-31 04-15-23.png (184.82 KiB) Viewed 1593 times
Screenshot from 2022-01-31 04-15-39.png
Screenshot from 2022-01-31 04-15-39.png (183.67 KiB) Viewed 1593 times
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by paullee »

yorik wrote: Ping
paullee wrote: Sun Jan 30, 2022 4:28 am The algorithm @ABeton developed is inspiring -

Maybe add an Boolean Common, in addition to Addition and Subtraction, to every Arch Objects ? :D
(Then, needs to select the order of operation ?)

@ABeton's Macro generate an Solid out of the custom shape from a Sketch, and to Boolean Common with a 'base flight' (this also works with curve), to result in the various more customisable flight. Currently, some customisation of the 'landing' shape is possible, would be awesome if flight has more options, and this is possible in other Arch Object also.

In fact, this concept open up more possibilities - a Sketch to contain more information of a flight or landing:-
- 1 wire / edges to signify the 'path'
- 1 (close) wire / edges to signify the 'outline' of the flight / landing (to boolean common)
- (1 wire to signify the floor opening to create - something like Window's subVolume)
...

Any comments ? :D
Below Stairs (created almost 1 year ago) is defined by a Line (direction / path), further subtracted by 2 volumes in Subtraction.

It could be created similarly defined by an edge / wire in a Sketch, that another Closed Wire in same Sketch defined the volume for Boolean Common.

Simple and clean enough ? :)

Screenshot from 2022-01-31 04-20-28.png
Screenshot from 2022-01-31 04-20-28.png (168.95 KiB) Viewed 1576 times
Screenshot from 2022-01-31 04-20-08.png
Screenshot from 2022-01-31 04-20-08.png (186.21 KiB) Viewed 1576 times
Screenshot from 2022-01-31 04-19-27.png
Screenshot from 2022-01-31 04-19-27.png (177.73 KiB) Viewed 1576 times
balrobs
Posts: 449
Joined: Fri Apr 24, 2020 8:58 pm

Re: [Working Macro][work in progress] Curved Path Stairs

Post by balrobs »

paullee wrote: Sun Jan 30, 2022 8:17 pm So the original ArchStair, with this attribute in 0mm and 150mm, looks like below screencaptures - consistent with yours thought?
Exactly!
Here some promised pics of my oval stair. (unfortunately not done with FOSS :cry: )
stair_oval.png
stair_oval.png (148.77 KiB) Viewed 1490 times
Cheers
Post Reply