Merge branch 'pppalain:master' into master

pull/277/head^2
SpectralVectors 2024-12-27 11:55:17 -05:00 zatwierdzone przez GitHub
commit 5705df52e7
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
7 zmienionych plików z 44 dodań i 13 usunięć

Wyświetl plik

@ -10,7 +10,7 @@ jobs:
uses: rickstaa/action-black@v1
id: action_black
with:
black_args: "./scripts/addons/cam --line-length=100"
black_args: "."
- name: Create Pull Request
if: steps.action_black.outputs.is_formatted == 'true'
uses: peter-evans/create-pull-request@v6

5
pyproject.toml 100644
Wyświetl plik

@ -0,0 +1,5 @@
[tool.black]
line-length = 100
target-version = ['py311']
include = '\.py'

Wyświetl plik

@ -1,7 +1,7 @@
schema_version = "1.0.57"
schema_version = "1.0.60"
id = "fabex"
version = "1.0.57"
version = "1.0.60"
name = "Fabex CNC (formerly BlenderCAM)"
tagline = "G-code Generation Tools"
maintainer = "Alain Pelletier and Contributors"

Wyświetl plik

@ -87,7 +87,7 @@ def create_parametric_curve(
use_cubic: bool = True,
iterations: int = 8,
resolution_u: int = 10,
**kwargs
**kwargs,
):
"""
Creates a Blender bezier curve object from a parametric function.

Wyświetl plik

@ -10,6 +10,7 @@ from .shapely_utils import shapely_to_curve, shapely_to_multipolygon
from .simple_utils import (
activate,
progress,
unit_value_to_string,
)
@ -242,14 +243,38 @@ def get_bounds(o):
o.max.z = o.source_image_offset.z
s = bpy.context.scene
m = s.cam_machine
# make sure this message only shows once and goes away once fixed
o.info.warnings.replace("Operation Exceeds Your Machine Limits\n", "")
if (
o.max.x - o.min.x > m.working_area.x
or o.max.y - o.min.y > m.working_area.y
or o.max.z - o.min.z > m.working_area.z
):
o.info.warnings += "Operation Exceeds Your Machine Limits\n"
x_delta_range = o.max.x - o.min.x
y_delta_range = o.max.y - o.min.y
z_delta_range = o.max.z - o.min.z
x_is_exceeded = x_delta_range > m.working_area.x
y_is_exceeded = y_delta_range > m.working_area.y
z_is_exceeded = z_delta_range > m.working_area.z
if x_is_exceeded or y_is_exceeded or z_is_exceeded:
exceed_msg = "Operation Exceeds Your Machine Limits (range > working area)\n"
# Do not append more than one such a warning
if exceed_msg not in o.info.warnings:
o.info.warnings += exceed_msg
if x_is_exceeded:
o.info.warnings += (
f"Axis X[ range:{unit_value_to_string(x_delta_range)}"
+ f", working area:{unit_value_to_string(m.working_area.x)}]\n"
)
if y_is_exceeded:
o.info.warnings += (
f"Axis Y[ range:{unit_value_to_string(y_delta_range)}"
+ f", working area:{unit_value_to_string(m.working_area.y)}]\n"
)
if z_is_exceeded:
o.info.warnings += (
f"Axis Z[ range:{unit_value_to_string(z_delta_range)}"
+ f", working area:{unit_value_to_string(m.working_area.z)}]\n"
)
if not o.info.warnings == "":
addon_prefs = bpy.context.preferences.addons["bl_ext.user_default.fabex"].preferences
if addon_prefs.show_popups:

Wyświetl plik

@ -12,6 +12,7 @@ import bpy
from bpy_extras import object_utils
from .simple_utils import get_cache_path
from .simple_utils import unit_value_to_string
from ..constants import was_hidden_dict

Wyświetl plik

@ -1 +1 @@
__version__ = (1, 0, 57)
__version__=(1,0,60)