A new window tool

a window in FreeCAD

We have a window tool in FreeCAD already. It can do both windows and doors (in the BIM workbench it is split into two tools, window and door, but underneath it's the same tool). However, it has many limitations and annoyances. It is clear we need a new window tool for FreeCAD that compares decently to other BIM software. It should allow to easily:

  1. Build a window from scratch
  2. Place a window precisely relative to the edges of a wall
  3. Select a window type from a list of predefined types
  4. Change the type of already placed windows
  5. Support advanced annotation display such as opening graphics or tags

Advantages of the current tool

  • It is highly flexible: There is virtually no type of window that you can't make with it. It can have components of any shape, Any part can be made openable, and even custom parts like handles can be made stick to the openable parts. Openings can also be highly customized.

the current arch window tool

  • It is compact: The window object is mostly self-contained, and just needs an external shape like a sketch to work.

  • It is based on wire loops, which makes it very intuitive to design. The way you would draw a window in a 2D drawing is what you need to do to build a BIM window.

an underlying sketch of a window

Problems of the current tool

  • Placement is cumbersome: One mostly needs to place a window into a wall, and position a window relatively to the edges of that wall. Ex: at 100cm from the left border of that wall. That is currently impossible to achieve in one go, one needs to basically place the window anywhere then move it into place

  • No good support for instances: Ideally, in a project, one defines windows types, and you should be able to pick a window in a list of types, and place it. You should also be able to change the type of a window. It should also play nice with IFC types.

  • Creating window components is complicated and non-intuitive. The interface is not well designed.

the interface to create new components

Conclusions & what we need

  • We need a better placement system. A way to place a window relatively to its host wall. Maybe this could be done entirely with the current Draft placement/grid/snapping system? So it would be usable by other tools as well. Ex:

    1. Place the working plane on the face of a wall
    2. Press the window button
    3. "Snap" an edge, or a vertex
    4. You can now insert coordinatess relative to that vertex or edge Basically this could be resumed in a "recenter" snap tool that can recenter the working plane on the currently snapped point:
      1. Define a new shortcut
      2. On pressing that shortcut, the working plane is recentered on the current snap location
      3. Relative coordinates get updated automatically
      4. Auto mode does not change
      5. Also allow to set a working plane on "face and edge" selection
  • We need a better UI for the window tool. Something more streamlined with a proper (tree-based?) view of the components, with a properties view, and what component is subject to what other, and more direct visual feedback on changes. Basically, an UI similar to the FreeCAD combo view. It should take more advantage of the current FreeCAD task system, with more use of collapsible panels, like the Sketcher does.

  • We need support for IFC types with:

    • A way to turn a window into a type, and manage the positioning
    • A way to place a window by choosing a type
    • A way to change the type of a window
    • A way to list windows by type
  • We need to be able to define common components such as frames or panels without the need for a sketch, just by giving dimensions. That would account for the majority of people's needs and would reduce dependency on other objects.

  • We need a smart way to attach custom components made with other tools and workbenches. This includes also custom opening shapes.

  • We need a way to display additional, custom geometry and text like opening graphics and tag annotations

To conclude, I think the main points here are that we can keep the existing tool structure, but it needs more properties, both to define window parameters and to allow custom components, a new UI, and the Draft snapping system needs additional behaviours.