Tutorial custom placing of windows and doors/ru: Difference between revisions

From FreeCAD Documentation
(Created page with "Category:Sketcher/ru")
(Created page with "12. В древе проекта под {{incode|Window}} выделите {{incode|Sketch002}}, и нажмите {{KEY|Space}}, или измените свойство {{Pr...")
Line 117: Line 117:
== Настройка пользовательского окна ==
== Настройка пользовательского окна ==


12. In the tree view select {{incode|Sketch002}} underlying {{incode|Window}}, and press {{KEY|Space}}, or change the property {{PropertyView|Visibility}} to {{TRUE}}.
12. В древе проекта под {{incode|Window}} выделите {{incode|Sketch002}}, и нажмите {{KEY|Space}}, или измените свойство {{PropertyView|Visibility}} на {{TRUE}}.


13. Double click {{incode|Window}} in the tree view to start editing it.
13. Double click {{incode|Window}} in the tree view to start editing it.

Revision as of 17:32, 13 August 2019

Other languages:
Руководство
Тема
Архитектура
Уровень
Средний
Время для завершения
60 минут
Авторы
vocx
FreeCAD версия
0.18 или выше
Примеры файлов
нет
Смотрите также
None

Введение

Этот учебник покажет как поместить спроектированное пользователем окна и двери в модели здания. Он использует верстаки Draft, Arch, и Sketcher.

Используются следующие инструменты: Draft Grid, Draft Snap, Draft Wire, Arch Wall, Arch Window, и Sketcher NewSketch. Пользователь должен быть знаком с установкой ограничений в эскизах.

Этот учебник был вдохновлён учебниками, написанными jpg87 на форумах FreeCAD.

Установка

1. Откройте FreeCAD, создайте новый пустой документ, и переключитесь на Верстак Arch.

2. Убедитесь, что единицы измерения установлены в меню Правка → Настройки → Основные → Единицы измерения правильно. Например, МКС (м/кг/с/градус) хороши для работы с расстояниями в типичных строениях; и установите число знаков после запятой на 4, чтобы учитывать малейшие доли метра.

3. Используйте кнопку Показывать сетку для показа сетки с достаточным разрешением. Вы можете изменить вид сетки в меню Правка → Настройки → Draft → Сетка и привязка → Сетка. Установите линии через каждые 50 mm, с главными линиями каждые 20 линий (каждый метр), и 1000 линий всего (сетка покрывает площадь 50 x 50 метров).

4. Отодвиньте трёхмерный вид, если сетка слишком близка.

Теперь мы готовы сделать простейшую стену, где мы установим окна и двери.

Установка стены

5. Используйте инструмент Draft Wire для создания полилинии. Ведите её против часовой стрелки.

5.1. Первая точка в (0, 4, 0); в диалоге введите 0 m Enter, 4 m Enter, 0 m Enter.
5.2. Вторая точка в (2, 0, 0); в диалоге введите 2 m Enter, 0 m Enter, 0 m Enter.
5.3. Третья точка в (4, 0, 0); в диалоге введите 4 m Enter, 0 m Enter, 0 m Enter.
5.4. Четвёртая точка в (6, 2, 0); в диалоге введите 6 m Enter, 2 m Enter, 0 m Enter.
5.4. Пятая точка в (6, 5, 0); в диалоге введите 6 m Enter, 5 m Enter, 0 m Enter.
5.5. На клавиатуре нажмите A для завершения полилинии.
5.6. На клавиатуре нажмите 0 для получения аксонометрического вида модели.
Примечание: убедитесь, что чекбокс Относительно (R) не отмечен, когда вводите абсолютные координаты.
Примечание 2: точки могут быть определены указателем мыши по точкам сетки, с помощью панели Draft Snap и метода Draft Grid.
Примечание 3: вы можете создать формы программированием на Python. Учтите, что большинство функций ожидают ввод в миллиметрах.
import FreeCAD
import Draft

p = [FreeCAD.Vector(0.0, 4000.0, 0),
FreeCAD.Vector(2000.0, 0.0, 0.0),
FreeCAD.Vector(4000.0, 0.0, 0.0),
FreeCAD.Vector(6000.0, 2000.0, 0.0),
FreeCAD.Vector(6000.0, 5000.0, 0.0)]

