feat: add line-foot construction method #48

Merged
glen merged 1 commits from rest_bookI into main 2023-11-27 04:21:07 +00:00
Showing only changes of commit b8ab409fc0 - Show all commits

View File

@ -728,6 +728,17 @@ classHandler: Record<JoyceClass, ClassHandler> :=
commands.push `${aux} = Translate(${source}, ${displacement})` commands.push `${aux} = Translate(${source}, ${displacement})`
auxiliaries.push aux auxiliaries.push aux
ends[1] = aux ends[1] = aux
'foot'
pt := args.subpoints
unless pt then return
destination := args.plane
? args.plane[0]
: `Line(${pt[1]},${pt[2]})`
ends[0] = pt[0]
commands.push
`${aux} = ClosestPoint(${destination}, ${pt[0]})`
auxiliaries.push aux
ends[1] = aux
'parallel' 'parallel'
unless args.subpoints then return unless args.subpoints then return
[newStart, oldStart, oldEnd] := args.subpoints [newStart, oldStart, oldEnd] := args.subpoints