Arch Grid - Build Arch Window?

A forum dedicated to the Arch module development
paullee
Posts: 724
Joined: Wed May 04, 2016 3:58 pm

Arch Grid - Build Arch Window?

Postby paullee » Wed Mar 21, 2018 12:57 pm

Hi, I am re-visiting the Arch Grid wiki https://www.freecadweb.org/wiki/Arch_Grid

Anybody has found the way to build an Arch Window using Arch Grid as a base? Found no other information on this!

Thanks for any hints!
600px-Arch_Grid_example.jpg
600px-Arch_Grid_example.jpg (48.5 KiB) Viewed 558 times
User avatar
yorik
Site Admin
Posts: 9696
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Grid - Build Arch Window?

Postby yorik » Wed Mar 21, 2018 11:11 pm

You need series of closed loops to make window frames. The one I did in the image above was by using Part Offset2D on top of an Arch Grid, then make the window from it.
paullee
Posts: 724
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Grid - Build Arch Window?

Postby paullee » Mon Mar 26, 2018 1:04 pm

Ok, understand how it works now! :)

I have further attempted to understand the ArchWindow.makeWindow code

Code: Select all

def makeWindow(baseobj=None,width=None,height=None,parts=None,name="Window"):
  1. So it seem by passing an object with Wires + a series of strings defining the "Window Parts" to makeWindow function, it would produce an window object, right? (Yet to test )
  2. It seem (tested this workflow) unlike ArchWall / Structure, the Additions / Subtractions in ArchWindows does nothing right?
    I try to create a Part object to simulate some kind of fins and 'Add' to it, nothing.
Thanks again!
Screenshot from 2018-03-26 20-46-20.png
Screenshot from 2018-03-26 20-46-20.png (173.21 KiB) Viewed 324 times
User avatar
yorik
Site Admin
Posts: 9696
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Grid - Build Arch Window?

Postby yorik » Mon Mar 26, 2018 2:43 pm

paullee wrote:
Mon Mar 26, 2018 1:04 pm
It seem (tested this workflow) unlike ArchWall / Structure, the Additions / Subtractions in ArchWindows does nothing right?
Hmm yeah, that's possible indeed... I must check. It's possible that I didn't enable Additions/Subtractions, because I didn't know how to cope with the different solids in a window...
paullee
Posts: 724
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Grid - Build Arch Window?

Postby paullee » Mon Mar 26, 2018 11:27 pm

yorik wrote:
Mon Mar 26, 2018 2:43 pm

Hmm yeah, that's possible indeed... I must check. It's possible that I didn't enable Additions/Subtractions, because I didn't know how to cope with the different solids in a window...
  1. Maybe it is not 'legitimate' but I add Add+ a sketch to a Window Object just to 'pair' them up - SO, it is fine if Add+ does not do anything now (and would accept in Addition but ignore any action over those objects w/o a shape etc. in future) It is a very convenient workaround for Compound :)
  2. In addition to above, maybe if the Add+ objects are solid, just makeCompound to it as if it is another solid panel (or need to define it in WindowParts?)

    I try to extrude a profile to act like a projecting fin on top of a window frame - a profile other than rectangular in shape that cannot be made in WindowObject currently. So it provide flexibility for user to define more complex profile rather than writing more codes for non-typical profiles?
Just some ideas, thanks anyway.
User avatar
yorik
Site Admin
Posts: 9696
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Grid - Build Arch Window?

Postby yorik » Tue Mar 27, 2018 12:27 am

Yeah of course, one should allow to build a window from several "blocks", not just by the sketch + WindowParts.

But there is still something to define... In case of a subtraction, it's easy: Subtract the subtracted object from each of the solids of the window. But imagine you are adding a volume, that spans on both the glass and the frame of a window. What do we do in that case?
paullee
Posts: 724
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Grid - Build Arch Window?

Postby paullee » Fri Mar 30, 2018 12:58 am

yorik wrote:
Tue Mar 27, 2018 12:27 am
Yeah of course, one should allow to build a window from several "blocks", not just by the sketch + WindowParts.

But there is still something to define... In case of a subtraction, it's easy: Subtract the subtracted object from each of the solids of the window. But imagine you are adding a volume, that spans on both the glass and the frame of a window. What do we do in that case?
I just do some random experiment, think for a while but without any big picture in mind.

I experiment to use Arch Frame to do a profile that Arch Window can't produce currently (screenshot), and i think if Window Add+ can just accept it that's already fine. So at least they become same object, move together...

Maybe just let each Add+Object to identify what is it: Frame, Glass panel, Solid Panel, Louvre (or add some other options), then just compound it?


BTW, just learning python....would it be better if WindowParts = [ (name, type (Frame, Glass Panel or Solid Panel), wires+hinge+opening mode, thickness, offest), (...another group), (...another group)...]
Screenshot from 2018-03-30 08-49-54.png
Screenshot from 2018-03-30 08-49-54.png (229.5 KiB) Viewed 191 times
User avatar
yorik
Site Admin
Posts: 9696
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Grid - Build Arch Window?

Postby yorik » Fri Mar 30, 2018 2:04 am

Note that a simple way that works already, is to put all your pieces into a Part compound, and use that compound as the Base of a window (in that case, WindowParts will have no effect).
paullee
Posts: 724
Joined: Wed May 04, 2016 3:58 pm

Re: Arch Grid - Build Arch Window?

Postby paullee » Fri Mar 30, 2018 3:05 am

Good morning/evening!

Done a test and read again the code (I do not really understand every line), it seem there could be only 1 object in Base.

So if used an 'custom' made object in Base then lost all the 'automatic' function ArchWindow provide right?

Concept:
- - - Arch Window (by Preset or Base Sketch)
|
|
| - Add + If found a Shape (otherwise skip)
| e.g. a Custom Profile projecting Head or Sill (by Part, Arch Frame etc.)


Just some thought on ArchWindow in providing more flexibility in creating complex shape.

Screenshot from 2018-03-30 11-04-31.png
Screenshot from 2018-03-30 11-04-31.png (165.99 KiB) Viewed 184 times
User avatar
yorik
Site Admin
Posts: 9696
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Arch Grid - Build Arch Window?

Postby yorik » Fri Mar 30, 2018 8:23 pm

Yes, the idea for all Arch objects is this: If you give it a shape, as Base, that can be used to "build" the final object (a line, a wire, a face... depending on the type), then the "internal engine" of the object is used to build the shape. If you give it a solid shape, it considers that you already built your own shape with other tools, and nothing more is done.

I think this is pretty powerful because it allows you to use just *any* possible shape for any of the arch types. So you can perfectly well build a totally valid BIM model fully with PartDesign, or even with other software.