Search found 41 matches

by cristian.a73
Sun Feb 10, 2019 1:43 pm
Forum: Python scripting and macros
Topic: wire.makeOffset2D : 99% cpu (dead loop ?)
Replies: 2
Views: 597

wire.makeOffset2D : 99% cpu (dead loop ?)

Hi FreeCAD Forumer In my file, offsetting a wire (or face) result in a dead loop with cpu at 99.x % (after five minutes still working...) Here is a pic of the model : http://cristianandreon.eu/images/makeOffset2D.jpg the native files (0.18) : http://cristianandreon.eu/dw/offset - deadloop.FCStd and ...
by cristian.a73
Tue Jan 29, 2019 1:09 am
Forum: Path/CAM
Topic: PathPocketShape.StartDepth : unable to change in FreeCADCmd
Replies: 2
Views: 542

Re: PathPocketShape.StartDepth : unable to change in FreeCADCmd

I hope it's as simple as that: You have a typo in "tessellate". naturally it was a syntax error typing the post, not in the code (there isn't any axception in the execution) ... sorry for that ... but wait a moment ... it works :D Now I see, tessellate was simply commented out from the co...
by cristian.a73
Tue Jan 29, 2019 12:38 am
Forum: Path/CAM
Topic: PathPocketShape.StartDepth : unable to change in FreeCADCmd
Replies: 2
Views: 542

PathPocketShape.StartDepth : unable to change in FreeCADCmd

Hi FreeCAD Forumer In my code I create a PathPocketShape object onto a planar face, by doing this : pRootObject.Shape.tessellate(0.1) localJobObj = PathJob.Create("Job", [ pRootObject ] ) objFaceMill = PathPocketShape.Create(opTitle) objFaceMill.Base = [ ( pRoot, ( face_name ) ) ] objFaceM...
by cristian.a73
Tue Jan 15, 2019 9:53 am
Forum: Python scripting and macros
Topic: Face.Surface : memory leak ?
Replies: 8
Views: 1578

Re: Face.Surface : memory leak ?

:idea: ... a possible workaround :

Code: Select all

sh = App.ActiveDocument.ActiveObject.Shape
sfArr = []
for f in sh.Faces:
 sfArr.append(f.Surface)

for i in range(0,1000000):
 for sf in sfArr:
  print "sf:"+str(sf)
  ...
by cristian.a73
Fri Jan 11, 2019 10:28 am
Forum: Python scripting and macros
Topic: Face.Surface : memory leak ?
Replies: 8
Views: 1578

Re: Face.Surface : memory leak ?

wandererfan wrote: Fri Jan 11, 2019 3:44 am Maybe you need to force garbage collection? del isn't guaranteed to free up memory immediately.

Code: Select all

import gc
gc.collect()
Unfortunally gc has no effect :cry:
by cristian.a73
Thu Jan 10, 2019 8:52 pm
Forum: Python scripting and macros
Topic: Face.Surface : memory leak ?
Replies: 8
Views: 1578

Face.Surface : memory leak ?

Hi FreeCAD Forumer In my model, about 6000 faces from step my code is something like this : for f in Shape.faces: sf = f.Surface del sf The FreeCADCmd run until all 4gb of free Ram was used (aprox 20kb per second), than crash with message about no memory available How could access to Face.Surface cl...
by cristian.a73
Thu Jan 03, 2019 7:28 pm
Forum: Path/CAM
Topic: PathPocketShape : unexpected result by OffsetPattern
Replies: 2
Views: 485

Re: PathPocketShape : unexpected result by OffsetPattern

If the path generated in the UI doesn't match a scripted path through FreeCADCmd (assuming the same binary, same library versions, especially OCC) then sometimes there is a tessellation step missing. Try calling tessellate(.1) on your shape. Also, note that KeepToolDown and MinTravel are experiment...
by cristian.a73
Thu Jan 03, 2019 1:17 pm
Forum: Path/CAM
Topic: PathPocketShape : unexpected result by OffsetPattern
Replies: 2
Views: 485

PathPocketShape : unexpected result by OffsetPattern

Hi FreeCAD Forumer I'm going to use Path module for mill a simple plane as follow picture: http://cristianandreon.eu/customers/images/PathOffset1.jpg In windows it look as correct In linux (FreeCADCmd) it look like missing some segment : http://cristianandreon.eu/customers/images/PathOffset2.jpg The...
by cristian.a73
Sat Oct 13, 2018 7:57 pm
Forum: Python scripting and macros
Topic: Is Point on Face ?
Replies: 6
Views: 1160

Re: Is Point on Face ?

I tried, and it appeared to work. But then I tried checking if it respects tolerance, and it looks like it doesn't. My face lies on XY plane, and covers the origin. I tried raising the point (increase Z). And only if Z is < 1e-12, it returned True. Both argument tolerance and shape tolerance are ig...
by cristian.a73
Sat Oct 13, 2018 5:58 pm
Forum: Python scripting and macros
Topic: Is Point on Face ?
Replies: 6
Views: 1160

Re: Is Point on Face ?

then, use f.Faces[index_of_your_target_face].isInside(…) thank you but it doesn't work : >>> vx2.distToShape(f) (0.00288570504590466, [(Vector (112.216, 115.785, 10.7989), Vector (112.21469374568731, 115.785, 10.79632687091607))], [('Vertex', 0, None, 'Face', 0, (0.7778714902086804, 143.14689910059...