kopia lustrzana https://github.com/vilemduha/blendercam
move profiler option into cam module
rodzic
69e12c8c9b
commit
2f21a3d423
|
@ -24,4 +24,6 @@ forceSyncWithUpstream
|
|||
|
||||
.pydevproject
|
||||
__pycache__/
|
||||
temp_cam/
|
||||
temp_cam/
|
||||
# profiler output files
|
||||
*.prof
|
|
@ -34,6 +34,8 @@ import time
|
|||
|
||||
from pathlib import Path
|
||||
|
||||
USE_PROFILER = False
|
||||
|
||||
try:
|
||||
import shapely
|
||||
except ImportError:
|
||||
|
|
|
@ -33,6 +33,7 @@ import numpy
|
|||
|
||||
from cam import chunk
|
||||
from cam.chunk import *
|
||||
from cam import USE_PROFILER
|
||||
|
||||
from cam import collision
|
||||
from cam.collision import *
|
||||
|
@ -59,8 +60,6 @@ from cam.image_utils import *
|
|||
from cam.opencamlib.opencamlib import *
|
||||
from cam.nc import iso
|
||||
|
||||
PROFILING=False # set this true to run cprofile on code
|
||||
|
||||
def pointonline(a, b, c, tolerence):
|
||||
b = b - a # convert to vector by subtracting origin
|
||||
c = c - a
|
||||
|
@ -543,7 +542,7 @@ async def getPath(context, operation): # should do all path calculations.
|
|||
print(operation.machine_axes)
|
||||
|
||||
if operation.machine_axes == '3':
|
||||
if PROFILING==True: # profiler
|
||||
if USE_PROFILER == True: # profiler
|
||||
import cProfile, pstats, io
|
||||
pr = cProfile.Profile()
|
||||
pr.enable()
|
||||
|
|
Ładowanie…
Reference in New Issue