Manual:Traditional modeling, the CSG way/ro: Difference between revisions

From FreeCAD Documentation
No edit summary
(Created page with "După cum puteți vedea, fiecare picior a devenit o lungă serie de operațiuni. Toate acestea rămân parametrice și puteți schimba setările oricând. În FreeCAD, deseori...")
Line 70: Line 70:
[[Image:Exercise_table_05.jpg]]
[[Image:Exercise_table_05.jpg]]


După cum puteți vedea, fiecare picior a devenit o lungă serie de operațiuni. Toate acestea rămân parametrice și puteți schimba setările oricând. În FreeCAD, deseori ne referim la această grămadă ca la "istorie de modelare"(sau uneori arborescență construcției), deoarece de fapt are toată istoria operațiunilor pe care le-ați făcut.
As you can see, each foot has become a quite long series of operations. All this stays parametric, and you can go change any parameter of any of the older operations anytime. In FreeCAD, we often refer to this pile as "modeling history", since it in fact carries all the history of the operations you did.


Another particularity of FreeCAD is that the concept of 3D object and the concept of 3D operation tend to blend into one same thing. The Cut is at the same time an operation, and the 3D object resulting from this operation. In FreeCAD this is called a "feature", rather than object or operation.
Another particularity of FreeCAD is that the concept of 3D object and the concept of 3D operation tend to blend into one same thing. The Cut is at the same time an operation, and the 3D object resulting from this operation. In FreeCAD this is called a "feature", rather than object or operation.

Revision as of 13:37, 22 August 2018

CSG înseamnă Constructive Solid Geometry Constructive Solid Geometryși descrie maniera cea mai simplă de a lucra cu geometria 3D solidă, care creează obiecte complexe prin adăugarea/eliminarea unor elemente de volum prin utilizarea operațiilor booleene cum ar fi unirea, scăderea sau intersecția solidelor.

FreeCAD poate gestiona multe tipuri de geometrie, dar tipul preferat și mai util de obiecte 3D pe care dorim să-l proiectăm cu FreeCAD, adică obiecte din lumea reală, este fără îndoială , solid,BREP geometry, geometria BREP, care în mod principal sprijinită de către atelierul Part Part Workbench. Contrar la plasele cu ochiuri poligonale polygon meshes, care sunt realizate numai din puncte și triunghiuri, obiectele BREP(B-Rep de la Boundary Representation) au fațetele lor definite de curbe matematice, care permit o precizie absolută, indiferent de scală.

Diferența dintre cele două poate fi comparată cu diferența dintre imaginile bitmap și vectori. Ca și în cazul imaginilor bitmap, rețelele poligonale au suprafețele lor curbate împărțite într-o serie de puncte. Dacă o priviți îndeaproape, nu va fi o suprafață curbată, ci o suprafață fațetată. În ambele imagini vectoriale datele B-REP, poziția oricărui punct de pe o curbă nu este stocată în geometrie, ci calculată din voleu, cu precizie exactă.

În FreeCAD, toate geometriile bazate pe BREP sunt tratate de o altă piesă de software open source OpenCasCade, OpenCasCade. Interfața principală dintre FreeCAD și kernelul OpenCasCade este Atelierul(Workbench). Majoritatea atelierelor de lucru își construiesc funcționalitatea pe atelierul Part.

Deși alte benzi de lucru oferă adesea instrumente mai avansate pentru a construi și manipula geometria, deoarece acestea manipulează obiecte Part, este foarte util să știm cum funcționează aceste obiecte intern și să poată folosi instrumentele Part deoarece, fiind mai simple, pot foarte des să vă ajute să ocoliți problemele instrumentelor mai inteligente care nu reușesc a rezolva corect aceleași probleme.

Pentru a ilustra lucrul Atelierului, vom folosi acest model, folosind doar operațiunile CSG (cu excepția șuruburilor, pentru care vom folosi unul dintre addon-uri și cotele/dimensiunile pe care se vor vedea în următorul capitol):

