How would you generate those profiles for stairs with nosing details?
[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: [Working Macro][work in progress] Curved Path Stairs
Hmmm, the original approach to create the face of the Tread (and Riser I think) seems good to produce the Tread (with or without nosing) by simple extrusion. And in the original ArchStair object, these solids are simply collected as a Compound (to my memory, no need boolean operation).
The CPU intensive operation discussed seems to be generating the solid of the Stairs which has a sloping bottom - to my understanding each step as an rectangular extrusion to boolean fuse with a 'triangular' solid in sectional profile, and these steps are boolean fuse together one by one - my understanding correct ? I just have a glance over the code
By the way, would a Part.Wedge do the trick to save 1 boolean fuse operation ?
Thanks.
The CPU intensive operation discussed seems to be generating the solid of the Stairs which has a sloping bottom - to my understanding each step as an rectangular extrusion to boolean fuse with a 'triangular' solid in sectional profile, and these steps are boolean fuse together one by one - my understanding correct ? I just have a glance over the code
By the way, would a Part.Wedge do the trick to save 1 boolean fuse operation ?
Thanks.
Re: [Working Macro][work in progress] Curved Path Stairs
For this scenario, seems a 'centre' align option (and algorithm) needs to be added ? - The selected path define the alignment of step/tread, and create the outline / face of the tread, by offsetting to both sides.
Doable ?
Re: [Working Macro][work in progress] Curved Path Stairs
Hi @paullee,
thanks a lot for your reply. I think this approach would make a lot of sense. So if I understand you correctly the user would have only to select a left and a right path, give a step number and a stair height and then both paths could be devided into the same steps number with constant treads. For both path the 3D-profiles could be generated and then a single loft between those could make the stair body?
Maybe not necessarily. Adding one vector for the left path with the values Delta_li/Sum_Delta_li and another one for the right path with the values Delta_ri/Sum_Delta_ri could also do the job. What do you think?
As a proof of concept I will see if I can try to do these steps by hand for my oval stair, see if I succeed to create the stair body and how long it will take to create the curved left and right surfaces (using a polyline or a spline for the lower profile curve?) and the loft operation.
Cheers
Re: [Working Macro][work in progress] Curved Path Stairs
Thanks for the sketch, yes that should be more or less what I am conceiving - the original ArchStair generate the sectional profile / face, then simply extrude 'orthogonally'.balrobs wrote: ↑Sun Jan 23, 2022 6:10 pm thanks a lot for your reply. I think this approach would make a lot of sense. So if I understand you correctly the user would have only to select a left and a right path, give a step number and a stair height and then both paths could be devided into the same steps number with constant treads. For both path the 3D-profiles could be generated and then a single loft between those could make the stair body?
...
handsketch.jpeg
As a proof of concept I will see if I can try to do these steps by hand for my oval stair, see if I succeed to create the stair body and how long it will take to create the curved left and right surfaces (using a polyline or a spline for the lower profile curve?) and the loft operation.
If there are 2 profiles/faces, hopefully each segment in either profile corresponds to each other correctly. One issue seem the '3d profile' maybe some elliptical, if the 2d floor layout is an arc - pardon my mathematic
Hmm, would it be able to generate a face then by simple Part.Face(Curvilinear profile of each step) then, or need Curve/Surface WB ?
You may try creating 2 or 3 steps to prove the concept.
Re: [Working Macro][work in progress] Curved Path Stairs
I re-modeled my oval stair "by hand" following as much as possible your "loft-approach". This are my steps:
- draw with sketcher an inner and outer stair path on the xy-plane
- extrude them with part:extrude in z-direction
- create a sketch for the outer-path and map it with curves:map_sketch_on_surface on the outer extrusion
- do the same for the inner extrution
- make a loft between the outer and inner profile with curves:loft_profile_objects
One thing I do not understand yet is why the sketck mapping doesn't produce equal tread length along the paths
Re: [Working Macro][work in progress] Curved Path Stairs
balrobs wrote: ↑Mon Jan 24, 2022 2:26 pm I re-modeled my oval stair "by hand" following as much as possible your "loft-approach". This are my steps:oval_stairs.JPG
- draw with sketcher an inner and outer stair path on the xy-plane
- extrude them with part:extrude in z-direction
- create a sketch for the outer-path and map it with curves:map_sketch_on_surface on the outer extrusion
...
All steps happen without delay ... only when it comes to TechDraw things slow down significantly.
One thing I do not understand yet is why the sketck mapping doesn't produce equal tread length along the paths
Great ! This is slightly different from what I was originally conceiving but inspiring
- The most importantly consideration is whether the approach save time afterall
- Original idea is to construct the 3d-profile through python (Complicated mathematics ? And not sure if it form a face though conceptually develop-able)
- With the SketchOnSurface, I just input a Thickness (-ve) e.g. at the Inner-mapped Sketch then it create a solid, skip lofting with the other (the Outer-mapped Sketch)
- It seem with this approach the angle of each tread is consistent?
- No much idea the algorithm of the SketchOnFace
- Now there are 3 solids to compare the difference in construction
Re: [Working Macro][work in progress] Curved Path Stairs
It's just an attempt to find a way to better control the steps arrangement ... and it's far from working
The main reason is that SketchOnFace doesn't map the stair profile as I would expect it. Firstly even when the horizontal lengths of the stair profile and the face are identical the tread length are distorted. Secondly it seem as if the SketchOnFace command couldn't work on surfaces which are based on wires with more then one segment.
I will keep trying
Yes, your approach leads to a much consistent result
Re: [Working Macro][work in progress] Curved Path Stairs
Maybe someone can have some gap to analysis the geometrical difference with these few approaches, to understand the algorithm, so get more certain resultbalrobs wrote: ↑Tue Jan 25, 2022 2:06 pm The main reason is that SketchOnFace doesn't map the stair profile as I would expect it. Firstly even when the horizontal lengths of the stair profile and the face are identical the tread length are distorted. Secondly it seem as if the SketchOnFace command couldn't work on surfaces which are based on wires with more then one segment.
By the way, Curve wb has a tool to sew several segment of edges into one.
Re: [Working Macro][work in progress] Curved Path Stairs
Thanks @paulee for your hint
With your Curve WB tool (join selected edges into a bspline curve) I was able to solve my mentioned problems and model a generic(?) curved stair by drawing the inner and outher profil and therefore better control the steps arrangement.
Unfortunately the profile drawing is quite a tedious task ... maybe it could make sense to automate this in some way ... being in sketcher would then allow the user to make fine adjustments
Thank you again for your help
- Attachments
-
- CurvedStairRC_LoftApproach_rr.FCStd
- (220.94 KiB) Downloaded 32 times