Manual:Modeling for product design/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "* Nasz podstawowy szkic jest teraz gotowy, możemy opuścić tryb edycji, naciskając przycisk {{Button|Zamknij}} na górze panelu zadań, lub po prostu naciskając klawisz {{KEY|Escape}}. Jeśli będzie to konieczne później, możemy powrócić do trybu edycji w każdej chwili, klikając dwukrotnie na szkicu w widoku drzewa. * Wyciągniemy go, korzystając z narzędzia 16px Wyciągnij, i nadając mu odległość {{Valu...")
(Created page with "'''Wyciągnięcie''' działa bardzo podobnie do narzędzia Wyciągnij środowiska Część, które używaliśmy wcześniej. Jednak istnieje kilka różnic, główna z nich polega na tym, że wyciągnięcie nie może być przenoszone. Jest na zawsze połączone ze swoim szkicem. Jeśli chcesz zmienić położenie wyciągnięcia, musisz przenieść podstawowy szkic. W bieżącym kontekście, gdzie chcemy być pewni, że nic nie przesunie się z miejsca,...")
Line 48: Line 48:
[[Image:Exercise_lego_04.jpg]]
[[Image:Exercise_lego_04.jpg]]


'''Wyciągnięcie''' działa bardzo podobnie do narzędzia [[Part_Extrude/pl|Wyciągnij]] środowiska Część, które używaliśmy wcześniej. Jednak istnieje kilka różnic, główna z nich polega na tym, że wyciągnięcie nie może być przenoszone. Jest na zawsze połączone ze swoim szkicem. Jeśli chcesz zmienić położenie wyciągnięcia, musisz przenieść podstawowy szkic. W bieżącym kontekście, gdzie chcemy być pewni, że nic nie przesunie się z miejsca, jest to dodatkowe zabezpieczenie.
The '''Pad''' behaves very much like the [[Part Extrude|Extrude]] tool that we used in the previous chapter. There are a couple of differences, though, the main one being that a pad cannot be moved. It is attached forever to its sketch. If you want to change the position of the pad, you must move the base sketch. In the current context, where we want to be sure nothing will move out of position, this is an additional security.


* We will now carve the inside of the block, using the [[Image:PartDesign_Pocket.svg|16px]] [[PartDesign_Pocket|Pocket]] tool, which is the PartDesign version of [[Part Cut]]. To make a pocket, we will create a sketch on the bottom face of our block, which will be used to remove a part of the block.
* We will now carve the inside of the block, using the [[Image:PartDesign_Pocket.svg|16px]] [[PartDesign_Pocket|Pocket]] tool, which is the PartDesign version of [[Part Cut]]. To make a pocket, we will create a sketch on the bottom face of our block, which will be used to remove a part of the block.

Revision as of 08:22, 16 February 2024

Projektowanie produktu jest pierwotnie terminem komercyjnym, ale w świecie 3D często oznacza modelowanie czegoś z myślą o jego Wydruk 3D lub, bardziej ogólnie, wyprodukowaniu przez maszynę, na przykład drukarkę 3D lub Obrabiarki CNC.

Gdy drukujesz obiekty w 3D, niezwykle ważne jest, aby były one zamknięte. Ponieważ stają się one rzeczywistymi, stałymi obiektami, jest to naturalne. Oczywiście, nic nie stoi na przeszkodzie, aby były one puste wewnątrz. Jednak zawsze musisz mieć jasne pojęcie, które punkty znajdują się wewnątrz materiału, a które na zewnątrz, ponieważ drukarka 3D lub maszyna CNC musi dokładnie wiedzieć, co jest wypełnione materiałem, a co nie. Z tego powodu w programie FreeCAD, środowisko pracy Projekt Części jest doskonałym narzędziem do tworzenia takich elementów, ponieważ zawsze zadba o to, aby Twoje obiekty pozostały zamknięte i możliwe do zbudowania.

Aby zilustrować działanie środowiska ProjektCzęści, zamodelujmy ten dobrze znany element Lego:

