Skip to content

Commit

Permalink
Update topology.py fix Edge.intersections edge length
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Dec 7, 2023
1 parent 65c7638 commit fe913e7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/build123d/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -4358,12 +4358,14 @@ def intersections(
Returns:
ShapeList[Vector]: list of intersection points
"""
# Convert an Axis into an edge at least as large as self
# Convert an Axis into an edge at least as large as self and Axis start point
if isinstance(edge, Axis):
self_bbox = self.bounding_box()
self_bbox_w_edge = self.bounding_box().add(
Vertex(edge.position).bounding_box()
)
edge = Edge.make_line(
edge.position + edge.direction * (-1 * self_bbox.diagonal),
edge.position + edge.direction * self_bbox.diagonal,
edge.position + edge.direction * (-1 * self_bbox_w_edge.diagonal),
edge.position + edge.direction * self_bbox_w_edge.diagonal,
)
# To determine the 2D plane to work on
plane = self.common_plane(edge)
Expand Down

0 comments on commit fe913e7

Please sign in to comment.