[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
User avatar
regis
Posts: 725
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: Mon Jul 09, 2018 6:19 am
regis wrote: Sun Jul 08, 2018 11:37 pm
Here is a visual test of what I did, tell me what i'm not doing right.
I also tested the one line to see if it would generate anything,
OK, hang on, I see the python report message... need some time this evening to investigate why this is it.

Before then, I think you can still 'compose' manually /test with the new features though it does not 'automatically' compose the full staircase.
  1. Create 'in the air' 3 Arch Stairs objects, by clicking the button 3 times.
  2. As I see you already have 'Stairs', Stair 007', create just 1 more...
  3. In each of them, find Base property, and pick the 3 'edge' object for each of them (so 3 Arch Object, each with 1 of the 3 'edge' object
  4. In Stairs, you already have Line 001
    • I don't why but you have Nos of Step =0, set it to say 16, you will have steps now
    • Then, set Structure to 'Massive', Struture Thickness to say '150, now you have the full 'mass' :) (you may also try Tread Thickness...
  5. For Stair007, you may now select DWire001 in the 'Base' Property for the 'multi-edge' 'Landing
    • Now, you need to set similarly Structure to 'Massive', Struture Thickness to say '150 (not sure if need to set nos. of step = 1, I thought no but it seem it needs)
    • You should have a landing (sit on 'incorrect' level' though)
    • Find 'Last Sgement in Stairs007, and select the 'preceding segment' i.e. 'Stairs' (in Window, it needs to force recompute, and you have the landing in 'correct' level.
  6. Repeat similarly for the 'last' ArchStairs...if you create the last one 'in the air', you should now select Line002...and the stairs alread there (since this does not frustrate the python code sequence I intend...), final touch select Stairs007 in this Object's Last Segment
  7. Hopefully, you can have the full staircase now.
    (Add another Stairs Object to 'house the previous' 3 is just an idea to further group the objects....)

BTW, exciting to see what it is produced on TechDraw 8-)
Thanks I was able to follow some of the frew points but I get stuck here
paullee wrote: Mon Jul 09, 2018 6:19 am For Stair007, you may now select DWire001 in the 'Base' Property for the 'multi-edge' 'Landing
for some reason this doesn't generate or me
Attachments
Test_ ArchStairs_ code revision test_ regis_test2.fcstd
(243.76 KiB) Downloaded 49 times
Screenshot from 2018-07-09 09-56-12.png
Screenshot from 2018-07-09 09-56-12.png (412.11 KiB) Viewed 1779 times
paullee
Veteran
Posts: 5118
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 »

regis wrote: Mon Jul 09, 2018 1:59 pm
paullee wrote: Mon Jul 09, 2018 6:19 am For Stair007, you may now select DWire001 in the 'Base' Property for the 'multi-edge' 'Landing
for some reason this doesn't generate or me
For this 'manual' method, I find the missing puzzle is need to set the supposedly 'Landing' object's (Stair008) Flight property to 'Straight', otherwise currently it won't generate - seem better 'fix' this as this attribute is not 'meaningful' in this 'context'. EDIT: to let 'Landing' object (Stair008)to appear is just to let it 'recompute' - there should be something interrupted prevented it auto-recompute.

You have already the 'Landing' 'Last Segment' property set to last flight, so it pick up the elevation / z-coordinate.

What you need for the last bit is set the last flight 'Stairs009' 'Last Segment' to this intermediate landing ('Stairs008') and that's it!

BTW, thinking why the python run differently on your pc/ FC from mine????? - I am still using the 0.17 AppImage (see details attached), I think you are on 0.18_pre right??? Can you post your version / about info?

Maybe need a mentor now... :oops:
Screenshot from 2018-07-10 03-41-29.png
Screenshot from 2018-07-10 03-41-29.png (230.26 KiB) Viewed 1768 times
OS: "Fedora release 27 (Twenty Seven)"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13522 (Git)
Build type: None
Branch: releases/FreeCAD-0-17
Hash: 3bb5ff4e70c0c526f2d9dd69b1004155b2f527f2
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/HongKong (en_HK)
Attachments
Test_ ArchStairs_ code revision test_ regis_test2_rev.fcstd
(243.41 KiB) Downloaded 50 times
Last edited by paullee on Mon Jul 09, 2018 11:04 pm, edited 2 times in total.
paullee
Veteran
Posts: 5118
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 »

Fixed a problem - creating ArchStair with 1 base object no longer have error found in Report thus no need to recompute() to make it appear.

But still - creating a series of ArchStairs with > 1 (multiple) selection of base object no much clue why it fails on your side, normally here.... :!: :?:


Can you run with the ArchStairs.py below with 3 scenarios and capture Report output?-

1. Select the Line001 (1 edge only) and run ArchStairs.py again - hopefully no more error as discussed above.
2. Select the DWire001 (multiple-edges object) and run ArchStairs.py - the 'Landing' 'should' appear
3. Select all the 3 objects you create and run ArchStairs.py again


Thanks!

EDIT: With an object having multiple edge, it will create a Landing now regardless of Nos.of Steps.
Attachments
ArchStairs.py
(40.7 KiB) Downloaded 56 times
User avatar
regis
Posts: 725
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: Mon Jul 09, 2018 8:07 pm BTW, thinking why the python run differently on your pc/ FC from mine????? - I am still using the 0.17 AppImage (see details attached), I think you are on 0.18_pre right??? Can you post your version / about info?
Yes indeed you are right, :lol: :D I always like to mess with the Latest Free-cad builds when I decide to comb it down with testing parameters and features. :D How did you figure? Could that be associated to the problem of why It doesn't work well on mine?

OS: Linux Mint 18.3 Sylvia
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.14014 (Git)
Build type: None
Branch: master
Hash: f0252c80c2f6408e9c64120c24b9de6091ec57fb
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/Canada (en_CA)

paullee wrote: Mon Jul 09, 2018 8:07 pm Maybe need a mentor now...
We all need one


paullee wrote: Mon Jul 09, 2018 9:22 pm Can you run with the ArchStairs.py below with 3 scenarios and capture Report output?-
Ok now acquired your latest code that is 41.7 kb in size, up from a previous 40.2 kb and 41.3 kb, making some progress
paullee wrote: Mon Jul 09, 2018 9:22 pm 1. Select the Line001 (1 edge only) and run ArchStairs.py again - hopefully no more error as discussed above.
Screenshot from 2018-07-10 07-16-00.png
Screenshot from 2018-07-10 07-16-00.png (319.91 KiB) Viewed 1743 times
paullee wrote: Mon Jul 09, 2018 9:22 pm 2. Select the DWire001 (multiple-edges object) and run ArchStairs.py - the 'Landing' 'should' appear
Screenshot from 2018-07-10 07-13-26.png
Screenshot from 2018-07-10 07-13-26.png (383.59 KiB) Viewed 1743 times
Screenshot from 2018-07-09 09-56-12.png
Screenshot from 2018-07-09 09-56-12.png (412.11 KiB) Viewed 1743 times
paullee wrote: Mon Jul 09, 2018 9:22 pm 3. Select all the 3 objects you create and run ArchStairs.py again
Screenshot from 2018-07-10 07-17-55.png
Screenshot from 2018-07-10 07-17-55.png (321.1 KiB) Viewed 1743 times
I was wondering, can you create the code in such a way that the multi edge landing will not be activated and we can manualy place it at it's respective height?
I wonder if that could help lighten the code first make it work here, before repacking?
paullee
Veteran
Posts: 5118
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 »

regis wrote: Tue Jul 10, 2018 11:31 am I was wondering, can you create the code in such a way that the multi edge landing will not be activated and we can manualy place it at it's respective height?
I wonder if that could help lighten the code first make it work here, before repacking?
Yes for both, in fact manual always works :) ... before discussion... for a while I do not have idea what go wrong thinking (same python for both of us...) whilst helping another solving the Arch Window problem... I suddenly have an idea which may be obvious but worth to test (I download the 0.18_pre AppImage, extracting it then have this idea :idea: )...

So 2 ideas, 1st like what you say the obvious - How to Run the Extracted AppImage, 2nd is Just Test the Simple Feature first

How to Run the Extracted AppImage
  1. The obvious - The AppImage should run double clicking it...BUT
  2. As you should have extracted it into folders and files, ESPECIALLY REPLACED a file therein...
  3. If you still run the AppImage file itself, the Original Arch Mod (+ Original ArchStairs.py) 'inside' the AppImage file itself is run :!:
  4. INSTEAD, you should run the 'AppRun' inside the extracted folder 'squashfs-root'
  5. This may explain why the python report output differently - I AM OUT OF IDEA IF NOT :lol: :oops:
  6. (I am thinking how to explain this 'problem' and write in the Python Scripting Macors)

Simple Feature First
  1. Ok, like what you says, test and make it works bit by bit
  2. I 'added' a few 'features', 1st I remember is 'Landing Depth' which control its depth / length as originally code only adopt the Stair Width
  3. Select a flight of Stairs I created in the file I post here... So, try this parameter....if this works, prove 2 things works
    1. a simple feature / some parts of the experimental 'ArchStairs.py' works
    2. also the FC /AppImage etc. setting are fine
  4. OK, set the Flight to 'Straight' which is most simple
  5. Landings to 'At Center' only this one works in original code I think
  6. You should have a landing, then Landing Depth should control its Depth / Length..
BTW, as Length is used somewhere, I use Depth which may not make sense to English Native speaker (similarly for 'Return' Stairs), do comment what terms should be...
Screenshot from 2018-07-11 06-18-34.png
Screenshot from 2018-07-11 06-18-34.png (80.67 KiB) Viewed 1728 times
Screenshot from 2018-07-11 06-24-08.png
Screenshot from 2018-07-11 06-24-08.png (282.49 KiB) Viewed 1728 times
User avatar
regis
Posts: 725
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 10, 2018 10:24 pm INSTEAD, you should run the 'AppRun' inside the extracted folder 'squashfs-root'
Thanks for showing me that i'm not in the wrong folder. I was beginning to wonder if there weren't any .hidden folders somewhere.
Screenshot from 2018-07-10 19-18-27.png
Screenshot from 2018-07-10 19-18-27.png (65.64 KiB) Viewed 1710 times
Screenshot from 2018-07-10 19-18-02.png
Screenshot from 2018-07-10 19-18-02.png (55.53 KiB) Viewed 1710 times
paullee wrote: Tue Jul 10, 2018 10:24 pm OK, set the Flight to 'Straight' which is most simple
Landings to 'At Center' only this one works in original code I think
You should have a landing, then Landing Depth should control its Depth / Length..
Yeah with the normal stair tool it works
except, with the "draw a line -> Push stair tool" it doesn't generate
I thought that's was what your method was suggesting?
Screenshot from 2018-07-10 21-00-29.png
Screenshot from 2018-07-10 21-00-29.png (320.33 KiB) Viewed 1710 times
paullee wrote: Tue Jul 10, 2018 10:24 pm BTW, as Length is used somewhere, I use Depth which may not make sense to English Native speaker (similarly for 'Return' Stairs), do comment what terms should be...
Haha, I just casually call it U-stair like U-turn, but according to D.K Ching, where I refer most of my nomenclature and basic fundamentals, it is called a "Half Return Stair"
Screenshot from 2018-07-10 21-14-06.png
Screenshot from 2018-07-10 21-14-06.png (155.38 KiB) Viewed 1710 times
Hehe a bit of nice perspective to appreciate the random, unplanned perspective yield of the stair enigma
Screenshot from 2018-07-10 18-31-12.png
Screenshot from 2018-07-10 18-31-12.png (290.75 KiB) Viewed 1710 times
paullee
Veteran
Posts: 5118
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 »

regis wrote: Wed Jul 11, 2018 1:28 am Haha, I just casually call it U-stair like U-turn, but according to D.K Ching, where I refer most of my nomenclature and basic fundamentals, it is called a "Half Return Stair"
Glad to know you had already figured out the AppRun :D - which I thought should be the root cause! :(
Though glad to know the features are loaded. Only the 1st part of the code which automatically input parameters to set up each segment + link all segments fails....I should have another idea.
You can always tweak the properties in the Stairs Object to try all setting but need to set figure manually and correctly.

And thanks for D.K. Ching, study material loooong time ago! Then, I will keep Return Stair for short in the meantime.

And in the meantime, a glimpse on the progress on automatically generated railing...
Screenshot from 2018-07-12 07-59-20.png
Screenshot from 2018-07-12 07-59-20.png (247.01 KiB) Viewed 1687 times
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

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

Post by yorik »

good job guys! No time to test right now, but keeping an eye here...
User avatar
regis
Posts: 725
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 »

I was playing with more of the simple stair settings available at the moment to discover what you can do. I'm pretty impressed at what is already currently possible. You can already do complex stairs of some sort.
Attachments
Screenshot from 2018-07-12 22-04-05.png
Screenshot from 2018-07-12 22-04-05.png (354.83 KiB) Viewed 1659 times
paullee
Veteran
Posts: 5118
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, the command should now add a simple railing on landing as experiment ... on one side only :oops:
(new ArchStairs.py attached)

That is, select a multi-edge object, click the button, there should be a landing + 1 railing.
yorik wrote: Thu Jul 12, 2018 1:06 am
Hi, see if you could offer some help on using Draft.MakeWire?

Basically, the experimental ArchStair use Draft.MakeWire on new OutlineLeft & OutlineRight attributes which include a series of vectors generated representing the path of railing ...see below (hardcoded 90mm from edge 900mmH from landing)

For reasons I can't figure out, it always return below for the '1st' vector series -
- "Too many wires in the base shape. Unable to build the base path"

If I swap the sequence of OutlineLeft / OutlineRight 'to Draft.makeWire', the railing on the other 'Hand' side is created and the opposite side is not created then! I.E., there should be no problem on the vector series.... no idea what's wrong :?:

Thanks for any idea!

Code: Select all

 
            lRailWire = Draft.makeWire(stair.OutlineLeft)
            rRailWire = Draft.makeWire(stair.OutlineRight)
            lRail = ArchPipe.makePipe(lRailWire,50)
            rRail = ArchPipe.makePipe(rRailWire,50)
Vectors

Code: Select all

DEBUG - outlineP1P2, outlineP3P4, outline
[Vector (3750.0, -90.0, 3900.0), Vector (6160.0, -90.0, 3900.0), Vector (6160.0, -3032.8611542376734, 3900.0), Vector (8404.318303359612, -5696.499059728652, 3900.0), Vector (6674.949793716716, -8060.839990482926, 3900.0)]

[Vector (6013.099952389854, -7576.737948000551, 3900.0), Vector (7362.202356033304, -5732.285470158311, 3900.0), Vector (5340.0, -3332.262781736474, 3900.0), Vector (5340.0, -910.0, 3900.0), Vector (3750.0, -910.0, 3900.0)]

[Vector (3750.0, -90.0, 3900.0), Vector (6160.0, -90.0, 3900.0), Vector (6160.0, -3032.8611542376734, 3900.0), Vector (8404.318303359612, -5696.499059728652, 3900.0), Vector (6674.949793716716, -8060.839990482926, 3900.0), Vector (6013.099952389854, -7576.737948000551, 3900.0), Vector (7362.202356033304, -5732.285470158311, 3900.0), Vector (5340.0, -3332.262781736474, 3900.0), Vector (5340.0, -910.0, 3900.0), Vector (3750.0, -910.0, 3900.0), Vector (3750.0, -90.0, 3900.0)]

Too many wires in the base shape
Unable to build the base path
Only the Right Hand Side ! :!:
Screenshot from 2018-07-14 09-33-34.png
Screenshot from 2018-07-14 09-33-34.png (324.49 KiB) Viewed 1644 times
Or Only the Left Hand Side !!! :?:
Screenshot from 2018-07-14 09-54-25.png
Screenshot from 2018-07-14 09-54-25.png (273.9 KiB) Viewed 1644 times
regis wrote: Fri Jul 13, 2018 10:19 am I was playing with more of the simple stair settings available at the moment to discover what you can do. I'm pretty impressed at what is already currently possible. You can already do complex stairs of some sort.
Hi, nice TechDraw output!

See if the railing feature works on your side. In fact, you may also try again selecting multiple object ... I use 'original' Yorik's method to 'run' FreeCAD command.
Attachments
ArchStairs.py
(45.65 KiB) Downloaded 53 times
Post Reply