mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Fixed 1 tangent/pnt and center
Some checks are pending
benchmarks / benchmarks (macos-13, 3.12) (push) Waiting to run
benchmarks / benchmarks (macos-14, 3.12) (push) Waiting to run
benchmarks / benchmarks (ubuntu-latest, 3.12) (push) Waiting to run
benchmarks / benchmarks (windows-latest, 3.12) (push) Waiting to run
Upload coverage reports to Codecov / run (push) Waiting to run
pylint / lint (3.10) (push) Waiting to run
Run type checker / typecheck (3.10) (push) Waiting to run
Run type checker / typecheck (3.13) (push) Waiting to run
Wheel building and publishing / Build wheel on ubuntu-latest (push) Waiting to run
Wheel building and publishing / upload_pypi (push) Blocked by required conditions
tests / tests (macos-13, 3.10) (push) Waiting to run
tests / tests (macos-13, 3.13) (push) Waiting to run
tests / tests (macos-14, 3.10) (push) Waiting to run
tests / tests (macos-14, 3.13) (push) Waiting to run
tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
tests / tests (windows-latest, 3.10) (push) Waiting to run
tests / tests (windows-latest, 3.13) (push) Waiting to run
Some checks are pending
benchmarks / benchmarks (macos-13, 3.12) (push) Waiting to run
benchmarks / benchmarks (macos-14, 3.12) (push) Waiting to run
benchmarks / benchmarks (ubuntu-latest, 3.12) (push) Waiting to run
benchmarks / benchmarks (windows-latest, 3.12) (push) Waiting to run
Upload coverage reports to Codecov / run (push) Waiting to run
pylint / lint (3.10) (push) Waiting to run
Run type checker / typecheck (3.10) (push) Waiting to run
Run type checker / typecheck (3.13) (push) Waiting to run
Wheel building and publishing / Build wheel on ubuntu-latest (push) Waiting to run
Wheel building and publishing / upload_pypi (push) Blocked by required conditions
tests / tests (macos-13, 3.10) (push) Waiting to run
tests / tests (macos-13, 3.13) (push) Waiting to run
tests / tests (macos-14, 3.10) (push) Waiting to run
tests / tests (macos-14, 3.13) (push) Waiting to run
tests / tests (ubuntu-latest, 3.10) (push) Waiting to run
tests / tests (ubuntu-latest, 3.13) (push) Waiting to run
tests / tests (windows-latest, 3.10) (push) Waiting to run
tests / tests (windows-latest, 3.13) (push) Waiting to run
This commit is contained in:
parent
2d280a0deb
commit
32fb6c4ed6
2 changed files with 3 additions and 10 deletions
|
|
@ -550,7 +550,6 @@ def _make_3tan_arcs(
|
|||
def _make_tan_cen_arcs(
|
||||
object_1: tuple[Edge, PositionConstraint] | Vertex | VectorLike,
|
||||
center: VectorLike | Vertex,
|
||||
sagitta_constraint: LengthConstraint = LengthConstraint.SHORT, # unused here
|
||||
*,
|
||||
edge_factory: Callable[[TopoDS_Edge], TWrap],
|
||||
) -> ShapeList[Edge]:
|
||||
|
|
@ -572,7 +571,7 @@ def _make_tan_cen_arcs(
|
|||
if isinstance(object_1, tuple):
|
||||
object_one, obj1_qual = object_1
|
||||
else:
|
||||
object_one = object_1
|
||||
object_one, obj1_qual = object_1, None
|
||||
|
||||
# ---------------------------
|
||||
# Build fixed center (gp_Pnt2d)
|
||||
|
|
@ -609,7 +608,7 @@ def _make_tan_cen_arcs(
|
|||
|
||||
else:
|
||||
# Case B: tangency target is a curve/edge (qualified curve)
|
||||
gcc = Geom2dGcc_Circ2dTanCen(q_o1, c2d, TOLERANCE)
|
||||
gcc = Geom2dGcc_Circ2dTanCen(q_o1, Geom2d_CartesianPoint(c2d), TOLERANCE)
|
||||
if not gcc.IsDone() or gcc.NbSolutions() == 0:
|
||||
raise RuntimeError(
|
||||
"Unable to find circle(s) tangent to target with fixed center"
|
||||
|
|
|
|||
|
|
@ -1670,7 +1670,6 @@ class Edge(Mixin1D, Shape[TopoDS_Edge]):
|
|||
tangency_one: tuple[Edge, PositionConstraint] | Vertex | VectorLike,
|
||||
*,
|
||||
center: VectorLike,
|
||||
sagitta_constraint: LengthConstraint = LengthConstraint.SHORT,
|
||||
) -> ShapeList[Edge]:
|
||||
"""make_constrained_arcs
|
||||
|
||||
|
|
@ -1681,9 +1680,6 @@ class Edge(Mixin1D, Shape[TopoDS_Edge]):
|
|||
tangency_one (tuple[Edge, PositionConstraint] | Vertex | VectorLike):
|
||||
Geometric entity to be contacted/touched by the circle(s)
|
||||
center (VectorLike): center position
|
||||
sagitta_constraint (LengthConstraint, optional): returned arc selector
|
||||
(i.e. either the short, long or both arcs). Defaults to
|
||||
LengthConstraint.SHORT.
|
||||
|
||||
Returns:
|
||||
ShapeList[Edge]: tangent arcs
|
||||
|
|
@ -1794,9 +1790,7 @@ class Edge(Mixin1D, Shape[TopoDS_Edge]):
|
|||
and radius is None
|
||||
and center_on is None
|
||||
):
|
||||
return _make_tan_cen_arcs(
|
||||
*tangencies, center, sagitta_constraint, edge_factory=cls
|
||||
)
|
||||
return _make_tan_cen_arcs(*tangencies, center, edge_factory=cls)
|
||||
if tan_count == 1 and center_on is not None and radius is not None:
|
||||
return _make_tan_on_rad_arcs(
|
||||
*tangencies, center_on, radius, sagitta_constraint, edge_factory=cls
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue