more work on closed PL trimming. trimlines construction still not right