Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5786

Apparent memory leaks after multiple mesh rotations

$
0
0

@Alexandre_Filiatraul wrote:

Hi,

I'm running a test I have written in pythonscript, which involve a high number of translations and rotations of a mesh. After 2 minutes, I run out of memory, and I think the problem is located at line 1141 of file object.py:

id = scriptcontext.doc.Objects.Transform(object_id, xform, not copy)

I show you here a simple script which reproduces the problem:

import Rhino
import rhinoscriptsyntax as rs
import math

rs.Command("_-Open " + "teapot.obj" + " _Enter ")
Meshes = rs.ObjectsByLayer("Default", 32)

x_axis = Rhino.Geometry.Vector3f(1,0,0)
center_point = Rhino.Geometry.Vector3f(0,0,0)

for i in xrange(0,100000):
rs.RotateObject( Meshes[0], center_point, 1.1, axis=x_axis, copy=False)

I think my post may be related to this one: https://discourse.mcneel.com/t/scripting-lots-of-rotations-and-memory-consumption/7933

Any idea of what this may be?

Thank you,

Alexandre

(I'm running Windows 7 Pro 64 bits, 16GB RAM, Rhino Version 5 SR13 32-bit)

teapot.3dm (126.0 KB)

TestCrash.py (358 Bytes)

Posts: 6

Participants: 4

Read full topic


Viewing all articles
Browse latest Browse all 5786

Trending Articles