Part ShapeFromMesh/pl: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Docnav/pl |Zaznacz obszarem |Utwórz obiekt punktów z siatki |środowisko pracy Część |IconL=Part_BoxSelection.svg |IconR=Part_PointsFromMesh.svg |IconC=Workbench_Part.svg }}")
(Created page with "==Wprowadzenie==")
Line 10: Line 10:
}}
}}


{{GuiCommand
{{GuiCommand/pl
|Name=Part ShapeFromMesh‏‎
|Name=Part ShapeFromMesh‏‎
|Name/pl=Część: Utwórz kształt z siatki
|MenuLocation=Part → Create shape from mesh...
|MenuLocation=Part → Utwórz kształt z siatki ...
|Workbenches=[[Part_Workbench|Part]]
|Workbenches=[[Part_Workbench/pl|Część]]
|SeeAlso=[[Part_MakeSolid|Part ConvertToSolid]], [[Part_RefineShape|Part RefineShape]], [[Part_PointsFromMesh|Part PointsFromMesh]]
|SeeAlso=[[Part_MakeSolid/pl|Utwórz bryłę]], [[Part_RefineShape/pl|Udoskonal kształt]], [[Part_PointsFromMesh/pl|Utwórz obiekt punktów z siatki]]
}}
}}


==Introduction==
<span id="Introduction"></span>
==Wprowadzenie==


The {{Button|[[Image:Part_ShapeFromMesh.svg|16px]] [[Part_ShapeFromMesh|Part ShapeFromMesh]]}} command creates a shape from a [[Mesh|mesh object]]. Mesh objects have limited editing capabilities in FreeCAD, converting them to [[Shape|shapes]] will allow their use with many more boolean and modification tools.
The {{Button|[[Image:Part_ShapeFromMesh.svg|16px]] [[Part_ShapeFromMesh|Part ShapeFromMesh]]}} command creates a shape from a [[Mesh|mesh object]]. Mesh objects have limited editing capabilities in FreeCAD, converting them to [[Shape|shapes]] will allow their use with many more boolean and modification tools.

Revision as of 19:19, 5 July 2023

Część: Utwórz kształt z siatki

Lokalizacja w menu
Part → Utwórz kształt z siatki ...
Środowisko pracy
Część
Domyślny skrót
brak
Wprowadzono w wersji
-
Zobacz także
Utwórz bryłę, Udoskonal kształt, Utwórz obiekt punktów z siatki

Wprowadzenie

The Part ShapeFromMesh command creates a shape from a mesh object. Mesh objects have limited editing capabilities in FreeCAD, converting them to shapes will allow their use with many more boolean and modification tools.

The inverse operation is Mesh FromPartShape from the Mesh Workbench.

Usage

  1. Select the mesh object in the tree view.
  2. Go to the menu, Part → Create shape from mesh.
  3. A popup-menu will ask for the tolerance for sewing shape; the default value is 0.1.
  4. A shape from the mesh object is created as a separate new object.

Analyzing and repairing of the mesh, if needed, should be done manually before launching ShapeFromMesh. Appropriate tools for this task are available in the Mesh Workbench.

After creation of a Shape, it may be useful to use Convert to solid (necessary for boolean operations) and Refine shape.

Links

Scripting

Creating a Shape from a Mesh can be done by using the makeShapeFromMesh method from a Part TopoShape; you need to specify the source mesh and tolerance, and assign the result to a new Part Feature object.

Notice that the mesh must be recalculated before it is converted to a Shape, otherwise there won't be topology information, and the conversion won't be successful.

import FreeCAD as App
import Part

doc = App.newDocument()
mesh = doc.addObject("Mesh::Cube", "Mesh")
mesh.recompute()

solid = doc.addObject("Part::Feature", "Shape")
shape = Part.Shape()
shape.makeShapeFromMesh(mesh.Mesh.Topology, 0.1)

solid.Shape = shape
solid.Placement.Base = App.Vector(15, 0, 0)
solid.purgeTouched()
doc.recompute()