From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/106953 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: METAPOST: How do I get this 'max' cutafter to work? Date: Tue, 21 Apr 2020 13:29:29 +0200 Message-ID: <380159EC-C3C3-44E3-87A7-17401755BF0B@rna.nl> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.14\)) Content-Type: multipart/mixed; boundary="===============7033646497964310016==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="14190"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Apr 21 13:29:54 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jQr69-0003b7-N4 for gctc-ntg-context-518@m.gmane-mx.org; Tue, 21 Apr 2020 13:29:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 722A718340B; Tue, 21 Apr 2020 13:29:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H_yO2L7bGbR5; Tue, 21 Apr 2020 13:29:31 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D513B182325; Tue, 21 Apr 2020 13:29:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 14931182325 for ; Tue, 21 Apr 2020 13:29:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7RdyqWZ2TW3S for ; Tue, 21 Apr 2020 13:29:30 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=213.125.118.53; helo=mail.rna.nl; envelope-from=gerben.wierda@rna.nl; receiver= Original-Received: from mail.rna.nl (mail.rna.nl [213.125.118.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 644B3181F50 for ; Tue, 21 Apr 2020 13:29:30 +0200 (CEST) Original-Received: from hermione.rna.nl (hermione.rna.nl [192.168.2.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.rna.nl (Postfix) with ESMTPSA id DBAA53D8CDDC for ; Tue, 21 Apr 2020 13:29:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rna.nl; s=dkim_rsa2048; t=1587468569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=apLSdDf+4WRGa7Q45pUVFmhD+8mvMTWWVGqQsnzEXc4=; b=H6q4gSu1xSv+6DBDhonwWZ5Eh6XFp60eqH5cS9Gwkrp6TD46+xqfziUJmFuqf/IdjFYc6O GAbQDgOstLCgMX/0pdMuxFVXK6uSJrSpr3hd2tvWR0dZBS17DX5IC2Z3Glihasc+knPKU/ GrfNbWdFjRChV9E+gy579xz61m9ALRnDROOjsRUMRC8fwybUBcf5NsAoNwC+MpcTuPbACl ZT53B7I8SbQYcSpNmuFOFSSUUAHJ7BSKPiBkRmGoVcNUitmTn2A+7NQ7OpAeQl5SdqiZDU 2k8ai2YxlmEwdYCCZonUp6t2uOOD34Uay/bLn3EPOQe6eYQ+aumT4TrJc+ioaw== X-Mailer: Apple Mail (2.3445.104.14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:106953 Archived-At: --===============7033646497964310016== Content-Type: multipart/alternative; boundary="Apple-Mail=_A2CF9EA1-6164-46DE-8E91-8500A10A6ECC" --Apple-Mail=_A2CF9EA1-6164-46DE-8E91-8500A10A6ECC Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 I have these two paths, but cutting doesn=E2=80=99t work because the = path to be cut takes the wrong intersection regardless of how I direct = the path to be cut after (reverse or not). The path to cut after is a triangle with the base horizontal and the = path to cut is a vertical line. The top of the triangle is the endpoint = of the line and is selected as intersection by cutafter. This happens = also if I reverse the triangle path, strangely enough. I have an = alternative cutting algorithm, but that cuts as long as the length of = cuttings is not 0, which is the case at the top too, so it won=E2=80=99t = cut further. I need a reliable algorithm to make a =E2=80=98maximum cutafter=E2=80=99. = What might be a good approach? G path arrowHead; arrowHead :=3D (542,-77.000186920166016)..controls = (545.33333333333337,-77.000186920166016) and = (548.66666666666663,-77.000186920166016) ..(552,-77.000186920166016)..controls = (550.33333333333337,-73.666853586832687) and (548.66666666666663,-70.333520253499344) ..(547,-67.000186920166016)..controls = (545.33333333333337,-70.333520253499344) and (543.66666666666663,-73.666853586832687) ..cycle; path connection; connection :=3D (420.00004959106445,-367)..controls (420.66670256708773,-367) and = (421.333355543111,-367) ..(422.00000851913427,-367)..controls (425.33333917170194,-367) and = (428.6666698242696,-367) ..(432.00000047683727,-367)..controls (442.00000015894574,-367) and = (451.99999984105426,-367) ..(461.99999952316273,-367)..controls (464.76142345324098,-367) and = (467,-364.76142382108867) ..(467,-361.99999997656772)..controls (467,-293.99999999218926) and = (467,-226.00000000781074) ..(467,-158.00000002343228)..controls (467,-155.23857623850762) and = (469.23857634039018,-153) ..(472.00000014901161,-153)..controls (495.33333338300389,-153) and = (518.66666661699617,-153) ..(541.99999985098839,-153)..controls (544.76142368504975,-153) and = (547,-150.76142367339932) ..(547,-147.99999983662815)..controls (547,-125.99999994554271) and = (547,-104.00000005445727) ..(547,-82.000000163371837)..controls (547,-78.666668047283764) and = (547,-75.333335931195691) ..(547,-72.000003815107618)..controls (547,-70.333398183460417) and = (547,-68.666792551813217) ..(547,-67.000186920166016); show connection cutafter arrowHead; show connection cutafter (reverse arrowHead); --Apple-Mail=_A2CF9EA1-6164-46DE-8E91-8500A10A6ECC Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 I = have these two paths, but cutting doesn=E2=80=99t work because the path = to be cut takes the wrong intersection regardless of how I direct the = path to be cut after (reverse or not).

