No description
  • Python 99.6%
  • Batchfile 0.2%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Codewhale ffd60ec0c5 Fix 'Vector division: divide by zero error' during scaling
scale_distance() offsets each vertex along the average normal of its linked
faces. A vertex with no faces at all -- a stray point left behind by a cut or a
clean-up pass -- has an empty normal list, so sum(norms) / len(norms) divided by
zero and the scaling step aborted with 'Vector division: divide by zero error'.

Confirmed by reproducing it: adding a single face-less vertex to an otherwise
healthy mesh makes scale_distance raise exactly that error.

Three more functions had the same unguarded pattern, all reached from steps the
user can hit:

- scale_distance()               (scaling; the reported failure)
- scale_selected_verts_distance_xy()  (thickness, connector outer shell)
- move_verts_along_faces_normal()     (sculpt push/pull, custom thickness)
- transfer_color_attr_source_target() (colour transfer during remesh)

Each now skips vertices with no usable normal instead of dividing by zero, and
zero-length normals are filtered as well (normalizing them silently produced a
zero vector).

Verified: scaling with three injected stray vertices completes and reaches
verify_scaling with no error; percentage scaling keeps its accuracy (+3%
remeasures at 1.0295-1.0302); all four scaling branches, the
scaling-to-thickness flow, sculpting, five consecutive rollbacks and the full
11-stage regression still pass.
2026-11-18 01:31:31 +05:00
.run Refactor Blender plugin installer and add debug setup instructions 2025-03-15 02:00:30 +07:00
.vscode Fixed Windows launch config 2025-04-14 21:29:34 +07:00
ufit Fix 'Vector division: divide by zero error' during scaling 2026-11-18 01:31:31 +05:00
.example.env Refactor Blender plugin installer and add debug setup instructions 2025-03-15 02:00:30 +07:00
.gitignore feat: moving to newer blender versions. 2026-11-17 14:59:51 +05:00
build_addon_zip.py Add build_addon_zip.py to package the add-on for Blender 2026-11-17 15:27:29 +05:00
DEBUG.md Enable Developer Extras as a debugging step in Blender 2025-03-15 18:55:17 +07:00
FAQ.md Add files via upload 2025-04-14 11:34:34 +03:00
install_plugin_launch_blender.bat Refactor Blender plugin installer and add debug setup instructions 2025-03-15 02:00:30 +07:00
install_plugin_launch_blender.sh Refactor Blender plugin installer and add debug setup instructions 2025-03-15 02:00:30 +07:00
LICENSE initial commit 2023-07-04 13:08:15 +02:00
README.md Add build_addon_zip.py to package the add-on for Blender 2026-11-17 15:27:29 +05:00
requirements.txt Add mathutils dependency and utility functions for vertices 2025-04-10 17:05:10 +07:00

uFit Blender Add-on

Welcome to the uFit Blender Add-on repository! This add-on is designed to empower O&P specialists in the creation of various types of O&P medical devices using 3D software.

Available O&P Devices

  • Transtibial Prosthetic Sockets: Currently, the add-on allows you to create highly customized transtibial prosthetic sockets. We are continuously working to add support for additional O&P devices in the near future.
  • Transfemoral Prosthetic Sockets: Support for above-knee prosthetic sockets.
  • Free Sculpting: General sculpting tools for O&P applications.

Installation

  1. Build the add-on ZIP (Python 3, no dependencies):

    python3 build_addon_zip.py            # writes dist/ufit-<version>.zip
    python3 build_addon_zip.py --verify   # also check it registers in Blender
    

    The script ships only what the add-on needs at runtime: it skips __pycache__, ufit.ini, the local patches/ hooks and the ~870 MB of ufit/debug patient fixtures. Use --include-debug if you need those in the archive.

  2. In Blender, go to Edit → Preferences → Add-ons

  3. Click Install and select the ZIP file

  4. Enable the uFit add-on by checking the checkbox

No registration or login required. Click Continue Offline on the first screen to start modelling immediately; the optional platform account is only used to upload anonymous usage counts (how many devices were created).

Key Features

  • Import 3D Scan: Effortlessly import a 3D scan of a patient's limb.
  • Advanced Scan Clean Up: Clean an imported scan to remove imperfections and noise.
  • Circumference Measurement: Use an automated circumference measurement tool directly within the modeling environment.
  • Sculpt with Scaling and Pressure Points: Sculpt and shape the socket with ease using scaling and pressure points. Achieve optimal comfort and functionality by customizing the socket's contours based on individual patient needs.
  • Efficient Cut Out and Trim Line Creation: Perform the cut out process smoothly with uFit's flexible trim line. Easily define the trim line of the socket for precise and comfortable prosthetic fittings.
  • Variable Print Thickness: Customize the thickness of your 3D printable sockets.
  • Connector Alignment and Integration: Import a connector and seamlessly align it to your socket.
  • STL Export for 3D Printing: Export your meticulously designed sockets in the widely supported STL file format.

License

This project is licensed under the GPL-3.0 License.

Troubleshooting

  • After changing the language in Blender, click the button "Restart".
  • If you encounter errors, check the Blender console for detailed error messages.