Arch Window: Difference between revisions

From FreeCAD Documentation
mNo edit summary
No edit summary
(42 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:44-->
{{Docnav
|[[Arch_Reference|Reference]]
|[[Arch_SectionPlane|Section Plane]]
|[[Arch_Module|Arch]]
|IconL=Arch_Reference.svg
|IconR=Arch_SectionPlane.svg
|IconC=Workbench_Arch.svg
}}

<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand|Name=Arch Window|Workbenches=[[Arch Module|Arch]]|MenuLocation=Arch → Window|Shortcut=W I|SeeAlso=[[Arch Wall|Arch Wall]]}}
|Name=Arch Window
|MenuLocation=Arch → Window
|Workbenches=[[Arch_Module|Arch]]
|Shortcut={{KEY|W}} {{KEY|I}}
|SeeAlso=[[Arch_Wall|Arch Wall]], [[Arch_Add|Arch Add]]
}}


==Description== <!--T:2-->
==Description== <!--T:2-->


<!--T:3-->
<!--T:3-->
The Window is a base object for all kinds of "embeddable" objects, such as windows and doors. It is designed to be either independent, or "hosted" inside another component such as an [[Arch Wall]], [[Arch Structure]], or [[Arch Roof]]. It has its own geometry, that can be made of several solid components (commonly a frame and inner panels), and also defines a volume to be subtracted from the host objects, in order to create an opening.
An [[Arch Window|Arch Window]] is a base object for all kinds of "embeddable" objects, such as windows and doors. It is designed to be either independent, or "hosted" inside another component such as an [[Arch Wall|Arch Wall]], [[Arch Structure|Arch Structure]], or [[Arch Roof|Arch Roof]]. It has its own geometry, that can be made of several solid components (commonly a frame and inner panels), and also defines a volume to be subtracted from the host objects, in order to create an opening.


<!--T:4-->
<!--T:4-->
Window objects are based on closed 2D objects, such as [[Draft Rectangle]]s or [[Sketcher Sketch]]es, that are used to define their inner components. The base 2D object must therefore contain several closed wires, that can be combined to form filled panels (one wire) or frames (several wires).
Window objects are based on closed 2D objects, such as [[Draft Rectangle|Draft Rectangle]]s or [[Sketcher Workbench|Sketches]], that are used to define their inner components. The base 2D object must therefore contain several closed wires, that can be combined to form filled panels (one wire) or frames (several wires).


<!--T:26-->
<!--T:26-->
The Window tool features several '''presets'''; this allows the user to create common types of windows and doors with certain editable parameters, without the need for the user to create the base 2D objects and components manually.
The Window tool features several '''presets'''; this allows the user to create common types of windows and doors with certain editable parameters, without the need for the user to create the base 2D objects and components manually.


<!--T:22-->
<!--T:36-->
All information applicable to an [[Arch Window|Arch Window]] also applies to an [[Arch Door|Arch Door]], as it's the same underlying object. The main difference between a Window and a Door is that the Door has an internal panel that is shown opaque (the door itself), while the Window has a panel that is partially transparent (the glass).

</translate>
[[Image:Arch Window example.jpg|600px]]
[[Image:Arch Window example.jpg|600px]]
<translate>
<!--T:22-->
{{Caption|Window constructed on top of a [[Draft Rectangle|Draft Rectangle]], then inserted into an [[Arch Wall|Arch Wall]]. Using the [[Arch Add|Arch Add]] operation automatically cuts a correct opening in the host wall.}}


</translate>
<!--T:5-->
In the above image, a window is constructed on top of a [[Draft Rectangle]], then inserted into an [[Arch Wall]]. Using the [[Arch Add]] operation automatically cuts a correct opening in the host wall.

