FreeCAD-Doc/localwiki/Part_Workbench-ro.html
2018-07-19 18:47:02 -05:00

134 lines
19 KiB
HTML

<html><head><title>Part Workbench/ro</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Part Workbench/ro</h1><span class="mw-redirectedfrom">(Redirected from <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Workbench/ro&amp;redirect=no" class="mw-redirect" title="Part Workbench/ro">Part Workbench/ro</a>)</span></div>
<div id="mw-content-text" lang="ro" dir="ltr" class="mw-content-ltr"><hr/>
<div class="mw-parser-output"></div>
<p>The CAD capabilities of FreeCAD are based on the <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Open_CASCADE">OpenCasCade</a> kernel. The Part module allows FreeCAD to access and use the OpenCasCade objects and functions. OpenCascade is a professional-level CAD kernel, that features advanced 3D geometry manipulation and objects. The Part objects, unlike <a href="Mesh_Module.html" class="mw-redirect" title="Mesh Module">Mesh Module</a> objects, are much more complex, and therefore permit much more advanced operations, like coherent boolean operations, modifications history and parametric behaviour.
</p><p><a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_example.jpg" class="image"><img alt="Part example.jpg" src="Part_example.jpg" width="634" height="406" /></a>
</p><p>Example of Part shapes in FreeCAD
</p>
<div id="toc" class="toc"><div class="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1 tocsection-1"><a href="#The_tools"><span class="tocnumber">1</span> <span class="toctext">The tools</span></a></li>
<li class="toclevel-1"><a href="#Primitive"><span class="tocnumber">2</span> <span class="toctext">Primitive</span></a></li>
<li class="toclevel-1"><a href="#Modificarea_obiectelor"><span class="tocnumber">3</span> <span class="toctext">Modificarea obiectelor</span></a></li>
<li class="toclevel-1 tocsection-2"><a href="#Boolean_Operations"><span class="tocnumber">4</span> <span class="toctext">Boolean Operations</span></a></li>
<li class="toclevel-1 tocsection-3"><a href="#Explaining_the_concepts"><span class="tocnumber">5</span> <span class="toctext">Explaining the concepts</span></a></li>
<li class="toclevel-1 tocsection-4"><a href="#Scripting"><span class="tocnumber">6</span> <span class="toctext">Scripting</span></a></li>
<li class="toclevel-1 tocsection-5"><a href="#Examples"><span class="tocnumber">7</span> <span class="toctext">Examples</span></a></li>
<li class="toclevel-1 tocsection-6"><a href="#Tutorials"><span class="tocnumber">8</span> <span class="toctext">Tutorials</span></a></li>
</ul>
</div>
<h3><span class="mw-headline" id="The_tools">The tools</span></h3>
<p>The Part module tools are all located in the <b>Part</b> menu that appears when you load the Part module.
</p>
<h3><span class="mw-headline" id="Primitive">Primitive</span></h3>
<p>Acestea sunt unelte pentru crearea de primitive grafice.
</p>
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Box.png" class="image"><img alt="Part Box.png" src="32px-Part_Box.png" width="32" height="32" srcset="/wiki/images/thumb/a/a5/Part_Box.png/48px-Part_Box.png 1.5x, /wiki/images/a/a5/Part_Box.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Box/ro" title="Part Box/ro">Caseta</a>: Deseneaza o caseta prin specificarea dimensiunile sale</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Cone.png" class="image"><img alt="Part Cone.png" src="32px-Part_Cone.png" width="32" height="32" srcset="/wiki/images/thumb/1/13/Part_Cone.png/48px-Part_Cone.png 1.5x, /wiki/images/1/13/Part_Cone.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Cone/ro" title="Part Cone/ro">Con</a>: Deseneaza un con prin specificarea dimensiunile sale</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Cylinder.png" class="image"><img alt="Part Cylinder.png" src="32px-Part_Cylinder.png" width="32" height="32" srcset="/wiki/images/thumb/d/d4/Part_Cylinder.png/48px-Part_Cylinder.png 1.5x, /wiki/images/d/d4/Part_Cylinder.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Cylinder/ro" title="Part Cylinder/ro">Cilindru</a>: Deseneaza un cilindru prin specificarea dimensiunile sale</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Sphere.png" class="image"><img alt="Part Sphere.png" src="32px-Part_Sphere.png" width="32" height="32" srcset="/wiki/images/thumb/4/4b/Part_Sphere.png/48px-Part_Sphere.png 1.5x, /wiki/images/4/4b/Part_Sphere.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Sphere/ro" title="Part Sphere/ro">Sfera</a>: Deseneaza o sfera prin specificarea dimensiunile sale</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Torus.png" class="image"><img alt="Part Torus.png" src="32px-Part_Torus.png" width="32" height="32" srcset="/wiki/images/thumb/8/8b/Part_Torus.png/48px-Part_Torus.png 1.5x, /wiki/images/8/8b/Part_Torus.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Torus/ro" title="Part Torus/ro">Tor</a>: Deseneaza un tor (inel) prin specificarea dimensiunile sale</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_CreatePrimitives.png" class="image"><img alt="Part CreatePrimitives.png" src="32px-Part_CreatePrimitives.png" width="32" height="32" srcset="/wiki/images/thumb/8/8a/Part_CreatePrimitives.png/48px-Part_CreatePrimitives.png 1.5x, /wiki/images/8/8a/Part_CreatePrimitives.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_CreatePrimitives/ro" title="Part CreatePrimitives/ro">Creaza primitive</a>: Unealta pentru crearea primitivelor geometrice bazate pe parametrii</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Shapebuilder.png" class="image"><img alt="Part Shapebuilder.png" src="32px-Part_Shapebuilder.png" width="32" height="32" srcset="/wiki/images/thumb/a/a6/Part_Shapebuilder.png/48px-Part_Shapebuilder.png 1.5x, /wiki/images/a/a6/Part_Shapebuilder.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Shapebuilder/ro" title="Part Shapebuilder/ro">Creaza forme</a>: Unealta pentru crearea formelor complexe din primitive geometrice bazate pe parametrii</li></ul>
<h3><span class="mw-headline" id="Modificarea_obiectelor">Modificarea obiectelor</span></h3>
<p>Acestea sunt unelte pentru modificarea obiectelor existente. Ele permit alegerea obiectelor cu care se lucreaza.
</p>
<ul><li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Booleans.png" class="image"><img alt="Part Booleans.png" src="32px-Part_Booleans.png" width="32" height="32" srcset="/wiki/images/thumb/8/89/Part_Booleans.png/48px-Part_Booleans.png 1.5x, /wiki/images/8/89/Part_Booleans.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Booleans/ro" title="Part Booleans/ro">Logice</a>: Efectueaza operatii logice asupra obiectelor</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Union.png" class="image"><img alt="Part Union.png" src="32px-Part_Union.png" width="32" height="32" srcset="/wiki/images/thumb/4/45/Part_Union.png/48px-Part_Union.png 1.5x, /wiki/images/4/45/Part_Union.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Union/ro" title="Part Union/ro">Fuziune</a>: Uneste doua obiecte</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Common.png" class="image"><img alt="Part Common.png" src="32px-Part_Common.png" width="32" height="32" srcset="/wiki/images/thumb/9/9a/Part_Common.png/48px-Part_Common.png 1.5x, /wiki/images/9/9a/Part_Common.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Common/ro" title="Part Common/ro">Comun</a>: Extrage partea comuna a doua obiecte</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Cut.png" class="image"><img alt="Part Cut.png" src="32px-Part_Cut.png" width="32" height="32" srcset="/wiki/images/thumb/4/4a/Part_Cut.png/48px-Part_Cut.png 1.5x, /wiki/images/4/4a/Part_Cut.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Cut/ro" title="Part Cut/ro">Decupare</a>: Substrage on obiect din celalalt</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Extrude.png" class="image"><img alt="Part Extrude.png" src="32px-Part_Extrude.png" width="32" height="32" srcset="/wiki/images/thumb/d/df/Part_Extrude.png/48px-Part_Extrude.png 1.5x, /wiki/images/d/df/Part_Extrude.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Extrude/ro" title="Part Extrude/ro">Extrudare</a>: Extrudeaza fetele plane ale unui obiect</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Fillet.png" class="image"><img alt="Part Fillet.png" src="32px-Part_Fillet.png" width="32" height="32" srcset="/wiki/images/thumb/4/4a/Part_Fillet.png/48px-Part_Fillet.png 1.5x, /wiki/images/4/4a/Part_Fillet.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Fillet/ro" title="Part Fillet/ro">Panglica</a>: Rotunjeste marginile unui obiect</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Revolve.png" class="image"><img alt="Part Revolve.png" src="32px-Part_Revolve.png" width="32" height="32" srcset="/wiki/images/thumb/1/12/Part_Revolve.png/48px-Part_Revolve.png 1.5x, /wiki/images/1/12/Part_Revolve.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Revolve/ro" title="Part Revolve/ro">Rotatie</a>: Creaza un obiect prin rotirea altui obiect in jurul unei axe</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Section.png" class="image"><img alt="Part Section.png" src="32px-Part_Section.png" width="32" height="32" srcset="/wiki/images/thumb/a/ab/Part_Section.png/48px-Part_Section.png 1.5x, /wiki/images/a/ab/Part_Section.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Section/ro" title="Part Section/ro">Sectiune</a>: Creaza o sectiune prin intersectarea unui obiect cu planul de sectionare</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Chamfer.png" class="image"><img alt="Part Chamfer.png" src="32px-Part_Chamfer.png" width="32" height="32" srcset="/wiki/images/thumb/8/87/Part_Chamfer.png/48px-Part_Chamfer.png 1.5x, /wiki/images/8/87/Part_Chamfer.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Chamfer/ro" title="Part Chamfer/ro">Tesire</a>: Teseste marginile unui obiect</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Mirror.png" class="image"><img alt="Part Mirror.png" src="32px-Part_Mirror.png" width="32" height="32" srcset="/wiki/images/thumb/9/93/Part_Mirror.png/48px-Part_Mirror.png 1.5x, /wiki/images/9/93/Part_Mirror.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Mirror/ro" title="Part Mirror/ro">Oglindire</a>: Oglindeste obiectul selectat fata de un plan</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Sweep.png" class="image"><img alt="Part Sweep.png" src="32px-Part_Sweep.png" width="32" height="32" srcset="/wiki/images/thumb/7/79/Part_Sweep.png/48px-Part_Sweep.png 1.5x, /wiki/images/7/79/Part_Sweep.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Sweep/ro" title="Part Sweep/ro">Curatare</a>: Curata unul sau mai multe profile de-a lungul unei cai</li>
<li> <a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_Loft.png" class="image"><img alt="Part Loft.png" src="32px-Part_Loft.png" width="32" height="32" srcset="/wiki/images/thumb/e/ef/Part_Loft.png/48px-Part_Loft.png 1.5x, /wiki/images/e/ef/Part_Loft.png 2x" /></a> <a href="https://www.freecadweb.org/wiki/index.php?title=Part_Loft/ro" title="Part Loft/ro">Pod</a>: Uneste un profil de altul</li></ul>
<p><br />
</p>
<h3><span class="mw-headline" id="Boolean_Operations">Boolean Operations</span></h3>
<div class="floatleft"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Part_BooleanOperations.png" class="image" title="An example of union (Fuse), intersection (Common) and difference (Cut)"><img alt="An example of union (Fuse), intersection (Common) and difference (Cut)" src="500px-Part_BooleanOperations.png" width="500" height="384" srcset="/wiki/images/thumb/d/df/Part_BooleanOperations.png/750px-Part_BooleanOperations.png 1.5x, /wiki/images/thumb/d/df/Part_BooleanOperations.png/1000px-Part_BooleanOperations.png 2x" /></a></div>
<div style="clear:both"></div>
<p><br />
An example of union (Fuse), intersection (Common) and difference (Cut)
</p>
<h3><span class="mw-headline" id="Explaining_the_concepts">Explaining the concepts</span></h3>
<p>In OpenCasCade terminology, we distinguish between geometric primitives and (topological) shapes. A geometric primitive can be a point, a line, a circle, a plane, etc. or even some more complex types like a B-Spline curve or surface. A shape can be a vertex, an edge, a wire, a face, a solid or a compound of other shapes. The geometric primitives are not made to be directly displayed on the 3D scene, but rather to be used as building geometry for shapes. For example, an edge can be constructed from a line or from a portion of a circle.
</p><p>We could say, to resume, that geometry primitive are "shapeless" building blocks, and shapes are the real spatial geometry built on it.
</p><p>To get a complete list of all of them refer to the <a rel="nofollow" class="external text" href="http://www.opencascade.org/org/doc/">OCC documentation</a> (Alternative: <a rel="nofollow" class="external text" href="http://opencascade.sourcearchive.com/documentation/6.3.0.dfsg.1-1/classes.html">sourcearchive.com</a>) and search for <b>Geom_*</b> (for geometry) and <b>TopoDS_*</b> (for shapes). There you can also read more about the differences between geometric objects and shapes. Please note that unfortunately the official OCC documentation is not available online (you must download an archive) and is mostly aimed at programmers, not at end-users. But hopefully you'll find enough information to get started here.
</p><p>The geometric types actually can be divided into two major groups: curves and surfaces. Out of the curves (line, circle, ...) you can directly build an edge, out of the surfaces (plane, cylinder, ...) a face can be built. For example, the geometric primitive line is unlimited, i.e. it is defined by a base vector and a direction vector while its shape representation must be something limited by a start and end point. And a box -- a solid -- can be created by six limited planes.
</p><p>From an edge or face you can also go back to its geometric primitive counterpart.
</p><p>Thus, out of shapes you can build very complex parts or, the other way round, extract all sub-shapes a more complex shape is made of.
</p>
<h3><span class="mw-headline" id="Scripting">Scripting</span></h3>
<p>The main data structure used in the Part module is the <a rel="nofollow" class="external text" href="http://en.wikipedia.org/wiki/Boundary_representation">BRep</a> data type from OpenCascade.
Almost all contents and object types of the Part module are now available to python scripting. This includes geometric primitives, such as Line and Circle (or Arc), and the whole range of TopoShapes, like Vertexes, Edges, Wires, Faces, Solids and Compounds. For each of those objects, several creation methods exist, and for some of them, especially the TopoShapes, advanced operations like boolean union/difference/intersection are also available. Explore the contents of the Part module, as described in the <a href="FreeCAD_Scripting_Basics.html" title="FreeCAD Scripting Basics">FreeCAD Scripting Basics</a> page, to know more.
</p>
<h3><span class="mw-headline" id="Examples">Examples</span></h3>
<p>To create a line element switch to the Python console and type in:
</p>
<pre>import Part,PartGui
doc=App.newDocument()
l=Part.LineSegment()
l.StartPoint=(0.0,0.0,0.0)
l.EndPoint=(1.0,1.0,1.0)
doc.addObject("Part::Feature","Line").Shape=l.toShape()
doc.recompute() </pre>
<p>Let's go through the above python example step by step:
</p>
<pre>import Part,PartGui
doc=App.newDocument() </pre>
<p>loads the Part module and creates a new document
</p>
<pre>l=Part.LineSegment()
l.StartPoint=(0.0,0.0,0.0)
l.EndPoint=(1.0,1.0,1.0) </pre>
<p>Line is actually a line segment, hence the start and endpoint.
</p>
<pre>doc.addObject("Part::Feature","Line").Shape=l.toShape() </pre>
<p>This adds a Part object type to the document and assigns the shape representation of the line segment to the 'Shape' property of the added object. It is important to understand here that we used a geometric primitive (the Part.LineSegment) to create a TopoShape out of it (the toShape() method). Only Shapes can be added to the document. In FreeCAD, geometry primitives are used as "building structures" for Shapes.
</p>
<pre>doc.recompute() </pre>
<p>Updates the document. This also prepares the visual representation of the new part object.
</p><p>Note that a Line Segment can be created by specifying its start and endpoint directly in the constructor, for example Part.LineSegment(point1,point2), or we can create a default line and set its properties afterwards, as we did here.
</p><p>A circle can be created in a similar way:
</p>
<pre>import Part
doc = App.activeDocument()
c = Part.Circle()
c.Radius=10.0
f = doc.addObject("Part::Feature", "Circle")
f.Shape = c.toShape()
doc.recompute() </pre>
<p>Note again, we used the circle (geometry primitive) to construct a shape out of it. We can of course still access our construction geometry afterwards, by doing:
</p>
<pre>s = f.Shape
e = s.Edges[0]
c = e.Curve </pre>
<p>Here we take the shape of our object f, then we take its list of edges. In this case there will be only one because we made the whole shape out of a single circle, so we take only the first item of the Edges list, and we takes its curve. Every Edge has a Curve, which is the geometry primitive it is based on.
</p><p>Head to the <a href="Topological_data_scripting.html" title="Topological data scripting">Topological data scripting</a> page if you would like to know more.
</p>
<h3><span class="mw-headline" id="Tutorials">Tutorials</span></h3>
<ul><li> <a href="Import_from_STL_or_OBJ.html" title="Import from STL or OBJ">Import from STL or OBJ</a>&#160;: How to import STL/OBJ files in FreeCAD</li>
<li> <a href="Export_to_STL_or_OBJ.html" title="Export to STL or OBJ">Export to STL or OBJ</a>&#160;: How to export STL/OBJ files from FreeCAD</li>
<li> <a href="Whiffle_Ball_tutorial.html" title="Whiffle Ball tutorial">Whiffle Ball tutorial</a>&#160;: How to use the Part Module</li></ul>
<div class="mw-translate-fuzzy">
</div>
</div>
</div><div class="printfooter">
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=Part_Module/ro&amp;oldid=290009">http://www.freecadweb.org/wiki/index.php?title=Part_Module/ro&amp;oldid=290009</a>"</div>
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
</div>
</div>
<div id="mw-navigation">
<h2>Navigation menu</h2>
</body></html>