LUA scripting Netfabb: problem with mesh:move(X, Y, Z)

LUA scripting Netfabb: problem with mesh:move(X, Y, Z)

quentin_schmidBRKQZ
Enthusiast Enthusiast
390 Views
2 Replies
Message 1 of 3

LUA scripting Netfabb: problem with mesh:move(X, Y, Z)

quentin_schmidBRKQZ
Enthusiast
Enthusiast

Hi,

 

I am currently trying to automate operation based on CAD files, and I find issues to to move the mesh. following script runs well 

 

```

importer = system:createcadimport(0);
CAD_MODEL = importer:loadmodel(filename, 3);
MESH = CAD_MODEL:createmesh();
mesh = root:addmesh(MESH);
mesh:movetoorigin();

```

 

but when I replace the last line by

```

mesh:move(100, 100, -3.0)

```

 

I get the error

 

```

LUA Runtime Error: [string ""]:27: invalid object method or property: move

```

 

even though it seems to be consistent with 

 

Help | Transformation | Autodesk

 

Thanks,

 

Quentin

0 Likes
Accepted solutions (1)
391 Views
2 Replies
Replies (2)
Message 2 of 3

steffen_anders_adsk
Autodesk Support
Autodesk Support

Hello,

 

your mesh out of root:addmesh(MESH) is a LUATrayMesh, so mesh:translate() applies.

https://help.autodesk.com/view/NETF/2025/ENU/?guid=NETF-LUA-FPTRAYMESH

 

Best regards,

Steffen

Steffen Anders
Autodesk Netfabb team

Netfabb resources: Online helpSystem requirementsKnowledge baseForumsHomepageYouTube

How to get Netfabb Basic: VideoHelpDownload

0 Likes
Message 3 of 3

quentin_schmidBRKQZ
Enthusiast
Enthusiast
Accepted solution

Thanks Steffen.

 

interestingly the method mesh:movetoorigin() works for this Lua mesh even thought it is not listed in the help

0 Likes