feat: 完善 Face 一级编辑与隔离计算
This commit is contained in:
@@ -17,6 +17,7 @@ from OCC.Core.gp import gp_Ax2, gp_Dir, gp_Pnt
|
||||
|
||||
from step_editor.geometry_utils import _finalize_boolean_result
|
||||
from step_editor.model import StepModel
|
||||
from step_editor.operations import _is_effectively_full_cylinder
|
||||
from step_editor.step_io import _write_step
|
||||
|
||||
|
||||
@@ -113,6 +114,18 @@ def _assert_radii(model: StepModel, expected: tuple[float, ...], label: str) ->
|
||||
raise SystemExit(f"{label}: radii should be {expected_values}, got {radii}")
|
||||
|
||||
|
||||
def _assert_split_same_domain_cylinder_identity() -> None:
|
||||
if not _is_effectively_full_cylinder(
|
||||
{
|
||||
"angular_span": 3.141592653589793,
|
||||
"same_domain_angular_span": 6.283185307179586,
|
||||
}
|
||||
):
|
||||
raise SystemExit("split same-domain cylinder should be treated as a full cylinder")
|
||||
if _is_effectively_full_cylinder({"angular_span": 3.141592653589793}):
|
||||
raise SystemExit("single partial cylinder should not be treated as a full cylinder")
|
||||
|
||||
|
||||
def _run_isolated_worker(
|
||||
input_path: Path,
|
||||
operation: str,
|
||||
@@ -263,6 +276,7 @@ def _run_prismatic_cap_push_pull_case(path: Path, distance: float, target_height
|
||||
|
||||
|
||||
def main() -> int:
|
||||
_assert_split_same_domain_cylinder_identity()
|
||||
with tempfile.TemporaryDirectory(prefix="geom_param_cylinder_height_") as temp_dir:
|
||||
root = Path(temp_dir)
|
||||
solid_path = root / "solid_cylinder.step"
|
||||
|
||||
Reference in New Issue
Block a user