Mesh Scale: Difference between revisions
No edit summary |
(Button text.) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
<languages/> |
||
<translate> |
<translate> |
||
<!--T:7--> |
<!--T:7--> |
||
{{Docnav |
{{Docnav |
||
|[[Mesh_Decimating|Decimating]] |
|||
|[[Mesh Smooth|Smooth...]] |
|||
|[[Mesh_BuildRegularSolid|BuildRegularSolid]] |
|||
|[[Mesh EvaluateRepair|Evaluate & Repair mesh...]] |
|||
|[[Mesh_Workbench|Mesh]] |
|[[Mesh_Workbench|Mesh]] |
||
|IconL= |
|IconL=Mesh_Decimating.svg |
||
|IconR=Mesh_BuildRegularSolid.svg |
|||
|IconC=Workbench_Mesh.svg |
|IconC=Workbench_Mesh.svg |
||
|IconR=Mesh_EvaluateRepair.png |
|||
}} |
}} |
||
Line 14: | Line 15: | ||
{{GuiCommand |
{{GuiCommand |
||
|Name=Mesh Scale |
|Name=Mesh Scale |
||
⚫ | |||
|Workbenches=[[ |
|Workbenches=[[Mesh_Workbench|Mesh]] |
||
⚫ | |||
|Shortcut= |
|||
|SeeAlso= |
|||
}} |
}} |
||
==Description== <!--T:3--> |
==Description== <!--T:3--> |
||
⚫ | |||
The '''Mesh Scale''' command scales mesh objects. |
|||
==Usage== <!--T:4--> |
==Usage== <!--T:4--> |
||
<!--T:12--> |
|||
# Select one or more mesh objects. |
|||
# There are several ways to invoke the command: |
|||
#* Press the {{Button|[[Image:Mesh_Scale.svg|16px]] [[Mesh_Scale|Scale...]]}} button. |
|||
#* Select the {{MenuCommand|Meshes → [[Image:Mesh_Scale.svg|16px]] Scale...}} option from the menu. |
|||
# The {{MenuCommand|Scaling}} dialog box opens. |
|||
# Specify a scaling factor, the value must be larger than {{Value|0}}. |
|||
# Press the {{button|OK}} button to finish the command. |
|||
==Scripting== <!--T:13--> |
|||
<!--T:14--> |
|||
See also: [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]]. |
|||
<!--T:15--> |
|||
To scale a mesh use its {{incode|transformGeometry}} method. |
|||
</translate> |
|||
{{Code|code= |
|||
import FreeCAD as App |
|||
import Mesh |
|||
# Create a non-parametric box-shaped mesh: |
|||
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh") |
|||
msh.Mesh = Mesh.createBox(10, 10, 10) |
|||
msh.ViewObject.DisplayMode = "Flat Lines" |
|||
# Create and scale a matrix: |
|||
mat = App.Matrix() |
|||
mat.scale(2.0, 3.0, 4.0) # Unequal scaling. |
|||
# We need to work on a copy of the msh.Mesh object: |
|||
new_msh = msh.Mesh.copy() |
|||
# Transform that copy: |
|||
new_msh.transformGeometry(mat) |
|||
# Update msh.Mesh: |
|||
msh.Mesh = new_msh |
|||
}} |
|||
<translate> |
|||
⚫ | |||
<!--T:8--> |
<!--T:8--> |
||
{{Docnav |
{{Docnav |
||
|[[Mesh_Decimating|Decimating]] |
|||
|[[Mesh Smooth|Smooth...]] |
|||
|[[Mesh_BuildRegularSolid|BuildRegularSolid]] |
|||
|[[Mesh EvaluateRepair|Evaluate & Repair mesh...]] |
|||
|[[Mesh_Workbench|Mesh]] |
|[[Mesh_Workbench|Mesh]] |
||
|IconL= |
|IconL=Mesh_Decimating.svg |
||
|IconR=Mesh_BuildRegularSolid.svg |
|||
|IconC=Workbench_Mesh.svg |
|IconC=Workbench_Mesh.svg |
||
|IconR=Mesh_EvaluateRepair.png |
|||
}} |
}} |
||
Latest revision as of 16:40, 25 November 2023
Mesh Scale |
Menu location |
---|
Meshes → Scale... |
Workbenches |
Mesh |
Default shortcut |
None |
Introduced in version |
- |
See also |
None |
Description
The Mesh Scale command scales mesh objects.
Usage
- Select one or more mesh objects.
- There are several ways to invoke the command:
- Press the Scale... button.
- Select the Meshes → Scale... option from the menu.
- The Scaling dialog box opens.
- Specify a scaling factor, the value must be larger than
0
. - Press the OK button to finish the command.
Scripting
See also: FreeCAD Scripting Basics.
To scale a mesh use its transformGeometry
method.
import FreeCAD as App
import Mesh
# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(10, 10, 10)
msh.ViewObject.DisplayMode = "Flat Lines"
# Create and scale a matrix:
mat = App.Matrix()
mat.scale(2.0, 3.0, 4.0) # Unequal scaling.
# We need to work on a copy of the msh.Mesh object:
new_msh = msh.Mesh.copy()
# Transform that copy:
new_msh.transformGeometry(mat)
# Update msh.Mesh:
msh.Mesh = new_msh
Mesh
- Miscellaneous: Import mesh, Export mesh, Create mesh from shape, Regular solid, Unwrap Mesh, Unwrap Face
- Modifying: Harmonize normals, Flip normals, Fill holes, Close hole, Add triangle, Remove components, Remove components by hand, Smooth, Refinement, Decimation, Scale
- Boolean: Union, Intersection, Difference
- Cutting: Cut mesh, Trim mesh, Trim mesh with a plane, Create section from mesh and plane, Cross-sections
- Components and segments: Merge, Split by components, Create mesh segments, Create mesh segments from best-fit surfaces
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Assembly, CAM, Draft, FEM, Inspection, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework
- Hubs: User hub, Power users hub, Developer hub