While rearranging and cleaning up the utils imports in the initial 'Import fix' commit I deleted `utils.` from `bpy.utils.script_paths()` in the ops.py file.
This has been fixed, and I took the opportunity to reverse the autoformat issue (changed line length from 100 to 89 between commits), and restore all the code to its previous state.
I made one exception:
- comments that came at the end of the line that were moved to the line above
All functional code has been restored to its previous format.
Changed all imports from absolute to relative:
- instead of importing the module 'cam' now imports come from '.' the relative parent folder
- importing the module into itself resulted in a circular import error, relative imports avoid this
Moved Functions, refs updated:
- some functions (and 2 variables) only existed on the base level of the module, in the init file, and could not otherwise be accessed, they were moved into the utils file with other similar functions
- these were primarily called as update functions for Properties scattered across the addon, these have all been updated to reflect the new location and import convention
opencamlib_version rename:
- in 2 files there was a local variable named 'opencamlib_version' that was defined by a function called 'opencamlib_version' that returned the opencamlib_version
- this seemed to confuse Blender into thinking that it was being called before it was defined, and simply changing the variable name to 'ocl_version' while keeping the function name as 'opencamlib_version' fixed the issue
Ran Autopep8 on all files in repo, they are otherwise untouched with one exception:
In the __init__ file, I had to manually rearrange the import statements to avoid triggering a circular import error.
This will be addressed in a future commit.
Updated authors in bl_info to: 'Vilem Novak & Contributors' - this can be changed as required
Updated version to: 1.0.5
added 2 variables for pack to make it more usable.
Rotate angle between 11.25 to 180 deg. (was 1 degree)
tolerance (distance between evaluations) used to be 1mm now varable between 1 and 20mm
Prepared geometery not setup properly so reverting to using basic
geometry object collision for now.
allpoly would have to be setup as a prepared geometry and not a Polygon
at the begining before entering the collision check loop. disjoint
method is for Geometry objects and not for prepared geometry.
the memory limit is a new feature, preventing crashes when ppl. e.g.
compute path on the default size obects, and also any other cases with
non-exact mode.
otherwise, big, happy removal of polygon library residues. This library
is NO logner a dependency of blender CAM. Shapely library works far
better in most cases. Sometimes it's slower but this can be compensated
with optimizations almost always quite easily.
optimized pack algo, works same speed as with polygon or a bit faster.
Did this mainly to learn how to optimize shapely code a bit to get
better faster results...
fixed bug in nc, when exporting more than 1 axis.
tried to generalize 4 axis path generation code
re-allowed more panels hooked to specific renderers in the interface
Changed the way rotations are stored in the path mesh object - now they are stored as shape keys
-separate slicing code, it has now separate file slice.py and a panel, similar to pack curves.
-very first experiments towards medial axis algorithm, will probably replace this with openvoronoi if I suceed in compiling it for windows.
- fix error message with use of curves that are not on a visible layer, curves get moved to visible layer temporarily.
- comments for pack.py
- improve testing script
- splitting of files now lifts the cutter on file end, and writes spindle and feedrate info in the following files
-voronoi diagram library taken from the VoronoiDelaunay add-on from blender. I tested about 4 versions of this library and this one is most stable. to be hopefully replaced with OpenVoronoi.
-removed some debugging comments
-fixed a bug with alignment - all cutouts and silhouettes were offest by amout of 2 pixels! This was introduced with another fix