[Working Macro][work in progress] Curved Path Stairs
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Curved Path Stairs
@bitacovir should be interested, and probably a number of others !
See how it goes
See how it goes
Re: Curved Path Stairs
Cool, I will make a thread
Re: Curved Path Stairs
Hi ABeton, don't worry.....I guess that it's not easy to implement a complex object such as curved stairs....good luck
Hi paullee
That's right, I find it really very interesting and stimulating and I think that it will be extremely useful
Re: Curved Path Stairs
I was not able to solve some problems But stairs work in a most cases. Some limitations:
- when drawing a stair path it is important that you draw lines from start to finish of the stairs
- if drawing sketches and using arcs stairs only work if you do it consecutevly in counter-clockwise direction(with wires there is no such problem, it is only important that you draw lines from start to finish of the stairs)
- stairs are created from closed wires(either sketch or draft)
I would like to have them fully functioning just in sketcher but I dont know how to solve the arc problem. Try out the macro and let me know what bugs you find. Also if you get some ideas how to solve some of them that would be great.
- when drawing a stair path it is important that you draw lines from start to finish of the stairs
- if drawing sketches and using arcs stairs only work if you do it consecutevly in counter-clockwise direction(with wires there is no such problem, it is only important that you draw lines from start to finish of the stairs)
- stairs are created from closed wires(either sketch or draft)
I would like to have them fully functioning just in sketcher but I dont know how to solve the arc problem. Try out the macro and let me know what bugs you find. Also if you get some ideas how to solve some of them that would be great.
- Attachments
-
- New Stairs11.FCMacro
- (5.09 KiB) Downloaded 63 times
Re: [Working Macro]Curved Path Stairs
Well... I can say that that the main problem is fixed Stairs work qute well with almost all edges in sketcher(I had a problem only with b-spline).
It was actualy a simple fix. The problem was how edges in a sketch are sorted. So the fix was to create a new wire out of the selected edge and sort it, it was two lines of code Anyway, test it out and let me know of the results. There is an "align" option in the macro if you get some errors when creating the stairs just change the value and see if it works. Options are "left" and "right".
It was actualy a simple fix. The problem was how edges in a sketch are sorted. So the fix was to create a new wire out of the selected edge and sort it, it was two lines of code Anyway, test it out and let me know of the results. There is an "align" option in the macro if you get some errors when creating the stairs just change the value and see if it works. Options are "left" and "right".
- Attachments
-
- New Stairs13.FCMacro
- (5.14 KiB) Downloaded 69 times
Re: [Working Macro][work in progress] Curved Path Stairs
Hi @ABeton,
I tried your Macro and I can say it's cool stuff. Compliments to you and thank you for picking up this challenge.
Here are some thougts/suggestions:
- sometimes it was difficult for me to predict where the stairs will start and where they will end ... I couldn't understand the logic behind it.
Edit: Just realized that respecting the right path order and choosing the right alignment do the trick
- sometimes to optain the desired result I had to make several tries ... inner path, outher path, left align, right align.
- in some cases the Macro fails if certain dimensions are too small (see red stairs with small distance between flights, i.e. 35cm in attachment).
- as you already mentioned sometimes splines actually have some problems.
Despite these minor issues, I think your tool can be a huge help for modeling stairs.
BTW is there a way to control step dimensions and therefore step numbers in the zones between the flights?
Thank you again and kind regards
I tried your Macro and I can say it's cool stuff. Compliments to you and thank you for picking up this challenge.
Here are some thougts/suggestions:
- sometimes it was difficult for me to predict where the stairs will start and where they will end ... I couldn't understand the logic behind it.
Edit: Just realized that respecting the right path order and choosing the right alignment do the trick
- sometimes to optain the desired result I had to make several tries ... inner path, outher path, left align, right align.
- in some cases the Macro fails if certain dimensions are too small (see red stairs with small distance between flights, i.e. 35cm in attachment).
- as you already mentioned sometimes splines actually have some problems.
Despite these minor issues, I think your tool can be a huge help for modeling stairs.
BTW is there a way to control step dimensions and therefore step numbers in the zones between the flights?
Thank you again and kind regards
Re: [Working Macro][work in progress] Curved Path Stairs
Excellent!
I just tried your amazing work
I tested different types of the stairs...but as you already know, it takes some time to build them. For the rest, everything worked fine and without any major problem.
Thank you very much for great work that you've done!
I just tried your amazing work
I tested different types of the stairs...but as you already know, it takes some time to build them. For the rest, everything worked fine and without any major problem.
Thank you very much for great work that you've done!
Re: [Working Macro][work in progress] Curved Path Stairs
Thank you very much balrobsbalrobs wrote: ↑Fri May 14, 2021 2:51 pm Hi @ABeton,
I tried your Macro and I can say it's cool stuff. Compliments to you and thank you for picking up this challenge.
Here are some thougts/suggestions:
- sometimes it was difficult for me to predict where the stairs will start and where they will end ... I couldn't understand the logic behind it.
Edit: Just realized that respecting the right path order and choosing the right alignment do the trick
- sometimes to optain the desired result I had to make several tries ... inner path, outher path, left align, right align.
- in some cases the Macro fails if certain dimensions are too small (see red stairs with small distance between flights, i.e. 35cm in attachment).
- as you already mentioned sometimes splines actually have some problems.
Despite these minor issues, I think your tool can be a huge help for modeling stairs.
BTW is there a way to control step dimensions and therefore step numbers in the zones between the flights?
Thank you again and kind regards
stairs.png
- Yes I get your first point, it would be more logical that stairs are created in the order you select the edges rather than in the order you draw them. But I am really an amateur when it comes to coding so this was the best I could do It is not perfect but I hope it is usable.
- Unfortunately it is necessary to just try things out until it works with the tool. Because of the way how this macro is designed it is necessary to manually change the alignment of the stairs. I tried to make it automatic but the calculation time is really long then, so I just left the manual approach. I would like to refine the stairs later, so they become parametric and that users can change all the options in the property menu.
- For the third problem, I think I fixed it now. I don’t have the macro here now but when I do I will attach the fixed one.
- And yes the splines are problematic. I really don’t know what could be the cause of that
Thank you, it means a lotthree_d wrote: ↑Fri May 14, 2021 5:53 pm Excellent!
I just tried your amazing work
I tested different types of the stairs...but as you already know, it takes some time to build them. For the rest, everything worked fine and without any major problem.
Thank you very much for great work that you've done!
Yes the biggest drawback is the computation time. It is mostly because of all the boolean unions that are done in the background. Best not to go over 50 stairs.
I will focus on some other things now, primarily the BIM Object Library, to improve it a bit. So I will work slowly on the stairs from time to time(it is better to mix things up when coding, working just on one thing gets boring ). But yeah the plan is to make them parametric later and add a couple of more options to them. Also if I manage to make a railing that would be cool.
Re: [Working Macro][work in progress] Curved Path Stairs
Seems good have a team here to code, test, find bugs, comment etc. !!! Looks really great, keep going
Hope @yorik might have a look and give some direction !
Hope @yorik might have a look and give some direction !
Re: [Working Macro][work in progress] Curved Path Stairs
Thanks Yes getting feedback is really important when making something like this, thanks people
And yes I hope Yorik could give some advice, I have much to learn about programming in FreeCAD.