Fajną rzeczą z klockami Lego jest to, że wymiary łatwo można znaleźć w Internecie, przynajmniej dla standardowych klocków. Są one dość łatwe do modelowania i drukowania na drukarce 3D, a przy odrobinie cierpliwości (drukowanie 3D często wymaga wielu dostosowań i precyzyjnego dopasowania) można wykonać elementy, które są całkowicie kompatybilne i idealnie zatrzaskują się w oryginalnych klockach Lego. W poniższym przykładzie wykonamy element, który jest 1,5 raza większy niż oryginał.

Teraz będziemy korzystać wyłącznie z narzędzi środowiska Szkicownik i Projekt Części. Ponieważ wszystkie narzędzia szkicownika są również zawarte w narzędziach środowiska Projekt Części, więc możemy pozostać w środowisku Projekt Części i nie będziemy musieli przełączać się pomiędzy nimi.

Obiekty środowiska Projekt Części są w pełni oparte na Szkicach. Szkic jest obiektem 2D, złożonym z segmentów linii (linii, łuków okręgów lub elips) oraz więzów. Te wiązania mogą być stosowane zarówno na odcinkach liniowych, jak i na ich końcach lub punktach środkowych, i będą wymuszać na geometrii przyjęcie określonych reguł. Na przykład możesz nałożyć wiązanie pionowe na odcinek linii, aby zmusić go do pozostania pionowym, lub wiązanie pozycji (blokady) na koniec, aby uniemożliwić mu przemieszczenie się. Gdy szkic ma dokładnie określoną liczbę wiązań, które uniemożliwiają przesunięcie jakiegokolwiek punktu szkicu, mówimy o w pełni związanym szkicu. Gdy istnieją więzy nadmiarowe, które można usunąć, nie pozwalając na przesunięcie geometrii, nazywa się to nadmiernym wiązaniem. Należy tego unikać, a FreeCAD powiadomi Cię, jeśli wystąpi taki przypadek.

Szkice posiadają tryb edycji, w którym można zmieniać ich geometrię i wiązania. Gdy zakończysz edycję i opuścisz tryb edycji, szkice zachowują się jak każdy inny obiekt w programie FreeCAD i mogą być używane jako elementy konstrukcyjne we wszystkich narzędziach środowiska pracy Projekt Części, ale także w innych środowiskach pracy, takich jak Part lub Architektura. Środowisko pracy Rysunek Roboczy posiada również narzędzie, które konwertuje obiekty Szkicownika na obiekty Rysunku Roboczego, oraz w przeciwnym kierunku.

  • Zacznijmy od modelowania kształtu sześcianu, który będzie bazą dla naszego klocka Lego. Później wykonamy wnętrze i dodamy 8 kropek na wierzchu. Zacznijmy od stworzenia prostokątnego szkicu, który następnie wyciągniemy:
  • Przełącz się do środowiska Projekt Części.
  • Kliknij przycisk Nowy Szkic. Wyświetli się okno dialogowe, pytające gdzie chcesz umieścić szkic. Wybierz płaszczyznę XY, która jest płaszczyzną "podłoża". Szkic zostanie utworzony i natychmiastowo przełączy się w tryb edycji, a widok zostanie obrócony, aby patrzeć ortogonalnie na Twój szkic.
  • Teraz możemy narysować prostokąt, wybierając narzędzie Prostokąt i klikając 2 punkty narożne. Możesz umieścić oba punkty w dowolnym miejscu, ponieważ ich poprawna lokalizacja zostanie ustalona w kolejnym kroku.
  • Zauważysz, że kilka wiązań automatycznie zostało dodanych do naszego prostokąta: segmenty pionowe otrzymały wiązanie pionowe, poziome otrzymały wiązanie poziome, a każdy narożnik otrzymał wiązanie zbieżności, które łączy segmenty. Możesz eksperymentować z przesuwaniem prostokąta za pomocą myszy, wszystkie elementy geometrii będą nadal przestrzegać wiązań.

  • Teraz dodajmy trzy dodatkowe ograniczenia:
    • Wybierz jeden z segmentów pionowych i dodaj Zwiąż w pionie. Ustaw mu rozmiar na 23.7mm.
    • Wybierz jeden z segmentów poziomych i dodaj Zwiąż w poziomie. Ustaw go na 47.7mm.
    • Wreszcie, wybierz jeden z punktów narożnych, następnie punkt początkowy (który znajduje się na przecięciu czerwonej i zielonej osi), a następnie dodaj Wiązanie zbieżności punktów. Prostokąt przeskoczy wtedy do punktu początkowego, a Twój szkic zmieni kolor na zielony, co oznacza, że jest teraz w pełni związany. Możesz spróbować przesunąć jego linie lub punkty, ale nic już się nie będzie przesuwać.

