Skip to content

Commit 505a18d

Browse files
Mention periodic surface sewing (#1917)
Co-authored-by: adam-urbanczyk <[email protected]>
1 parent af310d8 commit 505a18d

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

doc/free-func.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,35 @@ to work with higher level objects like wires.
417417
result = base.trim(w)
418418

419419

420+
Note that trimming of periodic faces requires manual seam construction and an additional sewing
421+
step to ensure correctness.
422+
423+
424+
.. cadquery::
425+
426+
from cadquery.func import circle, extrude, spline, edgeOn, segment, wire, shell
427+
from math import pi
428+
429+
# base
430+
r = 5
431+
h = 5
432+
433+
f = extrude(circle(r), (0, 0, -h))
434+
435+
# trimming edges
436+
spl = spline([(0, h), (pi, h / 2.5), (2 * pi, h)], tgts=[(0.1, 0), (0.1, 0)])
437+
top = edgeOn(f, spl)
438+
bot = edgeOn(f, segment((2 * pi, 0), (0, 0)))
439+
side1 = edgeOn(f, segment((0, 0), (0, h)))
440+
side2 = edgeOn(f, segment((2 * pi, h), (2 * pi, 0)))
441+
442+
# trimming wire
443+
trim_wire = wire(top, side1, bot, side2)
444+
445+
# trim and sew
446+
result = shell(f.trim(trim_wire))
447+
448+
420449
Finally, it is also possible to map complete faces.
421450

422451

0 commit comments

Comments
 (0)