Files
animation/characters/female/lena_nude/hires_work/verify_03.py
T
jeremy 3ba86b2ea8 feat: clothing lane, character sources, and DCC bridges
Bulk import of the working lanes that were living untracked on the PC.

Content:
- characters/  Lena/male body lanes, bakes, texture work, run logs
- clothing/    garment pipeline, configs, gates, contract docs
- garments/    MD-authored garment sources (.zprj/.zpac)
- UAL-Lib/     Universal Animation Library 2 source (.blend/.fbx/.glb)
- tools/       blender_bridge, iclone_bridge, md_bridge, tailor, glm_agent
- docs/, plans/, dev/, .agents/plans/

Repo hygiene:
- .gitattributes: LFS now covers .blend, .zprj, .zpac, .obj, .npy and the
  Reallusion .iAvatar/.ccAvatar/.ccRestore containers. Without this the
  ~3.8 GB in this commit would land as raw blobs. .png/.jpg are left out
  on purpose — ~250 are already tracked raw and converting them would
  rewrite every one without shrinking history.
- .gitignore: exclude /accurig/ (~1 GB AccuRig program files, redistributable
  from Reallusion, nothing authored here) and /dev/null/ (git-lfs hook copies
  dropped by a `>/dev/null` redirect on Windows).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-06 15:55:43 -07:00

47 lines
1.6 KiB
Python

import bpy
import sys
import os
import numpy as np
import bmesh
sys.path.append(os.getcwd())
bpy.ops.wm.open_mainfile(filepath='characters/female/lena_nude/hires_work/03_sculpted.blend')
obj = bpy.context.active_object
mesh = obj.data
verts = np.empty(len(mesh.vertices) * 3, dtype=np.float32)
mesh.vertices.foreach_get('co', verts)
verts = verts.reshape(-1, 3)
z = verts[:, 2]
y = verts[:, 1]
x = verts[:, 0]
print('--- Verification ---')
apex_z_target = 0.688
apex_mask = (z > apex_z_target - 0.01) & (z < apex_z_target + 0.01)
if np.any(apex_mask):
apex_y = y[apex_mask]
apex_x = x[apex_mask]
min_y = np.min(apex_y)
print(f'Apex Z range: {np.min(z[apex_mask]):.3f} - {np.max(z[apex_mask]):.3f}')
print(f'Apex Y (front-most): {min_y:.4f}')
print(f'Apex X range: {np.min(apex_x):.3f} to {np.max(apex_x):.3f}')
chest_wall_y = -0.1565
proj = abs(min_y - chest_wall_y)
print(f'Projection: {proj:.4f} (Target 0.036-0.044)')
else:
print('No vertices found at apex Z.')
print('--- Cleavage Check ---')
sternum_mask = (np.abs(x) < 0.005) & (z > 0.65) & (z < 0.72)
if np.any(sternum_mask):
sternum_y = y[sternum_mask]
sternum_z = z[sternum_mask]
min_idx = np.argmin(sternum_y)
print(f'Sternum at apex Z ({apex_z_target}): Y={sternum_y[min_idx]:.4f}')
print(f'Gap to Apex: {min_y - sternum_y[min_idx]:.4f} (Target > 0.015)')
else:
print('No sternum vertices found.')
print('--- Boundary Check ---')
bm = bmesh.new()
bm.from_mesh(mesh)
bm.edges.ensure_lookup_table()
boundary_edges = [e for e in bm.edges if e.is_boundary]
print(f'Open boundary edges: {len(boundary_edges)}')