Skip to content

Commit

Permalink
operations_generic.py -> add dependency on isclose_b from topology.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Aug 29, 2024
1 parent baa8055 commit d631d07
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/build123d/operations_generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

import copy
import logging
from math import radians, tan, isclose
from math import radians, tan
from typing import Union, Iterable

from build123d.build_common import (
Expand Down Expand Up @@ -69,6 +69,7 @@
Solid,
Vertex,
Wire,
isclose_b,
)

logging.getLogger("build123d").addHandler(logging.NullHandler())
Expand Down Expand Up @@ -361,15 +362,13 @@ def chamfer(
if not target.is_closed:
object_list = filter(
lambda v: not (
isclose(
isclose_b(
(Vector(*v.to_tuple()) - target.position_at(0)).length,
0.0,
abs_tol=1e-14,
)
or isclose(
or isclose_b(
(Vector(*v.to_tuple()) - target.position_at(1)).length,
0.0,
abs_tol=1e-14,
)
),
object_list,
Expand Down Expand Up @@ -462,15 +461,13 @@ def fillet(
if not target.is_closed:
object_list = filter(
lambda v: not (
isclose(
isclose_b(
(Vector(*v.to_tuple()) - target.position_at(0)).length,
0.0,
abs_tol=1e-14,
)
or isclose(
or isclose_b(
(Vector(*v.to_tuple()) - target.position_at(1)).length,
0.0,
abs_tol=1e-14,
)
),
object_list,
Expand Down

0 comments on commit d631d07

Please sign in to comment.