Search found 8 matches

by Fred3
Tue Feb 21, 2023 9:58 am
Forum: Developers corner
Topic: Memory leak with Placement objects
Replies: 8
Views: 1846

Re: Memory leak with Placement objects

@Fred3 so from this thread I gather that the current state is that the leak still exists but is minimized a bit? Sorry for the late reply. I tried with FreeCAD 0.20.2 (Version: 0.20.2.29177 +426 (Git)) and the memory leak is still there. The workaround I spoke about last year is still working but i...
by Fred3
Fri Jul 08, 2022 12:05 pm
Forum: Developers corner
Topic: Memory leak with Placement objects
Replies: 8
Views: 1846

Re: Memory leak with Placement objects

I have kind of a workaround for this issue. It's definitely the getter of the Placement object that causes a memory leak. It's possible to reduce its impact by going from: element = FreeCAD.ActiveDocument.getObject("Box") for _ in range(1000): vector = FreeCAD.Vector(1, 1, 1) element.Place...
by Fred3
Tue Jul 05, 2022 11:51 am
Forum: Developers corner
Topic: Memory leak with Placement objects
Replies: 8
Views: 1846

Re: Memory leak with Placement objects

I have narrowed down the suspect and something is definitely fishy with the placement accessor. With this following macro: import gc import tracemalloc element = FreeCAD.ActiveDocument.getObject("Box") tracemalloc.start() snapshot1 = tracemalloc.take_snapshot() for _ in range(100000): elem...
by Fred3
Wed Jun 29, 2022 11:25 am
Forum: Developers corner
Topic: Memory leak with Placement objects
Replies: 8
Views: 1846

Re: Memory leak with Placement objects

How big is stepCount? In case it's a huge number then the call of "for _ in range(stepCount):" may allocate a huge amount of memory. In this example stepCount is equal to 30. The speed in which the memory is allocated with my macro is not realistic at all but I don't need the for loop to ...
by Fred3
Wed Jun 29, 2022 9:46 am
Forum: Developers corner
Topic: Memory leak with Placement objects
Replies: 8
Views: 1846

Memory leak with Placement objects

Hi, I'm working on a workbench doing some animations and I found a memory leak while modifying Placement objects. I managed to reproduce the issue with a macro. I'm moving a part from the part workbench back and forth along the x axis for 5 minutes with a lot of modifications of the Placement object...
by Fred3
Tue May 10, 2022 10:51 am
Forum: Help on using FreeCAD
Topic: Part compound of meshes
Replies: 1
Views: 330

Part compound of meshes

According to the part compound command documentation it's supposed to be able to make compound of meshes but I can't find how to use it with vrml files. In the attached example I made 2 boxes with the part workbench and exported them as vmrl files and reimported them. I can make a compound of the pa...
by Fred3
Thu Jun 25, 2020 11:59 am
Forum: Python scripting and macros
Topic: Preview during edition
Replies: 3
Views: 627

Re: Preview during edition

I was sure I said the FreeCAD version and platform I'm using. Sorry for forgetting! I'm using FreeCAD 0.18.4 on Windows 10 : OS: Windows 10 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.4 (GitTag) Build type: Release Branch: releases/FreeCAD-0-18 Hash: 980bf9060e28555fecd9e3462f...
by Fred3
Tue Jun 23, 2020 2:00 pm
Forum: Python scripting and macros
Topic: Preview during edition
Replies: 3
Views: 627

Preview during edition

Hi, I'm buidling a module and one of my functions uses a dialog made with QtCreator in the task panel. I would like to draw some preview in the 3D view while the dialog is active and have no idea how to achieve that. I want to do something like what the "Cross-sections" command does in the...