w = Draft.makeWire(p, closed=False)

6. Выделите DWire и кликните инструмент Arch Wall; появится стена с шириной (толщиной) по умолчанию 0,2 м и высотой 3 м.

Базовая линия для стены

Стена, полученная из полилинии

Установка стандартных дверей и окон

7. Кликните инструмент Arch Window; в ниспадающем списке Preset выделите Simple door, и установите высоту в 2 м.

7.1. Установите привязку на Draft Midpoint, и попробуйте выделить нижнюю грань передней стены; поверните standard view как требуется, чтобы зацепить грань, а не поверхность стены; когда активна средняя точка, кликните для установки двери.
7.2. Кликните снова инструмент Arch Window, и установите другую дверь, на сей раз в средней точке крайней правой стены; поворачивайте standard view по необходимости.

Захват по средней точке нижней грани стены для установки двери

Примечание: Sill height это дистанция от пола до нижнего края элемента. Для дверей Sill height обычно 0 m, поскольку двери обычно на уровне пола; с другой стороны, окна обычно отделяет от пола от 0.5 до 1.5 m. Sill height может быть установлен только при создании окна или двери из заготовки. Когда окно или двери вставлены, корректируйте их размещение редактированием вектора ДанныеPosition [x, y, z] базового эскиза (Sketch).

Создание пользовательских дверей и окон

8. Переключитесь на верстак Sketcher; выделите часть стены справа, где нет двери; кликните на Sketcher NewSketch; выделите FlatFace как attachment method. Если существующая геометрия заслоняет ваш вид, кликните Sketcher ViewSection чтобы убрать её.

9. Draw a fancy sketch containing three closed wires. Make sure to provide constraints to all wires.

9.1. The outside wire is the biggest one, and will define the main dimensions of the window object, and the size of the hole created when it's embedded in an Arch Wall. Make sure the dimensions are named appropriately, for example, Width and Height. A constraint also defines the curvature of the outer wire; give it an appropriate name, like HeightCurve.
9.2. The second wire is offset from the outer wire, and together with it, they define the width of the fixed frame of the window. Name the offset appropriately, for example, FrameFixedOffset. It will be used for both the top vertical and horizontal offsets. The bottom offset, if set to zero, will result in the fixed frame touching the bottom of the window; this can be used to model a door instead of a window. Give it an appropriate name, like FrameFixedBottom.
9.3. The third, innermost wire is offset from the second wire, and together with it, they define the frame of the window that can open. The innermost wire also defines the size of the glass panel. Again, give meaningful names to these offsets, for example, FrameInnerOffset and FrameInnerBottom.
9.4. In order to build succesfully the sketch, use horizontal (Sketcher ConstrainHorizontal) and vertical (Sketcher ConstrainVertical) constraints for the straight sides; use auxiliary construction geometry (Sketcher ToggleConstruction), and tangential constraints (Sketcher ConstrainTangent) to correctly place the circular arcs at the top. As in this case the window is symmetrical, consider equality (Sketcher ConstrainEqual), symmetrical (Sketcher ConstrainSymmetric), and point on object (Sketcher ConstrainPointOnObject) constraints where it makes sense.

Ограничения для внешних полилиний эскиза, формирующих окно

Ограничения для внутренних полилиний эскиза, формирующих окно

10. Когда эскиз полностью зафиксирован, нажмите Close для выхода из эскиза (Sketcher LeaveSketch).

10.1. Поскольку лицевая поверхность стены выбирается при начальных шагах создания эскиза, эскиз параллелен с ней, однако он может быть в неверной позиции, вне стены. В этом случае подстройте ДанныеPosition внутри ДанныеAttachment Offset. Установите ДанныеPosition в [4 m, 1 m, 0 m], так что эскиз будет центрирован по стене в одном метре от пола.
10.2. Вы можете видеть именованные ограничения эскиза в ДанныеConstraints. Значения могут меняться с немедленным визуальным контролем изменений эскиза.

Эскиз окна движется к желательной позиции на стене