Zauważ, że ostatnie wiązanie zbieżności punktów nie było absolutnie konieczne. Nigdy nie jesteś zmuszony opracować z w pełni związanych szkiców. Jednakże, jeśli zamierzamy wydrukować ten blok w 3D, konieczne będzie utrzymanie naszego elementu blisko punktu odniesienia położenia (który będzie środkiem przestrzeni, w której głowica drukarki może się poruszać). Dodając to wiązanie, upewniamy się, że nasz element zawsze będzie "zakotwiczony" w tym punkcie początkowym.

  • Nasz podstawowy szkic jest teraz gotowy, możemy opuścić tryb edycji, naciskając przycisk Zamknij na górze panelu zadań, lub po prostu naciskając klawisz Escape. Jeśli będzie to konieczne później, możemy powrócić do trybu edycji w każdej chwili, klikając dwukrotnie na szkicu w widoku drzewa.
  • Wyciągniemy go, korzystając z narzędzia Wyciągnij, i nadając mu odległość 14.4mm. Pozostałe opcje można zostawić domyślne:

Wyciągnięcie działa bardzo podobnie do narzędzia Wyciągnij środowiska Część, które używaliśmy wcześniej. Jednak istnieje kilka różnic, główna z nich polega na tym, że wyciągnięcie nie może być przenoszone. Jest na zawsze połączone ze swoim szkicem. Jeśli chcesz zmienić położenie wyciągnięcia, musisz przenieść podstawowy szkic. W bieżącym kontekście, gdzie chcemy być pewni, że nic nie przesunie się z miejsca, jest to dodatkowe zabezpieczenie.

  • We will now carve the inside of the block, using the Pocket tool, which is the PartDesign version of Part Cut. To make a pocket, we will create a sketch on the bottom face of our block, which will be used to remove a part of the block.
  • With the bottom face selected, press the New sketch button.
  • Draw a rectangle on the face.

  • We will now constrain the rectangle in relation to the bottom face. To do this, we need to "import" some edges of the face with the External geometry tool. Use this tool on the two vertical lines of the bottom face:

You will notice that only edges from the base face can be added by this tool. When you create a sketch with a face selected, a relation is created between that face and the sketch, which is important for further operations. You can always remap a sketch to another face later with the Map sketch tool.

  • The external geometry is not "real", it will be hidden when we leave edit mode. But we can use it to place constraints. Place the 4 following constraints:

  • Leave edit mode and we can now perform the pocket operation: With the sketch selected, press the Pocket button. Give it a length of 12.6mm, which will leave the upper face of our pad with a thickness of 1.8mm (remember, the total height of our pad was 14.4mm).

  • We will now attack the 8 dots on the top face. To do this, since they are a repetition of a same feature, we will use the handy Linear pattern tool of the Part Design Workbench, which allows to model once and repeat the shape.
  • Start by selecting the top face of our block
  • Create a New sketch.
  • Create two circles.
  • For each circle, select it and add a Radius Constraint of 3.6mm to each of them
  • Import the left edge of the base face with the External geometry tool.
  • Place two vertical constraints and two horizontal constraints of 6mm between the center point of each circle and the corner points of the imported edge, so each circle has its center at 6mm from the border of the face:

  • Notice how, once again, when you lock the position and dimension of everything in your sketch, it becomes fully constrained. This always keeps you on the safe side. You could change the first sketch now, everything we did afterwards would keep tight.
  • Leave edit mode, select this new sketch, and create a Pad of 2.7mm:

  • Notice that, as earlier with the pocket, since we used the top face of our base block as a base for this latest sketch, any PartDesign operation we do with this sketch will correctly be built on top of the base shape: The two dots are not independent objects, they have been extruded directly from our brick. This is the great advantage of working with the Part Design Workbench, as long as you take care of always building one step on top of the previous one, you are actually building one final solid object.
  • We can now duplicate our two dots four times, so we get eight. Select the latest Pad we just created.
  • Press the Linear pattern button.
  • Give it a length of 36mm (which is the total "span" we want our copies to fit in), in the "horizontal sketch axis" direction, and make it 4 occurrences:

  • Once again, see that this is not just a duplication of an object, it is a *feature* of our shape that has been duplicated, the final object is still only one solid object.
  • Now let's work on the three "tubes" that fill the void we created on the bottom face. We have several possibilities: create a sketch with three circles, pad it then pocket it three times, or create a base sketch with one circle inside the other and pad it to form the complete tube already, or even other combinations. Like always in FreeCAD, there are many ways to achieve the same result. Sometimes one way will not work the way we want, and we must try other ways. Here, we will take the safest approach, and do things one step at a time.
  • Select the face that is at the bottom of the hollow space we carved earlier inside the block.
  • Create a new sketch, add a circle with a radius of 4.8825mm, import the left border of the face, and constrain it vertically and horizontally at 10.2mm from the upper corner of the face:

