Search found 32 matches

Go to advanced search

by cristian.a73
Mon Feb 11, 2019 3:37 pm
Forum: Python scripting and macros
Topic: wire.makeOffset2D : 99% cpu (dead loop ?)
Replies: 2
Views: 139

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

after several test can say makeOffset2D is simply a nightmare! nothing of these steps make it work : Curve.makeC1Continuous(0.2÷0.001) Curve.toBiArcs(0.50÷0.01) Curve.toBezier() Curve.toNurbs() Curve.toNurbs().toBiArcs(0.50÷0.01) I'm thinking the best way it to implement my own ... makeOffset2D is k...
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: 139

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: 113

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 code (13.000...
by cristian.a73
Tue Jan 29, 2019 12:38 am
Forum: Path/CAM
Topic: PathPocketShape.StartDepth : unable to change in FreeCADCmd
Replies: 2
Views: 113

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 ) ) ] objFaceMill.recomp...
by cristian.a73
Tue Jan 15, 2019 9:53 am
Forum: Python scripting and macros
Topic: Face.Surface : memory leak ?
Replies: 8
Views: 296

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: 296

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: 296

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: 144

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: 144

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: 175

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...

Go to advanced search