Именованные ограничения эскиза, которые могут меняться без углубления в эскиз

11. Переключитесь обратно на верстак Arch и примените Arch Window к выбранному новому Sketch002. Будет создано окно, и отверстие под него в стене. Окно сделано из пользовательского эскиза, а не стандартной заготовки, так что ему требуется редактирование для корректного отображения его компонентов, то есть неподвижной рамы, внутренней рамы, и стекла.

Пользовательское окно, созданное из эскиза, у него пока нет правильной рамы или стекла

Настройка пользовательского окна

12. В древе проекта под Window выделите Sketch002, и нажмите Space, или измените свойство ВидVisibility на true.

13. Double click Window in the tree view to start editing it.

13.1. Inside the Window elements dialog there are two panes, Wires and Components. There are three wires, Wire0, Wire1, and Wire2, and one component, Default. The wires refer to the closed loops that were drawn in the sketch; the components define the areas in the sketch that will be extruded to create frame or glass panels with real thicknesses; these areas are delimited by the wires. A window created from a preset already has two components, OuterFrame and Glass. The custom window needs to be edited to have a similar structure.

Dialog to edit a window or a door

13.2. Click on Default, and click the Remove button to eliminate it.
13.3. Click Add; this shows the properties of a new component like Name, Type, Wires, Thickness, Offset, Hinge, and Opening mode. Give a name, such as OuterFrame, choose Frame for Type, and click on Wire0 and then Wire1; they should highlight in the 3D viewport. Add a small value for Thickness, 15 mm, and check the checkbox to add the default value. This default value is the length assigned to the ДанныеFrame property; a similar default can be assigned to the ДанныеOffset property. Click the +Create/update component button to finish editing the component.
13.4. Click Add; give another name, such as InnerFrame, choose Frame for Type, and click on Wire1 and then Wire2. Add a sensible Thickness, 60 mm, and Offset, 15 mm. Then click the +Create/update component button.
13.5. Click Add; give another name, such as Glass, choose Glass panel for Type, and click on Wire2. Add a sensible Thickness, 10 mm, and Offset, 40 mm. Then click the +Create/update component button. If any of the three components needs to be modified, select it and press Edit; modifications are only saved after pressing the +Create/update component button.

Editing a previously defined component of a window or a door

13.6. If everything is set, click Close to finish editing the window. The sketch may become hidden again, but the window will show distinct solid elements for the OuterFrame, the InnerFrame, and the Glass. Give a value of 100 mm to ДанныеFrame to assign a default thickness, which will be added to the value specified in the OuterFrame component.

Property view of the window to add default Frame length, Offset length, and other options

Finished window with appropriate components embedded in the wall

Duplicating the custom window

14. In the tree view, select Window and its underlying Sketch002. Then go to Edit → Duplicate selection, and answer No if asked to duplicate unselected dependencies. A new Window001 and Sketch003 will appear in the same position as the original elements.

15. Select the new Sketch003. Go to the ДанныеMap Mode property, and click on the ellipsis next to the FlatFace value. In the 3D viewport select the left side of the wall which doesn't have any element; rotate the standard view as necessary. Change the Attachment offset to [-1 m, 0 m, 0 m] to center the window, and click OK. The sketch and the window should appear in a new position.

Note: the attachment operation can also be performed by changing to the Part Workbench, and then using the menu Part → Attachment.

Dialog to edit the attachment plane of the sketch

16. You may adjust the dimensions of the new window by changing the named parameters in Sketch003 under ДанныеConstraints, for example, set Height to 2 m, and Frame Fixed Bottom to 0 m. Then press Ctrl+R to recompute the model. If the wall doesn't show a bigger hole for the new window, select the wall in the tree view, right click and choose Mark to recompute, then press Ctrl+R again.

17. These operations have changed the position of the new window, but the opening in the wall doesn't look correct. It is slanted, that is, the hole is not perpendicular to the face of the wall, and it may even cut other parts of the wall. The problem is that Window001 has retained the ДанныеNormal information of the original Window.

Incorrect opening in the wall due to bad Normal of the window

Normals of doors and windows

18. Each Arch Window object controls the extrusion of its body and the opening that is created in its host wall by means of the ДанныеNormal.