If you have trouble to select features hiding part of the model can help. To hide a feature select it from tree view and press Space-key to toggle visibility.

  • Leave edit mode, and pad this sketch with a distance of 12.6mm
  • Create a linear pattern from this last pad, give it a length of 24mm and 3 occurrences. We now have three filled tubes filling the hollow space:

  • Now let's make the final holes. Select the circular face of the first of our three "pins"
  • Create a new sketch, import the circular border of our face, create a circle with a radius constraint of 3.6mm, and add a Point on Point Constraint between the center of the imported circle and our new circle. We now have a perfectly centered circle,and once again fully constrained:

  • Leave edit mode, and create a pocket from this sketch, with a length of 12.6mm
  • Create a linear pattern from this pocket, with a length of 24mm and 3 occurrences. That's the last step, our piece of lego is now complete, so we can give it a nice color to mark our victory!

You will notice that our modeling history (what appears in the tree view) has become quite long. This is precious because every single step of what we did can be changed later on. Adapting this model for another kind of brick, for example one with 2x2 dots, instead of 2x4, would be a piece of cake, we would just need to change a couple of dimensions and the number of occurrences in linear patterns. We could as easily create bigger pieces that don't exist in the original Lego game.

But we could also want to get rid of the history, for example if we are going to model a castle with this brick, and we don't want to have this whole history repeated 500 times in our file.

There are two simple ways to get rid of the history, one is using the Create simple copy tool from the Part Workbench, which will create a copy of our piece that doesn't depend anymore on the history (you can delete the whole history afterwards), the other way is exporting the piece as a STEP file and reimporting it.

Assembling

But the best of both worlds also exists, which is the Assembly2 Workbench, an addon that can be installed from the FreeCAD-addons repository. This Workbench is named "2" because there is also an official built-in Assembly Workbench in development, which is not ready yet. The Assembly2 Workbench, however, already works very well to construct assemblies, and also features a couple of object-to-object constraints which you can use to constrain the position of one object in relation to another. In the example below, however, it will be quicker and easier to position the pieces using Draft Move and Draft Rotate than using the Assembly2 constraints.

  • Save the file as it is now
  • Install the Assembly2 Workbench and restart FreeCAD
  • Create a new empty document
  • Switch to the Assembly2 workbench
  • Press the Import a part from another FreeCAD document button
  • Select the file we saved above
  • The final piece will be imported in the current document. The Assembly2 workbench will determine automatically what is the final piece in our file that needs to be used, and the new object stays linked to the file. If we go back and modify the contents of the first file, we can press the Update parts imported into the assembly button to update the pieces here.
  • By using the Import a part from another FreeCAD document button several times, and moving and rotating the pieces (with the Draft tools or by manipulating their Placement property), we can quickly create a small assembly:

Downloads

Read more