docs: FreeCAD wiki updates for three macros (#18)

* docs: FreeCAD wiki updates for three macros

* Fix macro and wiki metadata

* fix: minor bugs in CutObjectForMagnets macro

1. Redundant distToShape call (lines 864-868)
Issue: The _get_inset_point method computed dist_info = cut_face.distToShape(Part.Vertex(inset_point)) at line 841, but then called distToShape again at line 867 with the same arguments.
Fix: Removed the redundant call and reused the already-computed dist_info result.

2. Redundant hide transaction in main() (lines 1907-1914)
Issue: main() had a "Transaction 7: Hide original object" that duplicated the hiding logic already in execute() Transaction 8 (lines 1391-1412). Additionally, the main() version had worse error handling (re-raised exceptions instead of gracefully continuing).
Fix: Removed the redundant transaction block from main(). The execute() method's Transaction 8 already handles hiding the original object properly with graceful error handling.
This commit is contained in:
Sean P. Kane
2026-01-05 21:18:05 -08:00
committed by GitHub
parent f58b32831c
commit 4344ff7536
13 changed files with 712 additions and 20 deletions
+23
View File
@@ -35,6 +35,29 @@ jobs:
echo "Packaging macros for version: $VERSION"
- name: Update macro versions
run: |
VERSION="${{ steps.version.outputs.version }}"
TODAY=$(date +%Y-%m-%d)
echo "Updating macros to version: $VERSION (date: $TODAY)"
# Update __Version__ and __Date__ in all .FCMacro files
for macro_file in macros/*/*.FCMacro; do
if [ -f "$macro_file" ]; then
echo "Updating: $macro_file"
# Update __Version__ line (handles both single and double quotes)
sed -i "s/^__Version__ = [\"'].*[\"']/__Version__ = \"${VERSION}\"/" "$macro_file"
# Update __Date__ line (handles both single and double quotes)
sed -i "s/^__Date__ = [\"'].*[\"']/__Date__ = \"${TODAY}\"/" "$macro_file"
# Verify the changes
grep -E "^__(Version|Date)__" "$macro_file" || true
fi
done
- name: Create macro archive
run: |
VERSION="${{ steps.version.outputs.version }}"