The normal is a vector [x, y, z] that indicates a direction perpedicular to a wall. When a window or door preset is created with the Arch Window tool directly over an Arch Wall, the normal is automatically calculated, and the resulting window or door is correctly aligned; the first two objects, Door and Door001, were created in this way.

In similar way, when a sketch is created by selecting a planar surface, it is oriented on this plane. Then when the Arch Window tool is used, the window will use as normal the perpendicular direction to the sketch. This was the case with the third object, the custom Window.

If the window already exists and needs to be moved, as was the case with the duplicated Window001 object, the sketch needs to be remapped to another plane; doing this moves both the sketch and the window, but the latter doesn't automatically update its normal, so it has incorrect extrusion information. The normal needs to be calculated manually and written to ДанныеNormal.

The three values of the normal vector are calculated as following.

x = -sin(angle)
y = cos(angle)
z = 0

Where angle is the angle of the local Z axis of the sketch with respect to the global Y axis.

When a sketch is created, it always has two axes, a local X (red) and a local Y (green). If the sketch is mapped to the global XY working plane, then these axes are aligned; but if the sketch is mapped on the global XZ or global YZ planes, as is common with windows and doors (the sketches are "standing up"), then the local Z (blue) forms an angle with the global Y axis; this angle varies from -180 to 180 degrees. The angle is considered positive if it opens counterclockwise, and it is negative if it opens clockwise, starting from the global Y axis.

Local coordinates of a sketch that is "standing up", that is, mapped to the global XZ plane

Intended directions of the normals for each door and window

If we look at the geometry created so far, we see the following normals.

Door
The local Z is aligned with the global Y, therefore, the angle is zero. The normal vector is
x = -sin(0) = 0
y = cos(0) = 1
z = 0

or ДанныеNormal is [0, 1, 0].

Door001
The local Z is rotated 90 degrees from the global Y, therefore, the angle is 90 (positive, because it opens counterclockwise). The normal vector is
x = -sin(90) = -1
y = cos(90) = 0
z = 0

or ДанныеNormal is [-1, 0, 0].

Window
The local Z is rotated 45 degrees from the global Y, therefore, the angle is 45 (positive, because it opens counterclockwise). The normal vector is
x = -sin(45) = -0.7071
y = cos(45) = 0.7071
z = 0

or ДанныеNormal is [-0.7071, 0.7071, 0].

Window001
The local Z direction is found by using the Draft Dimension tool and measuring the angle that the wall trace (Wire) makes with the global Y axis, or any line aligned to it. This angle is 26.57; the desired angle is the complement to this, so 90 - 26.57 = 63.43.

This means the local Z axis is rotated 63.43 degrees from the global Y, therefore, the angle is -63.46 (negative, because it opens clockwise). The normal vector is

x = -sin(-63.43) = 0.8943
y = cos(-63.43) = 0.4472
z = 0

Therefore ДанныеNormal should be changed to [0.8943, 0.4472, 0].

After doing these changes, recompute the model with Ctrl+R. If the wall doesn't update the hole, select it in the tree view, right click and choose Mark to recompute, then press Ctrl+R again.

19. The orientation of the extrusion of the window is resolved, together with the opening in the wall.

Correct opening in the wall due to proper Normal of the window

Final remarks

20. As demonstrated, the initial placement of the Arch Window is very important. The user should either

  • use the Arch Window tool to insert and automatically align a preset to a wall, or
  • map a sketch to the desired wall, and build the window after that.

If a window already exists, and it needs to be moved, the supporting sketch should be remapped to a new plane, and the ДанныеNormal of the window needs to be recalculated.

The new normal direction can be obtained by measuring the angle of the new wall with respect to the global Y axis, considering whether this angle is positive (counterclockwise) or negative (clockwise), and using a simple formula.

x = -sin(angle)
y = cos(angle)
z = 0

To confirm that the operations are correct, the absolute magnitude of the normal vector should be one. That is,

abs(N) = 1 = sqrt(x^2 + y^2 + z^2)
abs(N) = 1 = sqrt(sin^2(angle) + cos^2(angle) + z^2)