|
Posizione nel menu |
---|
Punti → Importa punti |
Ambiente |
Punti |
Avvio veloce |
Nessuno |
Introdotto nella versione |
- |
Vedere anche |
Esporta punti |
Descrizione
Questo strumento importa punti da un file nuvola di punti.
The Points Import command imports a point cloud from a file.
Utilizzo
- Cliccare su
Importa punti oppure usare il menu Punti →
Importa punti.
- Selezionare il file con la nuvola di punti e fare click su Apri.
- There are several ways to invoke the command:
- Press the
Import Points... button.
- Select the Points →
Import Points... option from the menu.
- Press the
- Select a point cloud file.
- Press the Open button.
Properties
See Points Convert.
Point cloud file format
- A point cloud file must have the .asc, .pcd or .ply extension.
- Each line in the file must list the X, Y and Z coordinates of a point.
- The coordinates must be separated by spaces.
- The coordinates must use a decimal point, not a decimal comma.
Esempio di file cloud di punti
0 0 0 1.4562 -7.2354 12.2367 5.9423 3.1728 -17.6439
Per i test si può usare questo file ASC, che è una versione di Stanford Bunny.
Scripting
The code below can be used to scale an imported point cloud. Select the point cloud and run the code, either by pasting it in the Python console, or by saving it as a macro and executing that macro.
from PySide import QtWidgets
import FreeCAD as App
import FreeCADGui as Gui
def scale_points(obj, scale_x, scale_y, scale_z):
mtx = App.Matrix()
mtx.scale(scale_x, scale_y, scale_z)
pts = obj.Points.copy()
pts.transformGeometry(mtx)
obj.Points = pts
App.ActiveDocument.recompute()
if Gui.Selection.getSelection():
obj = Gui.Selection.getSelection()[0]
if obj.isDerivedFrom("Points::Feature"):
scale, ok = QtWidgets.QInputDialog.getDouble(
None,
"Scale point cloud",
"Scale:",
value=1.0,
decimals=6
)
if ok:
scale_points(obj, scale, scale, scale)
Questa pagina è recuperata da https://wiki.freecad.org/Points_Import