The path to cut after is a triangle = with the base horizontal and the path to cut is a vertical line. The top = of the triangle is the endpoint of the line and is selected as = intersection by cutafter. This happens also if I reverse the triangle = path, strangely enough. I have an alternative cutting algorithm, but = that cuts as long as the length of cuttings is not 0, which is the case = at the top too, so it won=E2=80=99t cut further.

I need a reliable algorithm to make a = =E2=80=98maximum cutafter=E2=80=99. What might be a good = approach?

G

path arrowHead;
arrowHead :=3D
  (542,-77.000186920166016)..controls = (545.33333333333337,-77.000186920166016) and = (548.66666666666663,-77.000186920166016)
  ..(552,-77.000186920166016)..controls = (550.33333333333337,-73.666853586832687)
  and = (548.66666666666663,-70.333520253499344)
  ..(547,-67.000186920166016)..controls = (545.33333333333337,-70.333520253499344)
  and = (543.66666666666663,-73.666853586832687)
  ..cycle;

path connection;
connection :=3D
  (420.00004959106445,-367)..controls = (420.66670256708773,-367) and = (421.333355543111,-367)
  ..(422.00000851913427,-367)..controls = (425.33333917170194,-367) and = (428.6666698242696,-367)
  ..(432.00000047683727,-367)..controls = (442.00000015894574,-367) and = (451.99999984105426,-367)
  ..(461.99999952316273,-367)..controls = (464.76142345324098,-367) and = (467,-364.76142382108867)
  ..(467,-361.99999997656772)..controls = (467,-293.99999999218926) and = (467,-226.00000000781074)
  ..(467,-158.00000002343228)..controls = (467,-155.23857623850762) and = (469.23857634039018,-153)
  ..(472.00000014901161,-153)..controls = (495.33333338300389,-153) and = (518.66666661699617,-153)
  ..(541.99999985098839,-153)..controls = (544.76142368504975,-153) and = (547,-150.76142367339932)
  ..(547,-147.99999983662815)..controls = (547,-125.99999994554271) and = (547,-104.00000005445727)
  ..(547,-82.000000163371837)..controls = (547,-78.666668047283764) and = (547,-75.333335931195691)
  ..(547,-72.000003815107618)..controls = (547,-70.333398183460417) and = (547,-68.666792551813217)
  ..(547,-67.000186920166016);

show connection cutafter = arrowHead;
show = connection cutafter (reverse arrowHead);


= --Apple-Mail=_A2CF9EA1-6164-46DE-8E91-8500A10A6ECC-- --===============7033646497964310016== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============7033646497964310016==--