Escolar Documentos
Profissional Documentos
Cultura Documentos
Iniciando um projeto
Draft tutorial
Este tutorial vai ensinar você como usar do FreeCAD módulo de desenho 2D
(também chamado de módulo de projecto) para criar um desenho de arquitetura
simples. Para essa finalidade, podemos estar atraindo uma cabine de alvenaria
simples. Vamos supor que nós recebemos um CAD desenho mostrando a
localização da cabine, e vou usá-lo para desenhar nosso projeto em cima dela.
Vamos desenhar um plano, uma seção e duas elevações.
Índice
[ocultar]
1 Before you begin Índice
[ocultar]
1 antes de começar
2 criação de seu espaço de
trabalho do FreeCAD
3 desenhos CAD importando
4 desenho da vista de planta
o 4.1 usando as
ferramentas de
desenho
o 4.2 uma nota sobre
upgrade e downgrade
o 4.3 outra nota sobre
encaixe
o 4.4 importando e
construindo objetos
compostos
o 4.5 dimensões e
anotações
o 4.6 a organização
5 as elevações de desenho
o 5.1 rotacionar a vista e
criação de macros
o 5.2 as girado vistas de
desenho
2 Setting up your FreeCAD workspace
3 Importing CAD drawings
4 Drawing the plan view
o 4.1 Using the drawing tools o
o 4.2 A note about upgrade & downgrade o
o 4.3 Another note about snapping o
o 4.4 Importing and building compound o
objects
o 4.5 Dimensions and annotations o
o 4.6 Organizing o
5 Drawing the elevations
o 5.1 Rotating the view, and creating macros o
o 5.2 Drawing the rotated views o
Antes de começar
Tenha em mente que FreeCAD é ainda em fase inicial de desenvolvimento, portanto você
pode não ser tão produtivo quanto com CAD outro aplicativo e você vai certamente
encontrar bugs, ou experimentar falhas. FreeCAD agora tem a capacidade de salvar
arquivos de backup. O número daqueles arquivos de backup pode ser especificado na
caixa de diálogo Preferências. Não hesite em permitir que os arquivos de backup de 2 ou 3
até que você sabe bem como lidar com FreeCAD.
Guarde o seu trabalho, muitas vezes, de vez em quando salvar seu trabalho com um nome
diferente, então você tem uma cópia de "segura" para cair para trás e estar preparado para
a possibilidade de que alguns comandos não podem lhe dar os resultados esperados.
FreeCAD is a 3D modeler, but in this tutorial we will use it only for working in 2D. So, we
will be drawing on the ground plane, and everything we do will have a Z coordinate of zero.
So first, let's put ourselves in top view by pressing the 2 and be sure we are in orthographic
projection (key O) otherwise we might get fooled by some perspective effects.
Another very important thing to do, is to give custom hotkeys to your Draft commands. So
you can do all the commands from the keyboard, which will drastically improve your speed.
Basically you can do about everything from the keyboard, and will need the mouse only to
draw points and select objects. Go to menu Customize -> Keyboard -> Category Python
and select shortcuts as you like, a good idea is to make them easy to remember. For
example, I use L for Line, W for Polyline (also called Wire in FreeCAD), A for Arc, C for
Circle, M for Move, R for Rotate, F for Offset (O is already taken by Orthographic), D for
Dimension, T for Text, etc...
Now we are set up, we can begin to draw.
Open your DXF file simply with the File -> Open dialog. Several import settings can be
configured in the Draft Preferences screen. For example, you can configure if you want the
DXF file to be imported with original colors and linewidths, or converted to current Draft
color, that you see at the right side of the Draft command bar. But in FreeCAD you won't
need to attribute ugly colors to your objects to determine their linewidth. Objects all have
independent color and linewidth attributes. So, you can very well forget about DXF colors,
or convert everything to the colors of your choice.
After importing your drawing in FreeCAD, it will look like this:
Let's begin with doing some cleaning.
In FreeCAD, there are no layers like in AutoCAD. We work with groups instead. Groups are
another more flexible way to organize your drawing. You can create new groups with a
right-click on the tree view, rearrange them, move them into other groups, or move objects
to/from groups simply by dragging and dropping things in the tree view. You can also
assign current line width and colors to all objects in a group, or turn them on or off by
pressing SPACE.
Let's put all our objects into one new group, and turn off everything we won't use, like
vegetation and dimensions, to speed up our work.
Our DXF drawing was drawn in meters, so unless we have any reason to change that, we'll
continue with the same units. FreeCAD currently does not have a friendly system to work
with real-world units, so we simply assume that "one" means "one meter".
Another good thing to remember is to construct temporary geometry whenever you need.
You want a point that lies 2 meters away horizontally? Draw a vertical line, move it 2m
away, pass a horizontal line through it, there is your point.
Create a rectangle: Snap its cornerpoints with CTRL to the corners of the assigned
area
Offset the rectangle: With the rectangle selected, press Offset, press C to turn on copy
mode, move your mouse inside the first rectangle so offset knows in which direction to
go, and type 0.20, Enter
Turn them into a face: Upgrade the first rectangle, upgrade the second rectangle, then
select the outer rectangle, CTRL-select the inner rectangle and press Downgrade
Create the door opening: Make a 1.00 x 0.50 rectangle, move it to the upper corner of
our main wall (press C to turn copy mode off).
Move the door opening to the right position: Move it 0.10 to the left. We won't put our
opening directly on the corner, because it would make the door difficult to open.
Subtract the door opening: Select the wall, CTRL-select the door opening, and
press downgrade.
A note about upgrade & downgrade
Now, you must be aware that the openCasCade kernel that FreeCAD is built upon, is a 3D
kernel. It is made primarily for 3D operations. When it has to cut or unite planar faces, like
we are doing now with upgrade/downgrade operations, it sometimes does strange things,
and subsequent operations (like other upgrades/downgrades) sometimes don't give the
expected results. Of course with time those behaviours will end up being corrected by the
FreeCAD developers, but it is wise to know alternative ways to solve immediate problems.
The best way to solve a face that isn't upgrading/downgrading/offsetting correctly, is simply
to downgrade it until it is all exploded to single edges, then upgrade those edges together
again up to a new face. In case that doesn't work either, simply redraw a new wire
(polyline) on top of the problematic face, snapping to its endpoints, then delete the old face
and upgrade the new wire. Usually a face that you draw yourself is in much better shape
than a face that you obtained by upgrade/downgrade.
Another thing to keep in mind is that when you subtract a shape from another, you can find
yourself with one object containing several faces. This might difficult your further work (they
don't offset correctly, etc), so a good thing in that case is always to separate them with the
downgrade tool.
Another note about snapping
There are two forms of snapping in the Draft module: passive snap, which occurs when you
simply pass your mouse cursor over an object (an open circle symbol appears), and active
snap, which is when you press CTRL. Active snapping allows you to snap to specific points
on an object, like its endpoints, midpoints, centers, or intersections with other objects. If you
press SHIFT, which is the key for constraining horizontally and vertically, you gain even
more snapping points. But this has a cost, because FreeCAD must do many calculations in
real time. If you have many objects, you'll begin to feel the difference. So a good trick to
speedup your work is to take the habit of working as much as possible with SHIFT and
passive snapping only. You will see quickly that you'll obtain accurate results and work
much faster.
So let's go back to work:
Create a 10cm-wide wall between the main room and the WC. Upgrade it, then
upgrade it together with the main wall to unite them
Create other rectangles for your other openings. I put a 60cm-wide window in what will
become the WC, a 80cm door between the main room and the WC, and for the big
window in the main room I simply left 40cm wall at the left and right side.
Offset all the walls of 1cm, to make a cement/plaster layer, then downgrade the
offsetted copies to turn them into simple wires
Create a layer of ceramics on the exterior side, by offsetting our plaster line 2cm, then
drawing a 2cm-thick shape between the two lines
Delete the 2cm offset. that we don't need anymore, as well as all construction
geometry. If you feel you might need them later, simply put them in a separate group
and turn that group off with SPACE.
This is where we are now (I kept construction geometry there, in blue, for you to see):
Importing and building compound objects
In FreeCAD, compound objects are objects made with the geometry of several other
objects. In other softwares, it is called blocks, symbols or components. It is a very handy
way to group geometry under one single object. Any of the objects created with the draft
module can be grouped into a compound. The command to create a compound is
the Upgrade command. The use is simple, select everything you want to turn into a
compound, and press Upgrade. If no other more intelligent shape can be created, they will
be turned into a compound.
Using compound geometry is specially useful to build a symbol library on your disk, so you
can reuse them later. One cool use of this, coupled to the DXF import function, is that you
can very easily use symbol libraries in DXF format (if your symbols are in dwg format, the
free "Teigha file Converter" application can batch-convert all your library at once).
Once you have a library of DXF symbols, just drag one of them and drop it on top of your
open FreeCAD window and it will be imported in the current document. It won't be imported
as a compound, but all of the symbol geometry will be placed in a separate group, so it is
easy to select it all and simply press "Upgrade". Beware that AutoCAD users have the bad
habit of drawing things very far from the origin point (0,0,0), your inserted symbol can then
lie very far from your drawing zone.
So, back to our drawing:
Import a sanitary block if you have one, or pick one on the Cad Exchange site, and
convert it to DXF with the "Teigha file Converter"
Create the geometry for a door, upgrade it to a compound, copy it to the other door
location, downgrade it, adjust the elements to the new size, and upgrade it again
Do the same for the windows
Finally, we can add a few things to finish our plan, like putting vegetation around the cabin.
We can simply copy a few trees from our imported DXF drawing and scale them down with
the scale tool, to for example (0.5,0.5). We can also change the line thickness of a couple
of objects, for example make the walls thicker, and change the color of some things. And
we can organize all our elements in groups.
The ability to organize your work in nested groups is surely one of the big advantages of
groups over traditional work with layers. In this tutorial, I grouped my objects by type, inside
the Plan group. For example, instead of having one big layer with all dimensions of your
drawing, each part of the drawing will contain their own dimensions group, making it
extremely easy to organize your drawing.
You might feel a loss at first if you come from a traditional drawing program like AutoCAD,
but you'll quickly see the power that this method brings.
For example, all our construction geometry can go in a separate group, that we'll turn off.
Maybe later we'll need to make some changes, and it will be handy to have that geometry
available.
So, now we are ready to draw other parts...
Since in this exercise we are going to stay in pure 2D, we will draw our elevations and
sections directly. In more advanced architecture environments (what FreeCAD will
hopefully become in some future), we wouldn't need to draw the elevations. We would
model the building in 3D and then generate the different views automatically. But for the
sake of this exercise (and also because all the needed tools are still not implemented in
FreeCAD), we'll do it by hand, like in the old times.
We'll begin with the rear wall elevation, because the way our plan is oriented, it can be
drawn directly below it, without the need to rotate the view. We will simply draw
construction lines from the plan, set horizontal lines to the desired heights, I set the 0.00
level, the +0.15 level of the slab, then heights for the windows, and the roof slab at +2.50.
We can then draw our geometry very quickly on top of it.
We can then place a couple of annotations, dimensions, and upgrade some of the objects
so they appear filled with a color. Finally, we can make a bit of cleaning by creating a
"South Elevation" group, then subgroups for our construction geometry and annotations,
and place all of our new objects in them.
Rotating the view, and creating macros
Now, we need to draw other elevations of our little building. The simplest way would be to
draw them directly under the plan view, as we did with the south elevation. For this, it would
be handy to be able to rotate the view by 90°, so we can continue drawing our elevations
"on foot". Unfortunately, FreeCAD has at the moment no "Rotate View" tool. But,
fortunately, it has tools for us to easily create our own tools, called Macros. So, this is a
good opportunity for us to try something easy.
Macros, as well as all scripting in FreeCAD, is done in a very simple programming
language called python. You can write very complex programs in FreeCAD in python, but
you can also use it to perform very simple operations where there still isn't a proper
FreeCAD toolbar icon, such as our Rotate The View tool. So, first thing to do, open the
Report view, if you closed it, and select the python tab. In there, type (or copy/paste) the
following code:
import math
from pivy import coin
cam = Gui.ActiveDocument.ActiveView.getCameraNode()
rot = coin.SbRotation()
rot.setValue(coin.SbVec3f(0,0,1),math.pi/2)
cam.orientation = rot
This small script will simply rotate the view by 90° (left). For rotating by -90° (right), you
would simply change math.pi/2 by -math.pi/2. If you would like to learn more about python
scripting in FreeCAD, there is an extensive Scripting section on this wiki.
Now, we need to do one more step, which is save our piece of code in a macro, so we can
reuse it later. So, instead of pasting our code in the python interpreter, let's open the macro
manager (Tools -> Macros), create a new macro, press the "Edit" button and paste our
code in it. Close the macro editor tab, and the macro will be saved.
The macros can behave like any other FreeCAD tool. With the Tools -> Customize menu,
we can add an icon to our macro, a keyboard shortcut, and add it to a toolbar.
Drawing the rotated views
Now that we can rotate the view at will, we can draw our other elevations. The easiest way
is to draw your elevation at the right place under the plan view, and use a "mirror" (a 45°-
oriented line) to push the height lines from another elevation. This way, drawing goes pretty
fast.
Finally, we draw 2 others elevations, and since the fourth one is the same as the second
one (but mirrored), we will skip it. We can then draw a cross section, and our drawing is
complete:
Antes de começar
Tenha em mente que FreeCAD é ainda em fase inicial de desenvolvimento,
portanto você pode não ser tão produtivo quanto com CAD outro aplicativo e
você vai certamente encontrar bugs, ou experimentar falhas. FreeCAD agora
tem a capacidade de salvar arquivos de backup. O número daqueles arquivos
de backup pode ser especificado na caixa de diálogo Preferências. Não hesite
em permitir que os arquivos de backup de 2 ou 3 até que você sabe bem como
lidar com FreeCAD.
Guarde o seu trabalho, muitas vezes, de vez em quando salvar seu trabalho
com um nome diferente, então você tem uma cópia de "segura" para cair para
trás e estar preparado para a possibilidade de que alguns comandos não podem
lhe dar os resultados esperados.
Outra coisa muito importante a fazer, é dar Personalizar teclas de atalho para
seus comandos de projecto. Então você pode fazer todos os comandos do
teclado, que irá melhorar drasticamente a sua velocidade. Basicamente, você
pode fazer sobre tudo do teclado e vai precisar do mouse somente para
desenhar pontos e selecionar objetos. Ir para menu Personalizar -> teclado ->
Python de categoria e selecionados atalhos como você gostam, uma boa idéia
é fazê-los fácil de lembrar. Por exemplo, eu uso L para linha, W para polilinha
(também chamado de fio em FreeCAD), um arco, C para o círculo, M para
mover, R para rotacionar, F para deslocamento (O já é tomado por ortogonal),
D para a dimensão, T para texto, etc...
Abra o seu arquivo DXF simplesmente com o arquivo -> caixa de diálogo
abrir. Várias configurações de importação podem ser configuradas na tela
de Preferências do projecto . Por exemplo, você pode configurar se quer o
arquivo DXF a ser importado com cores e linewidths originais, ou convertido
para a cor atual do projecto, que você vê no lado direito da barra de comandos
do projecto. Mas na FreeCAD você não precisará de cores feias atributo seus
objetos para determinar sua linewidth. Todos os objetos têm atributos de cor e
linewidth independentes. Então, você pode muito bem esquecer cores DXF ou
converter tudo para as cores de sua escolha.
Depois de importar o seu desenho em FreeCAD, olhará como este:
Vamos colocar todos os nossos objetos em um novo grupo e desligar tudo que
não vamos usar, como a vegetação e dimensões, para acelerar nosso trabalho.
A única coisa que vamos precisar no momento é a área que é atribuída a nossa
cabine. Encontra-se em um grupo separado, denominado de "projeção". Então
podemos basicamente desligar tudo o resto com a tecla de espaço e começar a
desenhar por cima. Sortearemos uma pequena cabana com uma sala de guarda
e um WC, em alvenaria estrutural muito simples, para não haver qualquer
necessidade de concretework especial no plano em si. Mas vamos colocar uma
camada de gesso dentro e uma camada de cerâmica do lado de fora.
Nosso desenho DXF foi desenhado em metros, então a menos que tenhamos
qualquer razão para mudar isso, vamos continuar com as mesmas
unidades. FreeCAD atualmente não tem um sistema amigável para trabalhar
com as unidades do mundo real, então simplesmente assumir que "um"
significa "um metro".
Outra boa coisa a lembrar é construir a geometria temporária sempre que você
precisar. Você quer um ponto que se encontra a 2 metros de distância na
horizontal? Desenhar uma linha vertical, movê-lo 2m de distância, passar uma
linha horizontal através dele, é seu ponto de vista.
Crie um retângulo: Snap sua cornerpoints com CTRL para os cantos da
área atribuído
Deslocamento do retângulo: com o retângulo selecionado, pressione
o deslocamento, pressione C para ativar o modo de cópia, mova o
mouse dentro do retângulo primeiro deslocamento sabe em que direção
deve ir e digite 0.20, digite
Transformá-los em um rosto: Atualizar o primeiro retângulo, atualizar o
segundo retângulo, em seguida selecione o retângulo externo, CTRL-
selecione o retângulo interno e pressione Downgrade
Criar a abertura da porta: fazer um 1.00 x 0.50 retângulo, mova -o para
o canto superior da parede da nossa principal (pressione C para
desativar o modo de cópia).
Mover a abertura para a posição correta da porta: mova-0,10 para a
esquerda. Nós não colocamos nossa abertura diretamente na esquina,
porque seria difícil abrir a porta.
Subtrair a abertura da porta: selecione a parede, CTRL-selecione a
porta abrir e clique em downgrade.
Agora, você deve estar ciente de que o kernel openCasCade que FreeCAD é
construído em cima, é um kernel 3D. É feito principalmente para operações de
3D. Quando tem que cortar ou unir faces planas, como estamos fazendo agora
com as operações de atualização/downgrade, ele às vezes faz coisas estranhas
e as operações subseqüentes (como outros upgrades/downgrades) às vezes não
dão os resultados esperados. Claro com o tempo esses comportamentos vão
acabar sendo corrigidos pelos desenvolvedores FreeCAD, mas é sábio saber
formas alternativas para resolver problemas imediatos.
Outra coisa a ter em mente é que quando você subtrair uma forma de outra,
pode encontrar-se com um objeto que contém vários rostos. Isto talvez difícil
seu mais trabalho (eles não compensar corretamente, etc), então uma coisa
boa, nesse caso, é sempre para separá-los com a ferramenta de downgrade.
Dimensões e anotações
A dimensão e o texto por padrão terá a mesma altura do texto, que pode ser
alterada na página de Preferências do projecto . Você pode editar
individualmente cada altura do texto.
As elevações de desenho
Desde que, neste exercício, nós vamos ficar em 2D puro, traçaremos nossas
seções e elevações diretamente. Em ambientes de arquitetura mais avançadas
(o que FreeCAD esperançosamente será em um futuro), não precisaríamos
desenhar as elevações. Nós modelo do edifício em 3D e em seguida, gerar
automaticamente os pontos de vista diferentes. Mas por causa deste exercício
(e também porque todas as ferramentas necessárias ainda não são
implementadas em FreeCAD), vamos fazê-lo pela mão, como nos velhos
tempos.
Vamos começar com a elevação da parede traseira, porque do jeito que nosso
plano é orientado, pode ser sacado diretamente abaixo dela, sem a necessidade
de rodar a vista. Vamos simplesmente desenhar linhas de construção do plano,
definidos linhas horizontais para a altura desejada, definir o nível de 0,00, o
+0.15 nível da laje, e alturas para as janelas e a laje de cobertura em
+2.50. Podemos então traçar nossa geometria muito rapidamente em cima
dela.
Agora, precisamos fazer mais um passo, que é salvar nosso pedaço de código
em uma macro, então podemos reutilizá-lo mais tarde. Então, em vez de colar
o código no interpretador python, vamos abrir o Gerenciador de macro
(Ferramentas -> Macros), criar uma nova macro, pressione o botão "Editar" e
cole o nosso código nele. Feche a aba do editor de macro e a macro será salva.
Agora que nós pode rodar a vista à vontade, podemos tirar nossas outras
elevações. A maneira mais fácil é para desenhar sua elevação no lugar certo
sob a vista de planta e use um "espelho" (uma linha orientada a 45°) para
empurrar as linhas de altura de uma outra elevação. Desta forma, o desenho
vai muito rápido.