[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!
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: Sat Jan 29, 2022 4:32 am Anyone like to comment if this approach would save some time ? Or would follow experimenting this approach ?
Hi @paullee,
can't say if this approach could help us save some more time but I would love to help you finding it out .. unfortunately I can more or less only contribute with test work.
cheers
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

Thanks! Any contribution is welcome and would be helpful :D
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

paullee wrote: Sat Jan 29, 2022 4:32 am However, it seem the points generated are slightly not coplanar so makeLoft do not create solids ?... needs more time to have a better look :)
OK, it seems it is fixed now :D

Code: Select all

                point12 = Base.Vector(-angle1[0]*50, -angle1[1]*50, 0)
Another point is needed as above.
CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(15.74 KiB) Downloaded 22 times
Test_ CurvedStairRC_LoftApproach_rr_ 01.FCStd
(840.87 KiB) Downloaded 19 times
Screenshot from 2022-01-29 22-20-41.png
Screenshot from 2022-01-29 22-20-41.png (192.1 KiB) Viewed 1264 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 »

Now, before the 'final boolean', it is 0.65s...
CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(16.03 KiB) Downloaded 20 times
Test_ CurvedStairRC_LoftApproach_rr_ 01.FCStd
(800.63 KiB) Downloaded 19 times
Screenshot from 2022-01-29 22-46-47.png
Screenshot from 2022-01-29 22-46-47.png (183.18 KiB) Viewed 1251 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 »

The last step turn out to be easy, just 1 line previously commented out.

1.43s

CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(16.03 KiB) Downloaded 22 times
Test_ CurvedStairRC_LoftApproach_rr_ 01.FCStd
(800.63 KiB) Downloaded 22 times
Screenshot from 2022-01-29 22-50-29.png
Screenshot from 2022-01-29 22-50-29.png (185 KiB) Viewed 1246 times
Screenshot from 2022-01-29 22-50-34.png
Screenshot from 2022-01-29 22-50-34.png (182.48 KiB) Viewed 1246 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 »

1.94s for slightly wider one, needs more cutting ?

Test_ CurvedStairRC_LoftApproach_rr_ 01.FCStd
(893.09 KiB) Downloaded 23 times
Screenshot from 2022-01-29 22-59-36.png
Screenshot from 2022-01-29 22-59-36.png (196.06 KiB) Viewed 1240 times
Screenshot from 2022-01-29 22-59-40.png
Screenshot from 2022-01-29 22-59-40.png (188.79 KiB) Viewed 1240 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 »

Should be more than enough to be included as an ArchStair object :)
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

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

Post by paullee »

Forgot to set the control for comparison purpose.

With @Roy_043's modified @Abeton Macro, it is about 4.03s on my system.

CPU: i3 @3.3Ghz x4, built-in / on-board graphic only

OS: Fedora 34 (Workstation Edition) (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Branch: (HEAD detached at 9162733)
Hash: 91627338a44371fe9a8e815b4900f62558af98a1
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: English/United States (en_US)
Screenshot from 2022-01-30 01-17-57.png
Screenshot from 2022-01-30 01-17-57.png (229.64 KiB) Viewed 1170 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 »

Attempt to further refine by putting some Part routine into if i == 0: routine, but it turns out no significant saving in time: 1.92s

ABeton wrote: Sun May 02, 2021 3:11 pm Ping
@ABeton, just note there is no license requirement specified in your Macro, can you advise please :)

Roy_043 wrote: Fri Jan 28, 2022 7:05 pm Ping
Would you like to incorporate your algorithm into the ArchWB (e.g. ArchStair tool) ? :D

Thanks.

CurvedStairRC_002_By-Roy_043_Paul.FCMacro
(16.13 KiB) Downloaded 25 times
Screenshot from 2022-01-30 01-57-35.png
Screenshot from 2022-01-30 01-57-35.png (185.29 KiB) Viewed 1153 times
Screenshot from 2022-01-30 02-08-59.png
Screenshot from 2022-01-30 02-08-59.png (203.28 KiB) Viewed 1153 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 I'm speechless,
I compared the speed of all macros for my oval staircase on my machine:

@ABeton's Macro: 24,77 sec
@Roy_043's 001 Macro: 13,95 sec
@Roy_043's 002 Macro: 6,25 sec
@paullee's Macro: 4,44 sec

A speed boost factor greater than 5 in only one day :shock:
That's why I love FreeCAD so much :D
Post Reply