hai să cream un nou document (Ctrl+N or menu File -> New Document), comuntați pe Part Workbench și începeți cu primul picior:

  • Press the Cube button
  • Select the Cube, then set the following properties (in the Data tab):
    • Length: 80mm (or 8cm, or 0.8m, FreeCAD works in any unit)
    • Width: 80mm
    • Height: 75cm
  • Duplicate the Cube by pressing Ctrl+C then Ctrl+V (or menu Edit -> Copy and Paste)
  • Select the new object named Cube001 that has been created
  • Change its position by editing its Placement property:
    • Position x: 8mm
    • Position y: 8mm

Ar trebui să obțineți două cuburi(paralelipipede) distanțate la 8 mm pe axa x și 8 mm pe axa Y:

  • Now we can subtract one from the other: Select the first one, that is, the one that will stay, then, with the CTRL key pressed, select the other one, that will be subtracted (the order is important) and press the Cut button:

Observați că obiectul nou creat, numit "Cut", conține în continuare cele două cuburi(de fapt paralelipipede) pe care le-am folosit ca operanzi. De fapt, cele două cuburi sunt încă în document, au fost ascunse și grupate sub obiectul Cut din vizualizarea arborescentă. Puteți să le selectați prin extinderea săgeții la obiectul Cut și, dacă doriți, să le readuceți din nou vizibile făcând clic pe ele sau schimbând oricare dintre proprietățile acestora.

  • Acum, să creăm celelalte trei picioare, duplicând cubul de bază 6 de alte ori. Din moment ce este încă copiat, puteți pur și simplu să inserați (Ctrl + V) de 6 ori. Modificați poziția după cum urmează:
    • Cube002: x: 0, y: 80cm
    • Cube003: x: 8mm, y: 79.2cm
    • Cube004: x: 120cm, y: 0
    • Cube005: x: 119.2cm, y: 8mm
    • Cube006: x: 120cm, y: 80cm
    • Cube007: x: 119.2cm, y: 79.2cm
  • Acum hai să facem celelalte trei secțiuni, selectând mai întâi cubul "gazdă", apoi cubul care urmează să fie tăiat. Acum avem patru obiecte tăiate:

S-ar fi putut gândi că, în loc să repetăm cubul de bază de șase ori, am putea să repetăm piciorul complet de trei ori. Acest lucru este complet adevărat, ca întotdeauna în FreeCAD, există multe modalități de a obține același rezultat. Acesta este un lucru prețios de reținut, pentru că putem avansa la obiecte mai complexe, unele operații ar putea să nu dea rezultatul corect și adesea trebuie să încercăm alte căi.

  • Vom face acum găuri pentru șuruburi, folosind aceeași metodă Cut. Deoarece avem nevoie de 8 găuri, câte două în fiecare picior, putem face ca 8 obiecte să fie scăzute. În schimb, să explorăm alte căi și să facem 4 tuburi, care vor fi refolosite de două picioare. Deci, sa creem tuburi folosind cilindri Cylinder tool. Din nou, puteți face una și o duplicați ulterior. Dați tuturor cilindrilor o rază de 6 mm. De data aceasta, va trebui să le rotim, ceea ce se face și prin Placement property under the Data tab (Note: change the Axis property before setting the Angle, or the rotation will not be applied):
    • Cylinder: height: 130cm, angle: 90°, axis: x:0,y:1, position: x:-10mm, y:40mm, z:72cm
    • Cylinder001: height: 130cm, angle: 90°, axis: x:0,y:1, position: x:-10mm, y:84cm, z:72cm
    • Cylinder002: height: 90cm, angle: 90°, axis: x:-1,y:0, position: x:40mm, y:-10mm, z:70cm
    • Cylinder003: height: 90cm, angle: 90°, axis: x:-1,y:0, position: x:124cm, y:-10mm, z:70cm

Veți observa că cilindrii sunt mai lungi decât este necesar. Acest lucru se datorează tuturor aplicațiilor 3D bazate pe solid, operațiile booleene în FreeCAD sunt uneori suprasensibile față de situațiile față-pe-față și pot eșua. Făcând acest lucru, ne punem în siguranță.

  • Acum să facem scăderea. Selectați primul picior, apoi, cu CTRL apăsat, selectați unul dintre tuburile care îl lipesc, apăsați butonul Cut. Gaura se va face și cilindrul ascuns. Găsiți-l în arborescență prin extinderea piciorului străpuns.
  • Alegeți un alt picior străpuns de acest cilindru ascuns, apoi repetați procesul, de această dată selectând cilindrul din arborescență cu ajutorul Ctrl +, deoarece este ascuns în vizualizarea 3D (puteți, de asemenea, să îl faceți vizibil și să îl selectați în vizualizarea 3D). Repetați acest lucru pentru celelalte picioare până când fiecare are două găuri:

