MCPcopy
hub / github.com/CadQuery/cadquery / test_dxf_import

Function test_dxf_import

tests/test_sketch.py:755–777  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

753
754
755def test_dxf_import():
756
757 filename = os.path.join(testdataDir, "gear.dxf")
758
759 s1 = Sketch().importDXF(filename, tol=1e-3)
760
761 assert s1._faces.isValid()
762
763 s2 = Sketch().importDXF(filename, tol=1e-3).circle(5, mode="s")
764
765 assert s2._faces.isValid()
766
767 s3 = Sketch().circle(20).importDXF(filename, tol=1e-3, mode="s")
768
769 assert s3._faces.isValid()
770
771 s4 = Sketch().importDXF(filename, tol=1e-3, include=["0"])
772
773 assert s4._faces.isValid()
774
775 s5 = Sketch().importDXF(filename, tol=1e-3, exclude=["1"])
776
777 assert s5._faces.isValid()
778
779
780def test_val():

Callers

nothing calls this directly

Calls 4

SketchClass · 0.90
importDXFMethod · 0.80
isValidMethod · 0.80
circleMethod · 0.45

Tested by

no test coverage detected