<!--T:23-->
[[Image:Arch Window example2.jpg|600px]]
[[Image:Arch Window example2.jpg|600px]]
<translate>
<!--T:41-->
{{Caption|Complex window being constructed on top of a [[Sketcher Workbench|Sketch]]. When entering the window's edit mode you can create different components, set their thickness, and select and assign wires from the sketch to them.}}


<!--T:6-->
==Usage== <!--T:7-->
The above image shows a more complex window being constructed on top of a [[Sketcher Sketch]]. When entering the window's edit mode, you can create different components, set their thickness, and select and assign wires from the sketch to them.

All information applicable to an [[Arch Window]] also applies to an [[Arch Door]], as it's the same underlying object. The main difference between a Window and a Door is that the Door has an internal panel that is shown opaque (the door itself), while the Window has a panel that is partially transparent (the glass).

==How to use== <!--T:7-->


===Using a preset=== <!--T:8-->
===Using a preset=== <!--T:8-->


<!--T:27-->
<!--T:27-->
# Press the {{Button|[[Image:Arch Window.svg|16px]] [[Arch Window|Arch Window]]}} button, or press {{KEY|W}} then {{KEY|I}} keys.
# Optionally, select an Arch object. If no object is selected, the window will be inserted in the object under the mouse when placing the window.
# Select one of the presets in the list.
# Press the {{KEY|[[Image:Arch Window.png|16px]] [[Arch Window]]}} button, or press {{KEY|W}} then {{KEY|I}} keys
# Fill out the desired parameters.
# Select one of the presets in the list
# In the [[3D view|3D view]], move the window to the location where you wish to place it. If you move the pointer over an [[Arch Wall|Arch Wall]], the outline of the window should align itself with the face of that object.
# Fill out the desired parameters
# Click on the [[3D view|3D view]] with the mouse, or press the {{KEY|Enter}} key three times to confirm the X, Y, Z coordinates of the placement.
# Press the '''OK''' button

<!--T:47-->
{{Emphasis|Note:}} if you install the "Parts Library" from the [[AddonManager|AddonManager]], the window tool will search this library for additional presets. These presets are FreeCAD files containing a single window based on a parametric sketch that has named constrains. You may place additional presets in the {{incode|parts_library}} directory so that they are found by the window tool.

</translate>
{{Code|code=
$ROOT_DIR/Mod/parts_library/Architectural\ Parts/Doors/Custom/
$ROOT_DIR/Mod/parts_library/Architectural\ Parts/Windows/Custom/
}}

<translate>
<!--T:48-->
The {{incode|$ROOT_DIR}} is the user's directory where FreeCAD configuration, macros, and external workbenches are stored.
* On Linux it is usually {{incode|/home/username/.FreeCAD/}}
* On Windows it is usually {{incode|C:\Users\username\Application Data\FreeCAD\}}
* On Mac OSX it is usually {{incode|/Users/username/Library/Preferences/FreeCAD/}}


===Creating from scratch=== <!--T:28-->
===Creating from scratch=== <!--T:28-->


<!--T:29-->
<!--T:29-->
# Optionally, select a face on the Arch object where you want the window to be incuded
# Optionally, select a face on the Arch object where you want the window to be included.
# Switch to the [[Sketcher Module|Sketcher Workbench]]
# Switch to the [[Sketcher Module|Sketcher Workbench]].
# Create a new sketch
# Create a new sketch.
# Draw one or more closed wires
# Draw one or more closed wires (loops).
# Close the sketch
# Close the sketch.
# Switch back to the [[Arch Module|Arch Workbench]]
# Switch back to the [[Arch Module|Arch Workbench]].
# Press the {{KEY|[[Image:Arch Window.png|16px]] [[Arch Window]]}} button, or press {{KEY|W}} then {{KEY|I}} keys
# Press the {{Button|[[Image:Arch Window.svg|16px]] [[Arch Window|Arch Window]]}} button, or press {{KEY|W}} then {{KEY|I}} keys.
# Enter Edit mode by double-clicking the window in the tree view, to adjust the window components
# To adjust the window components and various properties, enter the window [[task panel|task panel]] by double-clicking on the created object in the [[tree view|tree view]].

<!--T:49-->
{{Emphasis|Note:}} when creating the sketch, pay close attention to the creation order of the loops; the numbering of the "wires" in the [[task panel|task panel]] ("Window elements") depends on this.


==Presets== <!--T:30-->
==Presets== <!--T:30-->
Line 89: Line 125:
* Windows share the common properties and behaviours of all [[Arch Component|Arch Components]]
* Windows share the common properties and behaviours of all [[Arch Component|Arch Components]]
* If the '''Auto-include'''checkbox on the Window creation task panel is unchecked, the window won't be inserted into any host object on creation.
* If the '''Auto-include'''checkbox on the Window creation task panel is unchecked, the window won't be inserted into any host object on creation.
* Add a selected window to a [[Arch Wall|wall]] by selecting both, then pressing the {{KEY|[[Image:Arch Add.png|16px]] [[Arch Add]]}} button.
* Add a selected window to a [[Arch Wall|wall]] by selecting both, then pressing the {{Button|[[Image:Arch Add.svg|16px]] [[Arch Add|Arch Add]]}} button.
* Remove a selected window from a [[Arch Wall|wall]] by selecting the window, then pressing the {{KEY|[[Image:Arch Remove.png|16px]] [[Arch Remove]]}} button.
* Remove a selected window from a [[Arch Wall|wall]] by selecting the window, then pressing the {{Button|[[Image:Arch Remove.svg|16px]] [[Arch Remove|Arch Remove]]}} button.
* When using presets, it is often convenient to turn the "Near" [[Draft Snap]] on, so you can snap your window to an existing face.
* When using presets, it is often convenient to turn the "Near" [[Draft Snap|Draft Snap]] on, so you can snap your window to an existing face.
* The hole created by a window in its host object is determined by two properties: '''Hole Depth''' and '''Hole Wire''' ({{Version|0.17}}). The Hole Wire number can be picked in the 3D view from the window's task panel available when double-clicking the window in the tree view
* The hole created by a window in its host object is determined by two properties: {{PropertyData|Hole Depth}} and {{PropertyData|Hole Wire}} ({{Version|0.17}}). The Hole Wire number can be picked in the 3D view from the window's task panel available when double-clicking the window in the tree view
* Windows can make use of [[Arch MultiMaterial|Multi-Materials]]. The window will search in the attached Multi-Material for material layers with a same name for each of its window component, and use it if any is found. For example, a component named "OuterFrame" will search in the attached Multi-Material, for a material layer named "OuterFrame". If such material layer is found, its material will be attributed to the OuterFrame component. The thickness value of the material layer is disregarded.
* Windows can make use of [[Arch MultiMaterial|Multi-Materials]]. The window will search in the attached Multi-Material for material layers with a same name for each of its window component, and use it if any is found. For example, a component named "OuterFrame" will search in the attached Multi-Material, for a material layer named "OuterFrame". If such material layer is found, its material will be attributed to the OuterFrame component. The thickness value of the material layer is disregarded.

==Doors== <!--T:14-->

<!--T:15-->
Doors can be made easily with the window tool, you only need to draw the base of the inner wire touching the exterior wire like in the image below.

<!--T:25-->
[[Image:Arch door.jpg|600px|Door]]


==Openings== <!--T:33-->
==Openings== <!--T:33-->

<!--T:37-->
{{Emphasis|See also:}} [[Tutorial for open windows|Tutorial for open windows]]


<!--T:34-->
<!--T:34-->
Doors and windows can appear partially or fully open in the 3D model, or can display opening symbols both in plan and/or elevation. Consequently, these will also appear in extracted 2D views generated by [[Draft Shape2DView]] or [[TechDraw Workbench]] or [[Drawing Workbench]]. To obtain this, at least one of the window components must have a hinge and an opening mode defined (see the [[#Building components]] above). Then, using the '''Opening''', '''Symbol Plan''' or '''Symbol Elevation''' properties, you can configure the appearance of the window:
Doors and windows can appear partially or fully open in the 3D model, or can display opening symbols both in plan and/or elevation. Consequently, these will also appear in extracted 2D views generated by [[Draft Shape2DView|Draft Shape2DView]] or [[TechDraw Workbench|TechDraw Workbench]] or [[Drawing Workbench|Drawing Workbench]]. To obtain this, at least one of the window components must have a hinge and an opening mode defined (see the [[#Building components|Building components]] above). Then, using the {{PropertyData|Opening}}, {{PropertyData|Symbol Plan}} or {{PropertyData|Symbol Elevation}} properties, you can configure the appearance of the window:


</translate>
[[Image:Arch window openings.png|600px]]
<translate>
<!--T:35-->
<!--T:35-->
[[Image:Arch window openings.png|600px|A door showing from left to right the Symbol Plan, Symbol Elevation and Opening properties at work]]
{{Caption|A door showing the symbol plan, symbol elevation and opening properties at work}}

==Defining window types== <!--T:50-->

<!--T:51-->
Windows can also take advantage of other tools, specifically [[PartDesign Workbench|PartDesign]] workflows, to define a type. A type is an object that defines the shape of the window. This is specially well suited to work with [[App Part|App Parts]]:

<!--T:52-->
[[Image:Arch window type example.png|800px]]

<!--T:53-->
[https://github.com/FreeCAD/Examples/blob/master/Arch_Example_Files/Window_Type.FCStd Download the example file shown above]

===Example workflow=== <!--T:54-->

<!--T:55-->
* Create a window frame object, a glass panel, and any other window component you need, using [[Part|Part Workbench]] or [[PartDesign Workbench|PartDesign]] tools.
* For example, create a base rectangular sketch for your window, then a profile sketch for the frame, and create a [[Part Sweep]] to sweep the profile around the base sketch. Create a [[Part Offset2D]] from the base sketch, then a [[Part Extrude]] to create the glass panel
* Make sure all these pieces have a unique, menaingful name (for example, "Frame" or "Glass Panel")
* Create an [[App Part]], and place all your subcomponents in it
* Create a volume to be subtracted from the wall, for example by extruding the base sketch. Add this volume to the App Part. Make sure the volume is turned off
* If using FreeCAD version 0.19 or later, you can add 3 properties to your App Part, by right-clicking its properties view, and check "Show All". Add the following properties (all of them are optional, the group doesn't matter):
** '''Height''' as a PropertyLength and link it, for example, to a vertical constraint of your base sketch
** '''Width''' as a PropertyLength and link it, for example, to a horizontal constraint of your base sketch
** '''Subvolume''' as a PropertyLink and link it to the volume to be subtracted that we created above
** '''Tag''' as a PropertyString

===Materials=== <!--T:56-->

<!--T:57-->
Our window type is now ready. We can create window objects from it, simply by selecting the App Part and pressing the window button. The "Height", "Width", "Subvolume" and "Tag" properties of the window will be linked to the corresponding property of the App Part, if existing.

<!--T:58-->
To build a material for type-based windows:
* Create a [[Arch MultiMaterial|multi-material]]
* Create one entry in the multi-material for each component of your App Part. For example, one "Frame", one "Glass panel" as we used above. Make sure to use the exact same name.
* Attribute that multi-material to each of the windows derived from the same type



<!--T:59-->
See also: [[Tutorial for open windows]]
You can use any other kind of workflow than the one described above, the important points to remember are:
* The type object must be one object, no matter the type (App Part, PartDesign Body, Part Compound, or even another Arch Window)
* The type object must have a "Subvolume" property (linked to the window's Subvolume property) for openings in host objects to work
* The type object must have a "Group" property with different children with same names as multi-material items for multi-materials to work


==Properties== <!--T:16-->
==Properties== <!--T:16-->
Line 128: Line 203:


==Scripting== <!--T:18-->
==Scripting== <!--T:18-->
{{Emphasis|See also:}} [[Arch API|Arch API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].


<!--T:19-->
<!--T:19-->
The Window tool can be used in [[macros]] and from the [[Python]] console by using the following function:
The Window tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following function:
</translate>
</translate>
{{Code|code=
{{Code|code=
Line 137: Line 213:
<translate>
<translate>
<!--T:20-->
<!--T:20-->
* Creates a {{incode|Window}} object based on {{incode|baseobj}}, which should be a well formed, closed [[Draft Wire|Draft Wire]] or [[Sketcher Sketch|Sketcher Sketch]].
* All arguments are optional
* If available, sets the {{incode|width}}, {{incode|height}}, and {{incode|name}} (label) of the Window.
* Creates a <code>Window</code> based on <code>baseobj</code>, which should be a well formed, closed [[Draft Wire]] or [[Sketcher Sketch]]
* If the {{incode|baseobj}} is not a closed shape, the tool may not create a proper solid figure.
* If available, sets the <code>width</code>, <code>height</code>, and <code>name</code> (label) of the Window
* If the <code>baseobj</code> is not a closed shape, the tool may not create a proper solid figure


<!--T:21-->
<!--T:21-->
Line 146: Line 221:
</translate>
</translate>
{{Code|code=
{{Code|code=
import Draft, Arch
import FreeCAD, Draft, Arch


rect = Draft.makeRectangle(length=2, height=4)
Rect1 = Draft.makeRectangle(length=900, height=3000)
Window = Arch.makeWindow(rect)
Window = Arch.makeWindow(Rect1)
FreeCAD.ActiveDocument.recompute()
}}
}}
<translate>

<!--T:42-->
You can also create a Window from a preset.
</translate>
{{Code|code=
Window = makeWindowPreset(windowtype, width, height, h1, h2, h3, w1, w2, o1, o2, placement=None)
}}
<translate>
<!--T:23-->
* Creates a {{incode|Window}} object based on {{incode|windowtype}}, which should be one of the names defined in {{incode|Arch.WindowPresets}}
** Some of these presets are: {{incode|"Fixed"}}, {{incode|"Open 1-pane"}}, {{incode|"Open 2-pane"}}, {{incode|"Sash 2-pane"}}, {{incode|"Sliding 2-pane"}}, {{incode|"Simple door"}}, {{incode|"Glass door"}}, {{incode|"Sliding 4-pane"}}.
* {{incode|width}} and {{incode|height}} define the total size of the object, with units in millimeters.
* The parameters {{incode|h1}}, {{incode|h2}}, {{incode|h3}} (vertical offsets), {{incode|w1}}, {{incode|w2}} (widths), {{incode|o1}}, and {{incode|o2}} (horizontal offsets) specify different distances in millimeters, and depend on the type of preset being created.
* If a {{incode|placement}} is given, it is used.

<!--T:43-->
Example:
</translate>
{{Code|code=
import FreeCAD, Arch

base = FreeCAD.Vector(2000, 0, 0)
Axis = FreeCAD.Vector(1, 0, 0)
place=FreeCAD.Placement(base, FreeCAD.Rotation(Axis, 90))

Door = Arch.makeWindowPreset("Simple door",
width=900, height=2000,
h1=100, h2=100, h3=100, w1=200, w2=100, o1=0, o2=100,
placement=place)
}}

<translate>
<!--T:38-->
{{Docnav
|[[Arch_Reference|Reference]]
|[[Arch_SectionPlane|Section Plane]]
|[[Arch_Module|Arch]]
|IconL=Arch_Reference.svg
|IconR=Arch_SectionPlane.svg
|IconC=Workbench_Arch.svg
}}

</translate>
{{Arch Tools navi{{#translation:}}}}

{{Userdocnavi{{#translation:}}}}

Revision as of 14:17, 29 November 2020

Arch Window

Menu location
Arch → Window
Workbenches
Arch
Default shortcut
W I
Introduced in version
-
See also
Arch Wall, Arch Add

Description

An Arch Window is a base object for all kinds of "embeddable" objects, such as windows and doors. It is designed to be either independent, or "hosted" inside another component such as an Arch Wall, Arch Structure, or Arch Roof. It has its own geometry, that can be made of several solid components (commonly a frame and inner panels), and also defines a volume to be subtracted from the host objects, in order to create an opening.

Window objects are based on closed 2D objects, such as Draft Rectangles or Sketches, that are used to define their inner components. The base 2D object must therefore contain several closed wires, that can be combined to form filled panels (one wire) or frames (several wires).

The Window tool features several presets; this allows the user to create common types of windows and doors with certain editable parameters, without the need for the user to create the base 2D objects and components manually.

All information applicable to an Arch Window also applies to an Arch Door, as it's the same underlying object. The main difference between a Window and a Door is that the Door has an internal panel that is shown opaque (the door itself), while the Window has a panel that is partially transparent (the glass).

Window constructed on top of a Draft Rectangle, then inserted into an Arch Wall. Using the Arch Add operation automatically cuts a correct opening in the host wall.

Complex window being constructed on top of a Sketch. When entering the window's edit mode you can create different components, set their thickness, and select and assign wires from the sketch to them.

Usage

Using a preset

  1. Press the Arch Window button, or press W then I keys.
  2. Select one of the presets in the list.
  3. Fill out the desired parameters.
  4. In the 3D view, move the window to the location where you wish to place it. If you move the pointer over an Arch Wall, the outline of the window should align itself with the face of that object.
  5. Click on the 3D view with the mouse, or press the Enter key three times to confirm the X, Y, Z coordinates of the placement.

Note: if you install the "Parts Library" from the AddonManager, the window tool will search this library for additional presets. These presets are FreeCAD files containing a single window based on a parametric sketch that has named constrains. You may place additional presets in the parts_library directory so that they are found by the window tool.

$ROOT_DIR/Mod/parts_library/Architectural\ Parts/Doors/Custom/
$ROOT_DIR/Mod/parts_library/Architectural\ Parts/Windows/Custom/

The $ROOT_DIR is the user's directory where FreeCAD configuration, macros, and external workbenches are stored.

  • On Linux it is usually /home/username/.FreeCAD/
  • On Windows it is usually C:\Users\username\Application Data\FreeCAD\
  • On Mac OSX it is usually /Users/username/Library/Preferences/FreeCAD/

Creating from scratch

  1. Optionally, select a face on the Arch object where you want the window to be included.
  2. Switch to the Sketcher Workbench.
  3. Create a new sketch.
  4. Draw one or more closed wires (loops).
  5. Close the sketch.
  6. Switch back to the Arch Workbench.
  7. Press the Arch Window button, or press W then I keys.
  8. To adjust the window components and various properties, enter the window task panel by double-clicking on the created object in the tree view.

Note: when creating the sketch, pay close attention to the creation order of the loops; the numbering of the "wires" in the task panel ("Window elements") depends on this.

Presets

The following presets are available:

Building components

Windows can include 3 types of components: panels, frames and louvres. Panels and louvres are made from one closed wire, which gets extruded, while frames are made from 2 or more closed wire, where each one is extruded, then the smaller ones are subtracted from the biggest one. You can access, create, modify and delete components of a window in edit mode (double-click the window in the Tree view). The components have the following properties:

  • Name: A name for the component
  • Type: The type of component. Can be "Frame", "Glass panel", "Solid panel" or "Louvres"
  • Wires: A comma-separated list of wires the component is based on
  • Thickness: The extrusion thickness of the component
  • Z Offset: The distance between the component and its base 2D wire(s)
  • Hinge: This allows you to select an edge from the base 2D object, then set that edge as a hinge for this component and the next ones in the list
  • Opening mode: If you defined a hinge in this component or any other earlier in the list, setting the opening mode will allow the window to appear open or to display 2D opening symbols in plan or elevation.

Options

  • Windows share the common properties and behaviours of all Arch Components
  • If the Auto-includecheckbox on the Window creation task panel is unchecked, the window won't be inserted into any host object on creation.
  • Add a selected window to a wall by selecting both, then pressing the Arch Add button.
  • Remove a selected window from a wall by selecting the window, then pressing the Arch Remove button.
  • When using presets, it is often convenient to turn the "Near" Draft Snap on, so you can snap your window to an existing face.
  • The hole created by a window in its host object is determined by two properties: DataHole Depth and DataHole Wire (introduced in version 0.17). The Hole Wire number can be picked in the 3D view from the window's task panel available when double-clicking the window in the tree view
  • Windows can make use of Multi-Materials. The window will search in the attached Multi-Material for material layers with a same name for each of its window component, and use it if any is found. For example, a component named "OuterFrame" will search in the attached Multi-Material, for a material layer named "OuterFrame". If such material layer is found, its material will be attributed to the OuterFrame component. The thickness value of the material layer is disregarded.

Openings

See also: Tutorial for open windows

Doors and windows can appear partially or fully open in the 3D model, or can display opening symbols both in plan and/or elevation. Consequently, these will also appear in extracted 2D views generated by Draft Shape2DView or TechDraw Workbench or Drawing Workbench. To obtain this, at least one of the window components must have a hinge and an opening mode defined (see the Building components above). Then, using the DataOpening, DataSymbol Plan or DataSymbol Elevation properties, you can configure the appearance of the window:

A door showing the symbol plan, symbol elevation and opening properties at work

Defining window types

Windows can also take advantage of other tools, specifically PartDesign workflows, to define a type. A type is an object that defines the shape of the window. This is specially well suited to work with App Parts:

Download the example file shown above

Example workflow

  • Create a window frame object, a glass panel, and any other window component you need, using Part Workbench or PartDesign tools.
  • For example, create a base rectangular sketch for your window, then a profile sketch for the frame, and create a Part Sweep to sweep the profile around the base sketch. Create a Part Offset2D from the base sketch, then a Part Extrude to create the glass panel
  • Make sure all these pieces have a unique, menaingful name (for example, "Frame" or "Glass Panel")
  • Create an App Part, and place all your subcomponents in it
  • Create a volume to be subtracted from the wall, for example by extruding the base sketch. Add this volume to the App Part. Make sure the volume is turned off
  • If using FreeCAD version 0.19 or later, you can add 3 properties to your App Part, by right-clicking its properties view, and check "Show All". Add the following properties (all of them are optional, the group doesn't matter):
    • Height as a PropertyLength and link it, for example, to a vertical constraint of your base sketch
    • Width as a PropertyLength and link it, for example, to a horizontal constraint of your base sketch
    • Subvolume as a PropertyLink and link it to the volume to be subtracted that we created above
    • Tag as a PropertyString

Materials

Our window type is now ready. We can create window objects from it, simply by selecting the App Part and pressing the window button. The "Height", "Width", "Subvolume" and "Tag" properties of the window will be linked to the corresponding property of the App Part, if existing.

To build a material for type-based windows:

  • Create a multi-material
  • Create one entry in the multi-material for each component of your App Part. For example, one "Frame", one "Glass panel" as we used above. Make sure to use the exact same name.
  • Attribute that multi-material to each of the windows derived from the same type


You can use any other kind of workflow than the one described above, the important points to remember are:

  • The type object must be one object, no matter the type (App Part, PartDesign Body, Part Compound, or even another Arch Window)
  • The type object must have a "Subvolume" property (linked to the window's Subvolume property) for openings in host objects to work
  • The type object must have a "Group" property with different children with same names as multi-material items for multi-materials to work

Properties

  • DataHeight: The height of this window
  • DataWidth: The width of this window
  • DataHole Depth: The depth of the hole created by this window in its host object
  • DataHole Wire: The number of the wire from the base object that is used to create a hole in the host object of this window. This value can be set graphically when double-clicking the window in the tree view. Setting a value of 0 will make the window automatically pick its biggest wire for the hole.
  • DataWindow Parts: A list of strings (5 strings per component, setting the component options above)
  • DataLouvre Width: If any of the components is set to "Louvres", this property defines the size of the louvre elements
  • DataLouvre Spacing: If any of the components is set to "Louvres", this property defines the spacing between the louvre elements
  • DataOpening: All components that have their opening mode set, and provided a hinge is defined in them or in an earlier component in the list, will appear open by a percentage defined by this value
  • DataSymbol Plan: Shows 2D opening symbol in plan
  • DataSymbol Elevation: Shows 2D opening symbol in elevation

Scripting

See also: Arch API and FreeCAD Scripting Basics.

The Window tool can be used in macros and from the Python console by using the following function:

Window = makeWindow(baseobj=None, width=None, height=None, parts=None, name="Window")
  • Creates a Window object based on baseobj, which should be a well formed, closed Draft Wire or Sketcher Sketch.
  • If available, sets the width, height, and name (label) of the Window.
  • If the baseobj is not a closed shape, the tool may not create a proper solid figure.

Example:

import FreeCAD, Draft, Arch

Rect1 = Draft.makeRectangle(length=900, height=3000)
Window = Arch.makeWindow(Rect1)
FreeCAD.ActiveDocument.recompute()

You can also create a Window from a preset.

Window = makeWindowPreset(windowtype, width, height, h1, h2, h3, w1, w2, o1, o2, placement=None)
  • Creates a Window object based on windowtype, which should be one of the names defined in Arch.WindowPresets
    • Some of these presets are: "Fixed", "Open 1-pane", "Open 2-pane", "Sash 2-pane", "Sliding 2-pane", "Simple door", "Glass door", "Sliding 4-pane".
  • width and height define the total size of the object, with units in millimeters.
  • The parameters h1, h2, h3 (vertical offsets), w1, w2 (widths), o1, and o2 (horizontal offsets) specify different distances in millimeters, and depend on the type of preset being created.
  • If a placement is given, it is used.

Example:

import FreeCAD, Arch

base = FreeCAD.Vector(2000, 0, 0)
Axis = FreeCAD.Vector(1, 0, 0)
place=FreeCAD.Placement(base, FreeCAD.Rotation(Axis, 90))

Door = Arch.makeWindowPreset("Simple door",
                             width=900, height=2000,
                             h1=100, h2=100, h3=100, w1=200, w2=100, o1=0, o2=100,
                             placement=place)