Skip to content

Commit

Permalink
fix: various improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
RobPasMue committed Feb 6, 2025
1 parent b48cd0e commit b6f7034
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/integration/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,16 +256,14 @@ def test_issue_1724_intersect_failures(modeler: Modeler):
plane = Plane(point, UNITVECTOR3D_X, UNITVECTOR3D_Y)
sketch_cylinder = Sketch(plane)
sketch_cylinder.circle(Point2D([0.0, 0.0], unit=unit), radius=radius)
cylinder = design.extrude_sketch("cylinder", sketch_cylinder, wz)

# Store the cylinder volume
cylinder_volume = cylinder.volume
cylinder = design.extrude_sketch("cylinder", sketch_cylinder, wz-0.1)

# Request the intersection
cylinder.intersect(box)

# Only the cylinder should be present
assert len(design.bodies) == 1
assert design.bodies[0].name == "cylinder"
# Verify that the volume of the cylinder is the same
assert design.bodies[0].volume == cylinder_volume

# Verify that the volume of the cylinder is the same (the intersect is the same as the cylinder)
assert np.isclose(design.bodies[0].volume.m, np.pi * radius ** 2 * (wz - 0.1))

0 comments on commit b6f7034

Please sign in to comment.