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

Function test_loft_vertex

tests/test_free_functions.py:1146–1161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1144
1145
1146def test_loft_vertex():
1147
1148 r1 = loft(vertex(0, 0, 1), rect(1, 1))
1149 r2 = loft(plane(1, 1), vertex(0, 0, 1))
1150 r3 = loft(vertex(0, 0, -1), plane(1, 1), vertex(0, 0, 1))
1151 r4 = loft(vertex(0, 0, -1), plane(1, 1) - plane(0.5, 0.5), vertex(0, 0, 1))
1152 r5 = loft(vertex(0, 0, -1), rect(1, 1), vertex(0, 0, 1))
1153
1154 assert len(r1.Faces()) == 4
1155 assert len(r2.Faces()) == 5
1156 assert len(r3.Faces()) == 4
1157 assert len(r3.Solids()) == 1
1158 assert len(r4.Faces()) == 4
1159 assert len(r4.Solids()) == 1
1160 assert r4.Volume() == approx(r3.Volume()) # inner features are ignored
1161 assert len(r5.Faces()) == 4
1162
1163
1164def test_project():

Callers

nothing calls this directly

Calls 7

vertexFunction · 0.85
rectFunction · 0.85
planeFunction · 0.85
SolidsMethod · 0.80
VolumeMethod · 0.80
loftFunction · 0.50
FacesMethod · 0.45

Tested by

no test coverage detected