După cum puteți vedea, fiecare picior a devenit o lungă serie de operațiuni. Toate acestea rămân parametrice și puteți schimba setările oricând. În FreeCAD, deseori ne referim la această grămadă ca la "istorie de modelare"(sau uneori arborescență construcției), deoarece de fapt are toată istoria operațiunilor pe care le-ați făcut.

Another particularity of FreeCAD is that the concept of 3D object and the concept of 3D operation tend to blend into one same thing. The Cut is at the same time an operation, and the 3D object resulting from this operation. In FreeCAD this is called a "feature", rather than object or operation.

  • Now let's do the tabletop, it will be a simple block of wood, let's do it with another Box with length: 126cm, width: 86cm, height: 8cm, position: x: 10mm, y: 10mm, z, 67cm. In the View tab, you can give it a nice brownish, wood-like color by changing its Shape Color property:

Notice that, although the legs are 8mm thick, we placed it 10mm away, leaving 2mm between them. This is not necessary, of course, it won't happen with the real table, but it is a common thing to do in that kind of "assembled" models, it helps people who look at the model to understand that these are independent parts, that will need to be attached together manually later.

Now that our five pieces are complete, it is a good time to give them more proper names than "Cut015". By right-clicking the objects in the tree view (or pressing F2), you can rename them to something more meaningful to yourself or to another person who would open your file later. It is often said that simply giving proper names to your objects is much more important than the way you model them.

  • We will now place some screws. There is nowadays an extremely useful addon developed by a member of the FreeCAD community, that you can find on the FreeCAD addons repository, called Fasteners, that makes the insertion of screws very easy. Installing additional workbenches is easy and described on the addons pages.
  • Once you have installed the Fasteners Workbench and restarted FreeCAD, it will appear in the workbenches list, and we can switch to it. Adding a screw to one of our holes is done by first selecting the circular edge of our hole:

  • Then we can press one of the screw buttons of the Fasteners Workbench, for example the EN 1665 Hexagon bolt with flanges, heavy series. The screw will be placed and aligned with our hole, and the diameter will automatically be selected to match the size of our hole. Sometimes the screw will be placed inverted, which we can correct by flipping its invert property. We can also set its offset to 2mm, to follow the same rule we used between the tabletop and the feet:

  • Repeat this for all the holes, and our table is complete!

The internal structure of Part objects

As we saw above, it is possible in FreeCAD to select not only whole objects, but parts of them, such as the circular border of our screw hole. This is a good time to have a quick look at how Part objects are constructed internally. Every workbench that produces Part geometry will be based on these:

  • Vertices: These are points (usually endpoints) on which all the rest is built. For example, a line has two vertices.
  • Edges: the edges are linear geometry like lines, arcs, ellipses or NURBS curves. They usually have two vertices, but some special cases have only one (a closed circle for example).
  • Wires: A wire is a sequence of edges connected by their endpoints. It can contain edges of any type, and it can be closed or not.
  • Faces: Faces can be planar or curved, and can be formed by one closed wire, which forms the border of the face, or more than one, in case the face has holes.
  • Shells: Shells are simply a group of faces connected by their edges. It can be open or closed.
  • Solids: When a shell is tightly closed, that is, it has no "leak", it becomes a solid. Solids carry the notion of inside and outside. Many workbenches rely on this to make sure the objects they produce can be built in the real world.
  • Compounds: Compounds are simply aggregates of other shapes, no matter their type, into a single shape.

In the 3D view, you can select individual vertices, edges or faces. Selecting one of these also selects the whole object.

A note about shared design

You might look at the table above, and think its design is not good. The tightening of the feet with the tabletop is probably too weak. You might want to add reinforcing pieces, or simply you have other ideas to make it better. This is where sharing becomes interesting. You can download the file made during this exercise from the link below, and modify it to make it better. Then, if you share that improved file, others might be able to make it even better, or use your well-designed table in their projects. Your design might then give other ideas to other people, and maybe you will have helped a tiny bit to make a better world...

Downloads

Read more