From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/110043 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Jairo A. del Rio" Newsgroups: gmane.comp.tex.context Subject: Check if two paths intersect in Metafun Date: Fri, 25 Dec 2020 08:48:25 -0500 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1894577738037705984==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7026"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Dec 25 14:49:13 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 1ksnSz-0001iD-77 for gctc-ntg-context-518@m.gmane-mx.org; Fri, 25 Dec 2020 14:49:13 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 228971C16CC; Fri, 25 Dec 2020 14:48:41 +0100 (CET) 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 Xh6HCr_EaOP0; Fri, 25 Dec 2020 14:48:39 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4B10D1C16C1; Fri, 25 Dec 2020 14:48:39 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id DF5CB1C16C1 for ; Fri, 25 Dec 2020 14:48:37 +0100 (CET) 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 xqNVVYF7St4w for ; Fri, 25 Dec 2020 14:48:37 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.128.53; helo=mail-wm1-f53.google.com; envelope-from=jairoadelrio6@gmail.com; receiver= Original-Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 641E51C167A for ; Fri, 25 Dec 2020 14:48:37 +0100 (CET) Original-Received: by mail-wm1-f53.google.com with SMTP id k10so3653768wmi.3 for ; Fri, 25 Dec 2020 05:48:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=2G38LjyWS9tMLs4QPjN8zlbDHffVG9VLCkjt9tjHWjc=; b=W5/sB+fyojb4LPohzkYvERRTKsWOFuhB/1JAII4Yfog2oYJj6yrv7o8RdbusIxgt0I V/FJE1Kjknul2w3MxZKVU9Vjm8KhHW02qqOFESd9EfnD3+HwcmZDBHlvbxAQimnyPonY xAJnpOl5/ekSggtwp4qPXJDthtaxINoR8gAAM+9gQ62UiQBjyn9rj3w6OUYLajTtFoPa pDb37EL70N6z4aDvD+7fd0eCiIs2busieSQdCouLmXLMvzKleP8rLzt/Hi428ktjAApn VtodJKgUWnS3X4kFsvrV9APMGrOLsjJD5iium8NLWEYjzBDwTfwIJ5EToCxMYzhsSMbY LkMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=2G38LjyWS9tMLs4QPjN8zlbDHffVG9VLCkjt9tjHWjc=; b=uMQlMNFx0jNazGU1ztz+53JU3tDyI77hO6HKr4JMZU5SIlLavL+Uxhq5SmN6YTkwdF pirHTtK4V8RRwAqW4bHxzeKPxorvgNZDrw1OzKMYAYkdwc09G76Pd8+4wcrbKaMskChG Gh5aXRKqibbH8fYLPwo7t5nfGhT7jqbYMZFeeMwphbq+uOGvrNQv8HDQ1dBE7CUaZoEQ //X/iDs8FnQsKNnSpl5n/lrePjdnPmL/neYfgTfyyk2PGplQZBeGMp8cBF+CSRdYAsby c3ndypPUexIu9E5W7M2yr85sTjrxA6/cUwJsOCY33xWbCBP/K+lq2XzWv2ngzrnW2mSo LGHQ== X-Gm-Message-State: AOAM530oduUUwoL+ebrq7JTGmfwTyAq3SO92UqbTHaFGMNuESF4V85lj K8aWeuMLYQ0wzCa70nJbZm2z4zQVp2gN0m0wWxze3EpsLm9NqA== X-Google-Smtp-Source: ABdhPJyWK/vxKT/GSWK8e6UT7geTz6HAhLIGUfJa9u7Psr80PGz34QuxcsQeANcxac9Z3NgevbXRPPIIJMZQEkj5a3I= X-Received: by 2002:a1c:5605:: with SMTP id k5mr4343407wmb.11.1608904116852; Fri, 25 Dec 2020 05:48:36 -0800 (PST) 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:110043 Archived-At: --===============1894577738037705984== Content-Type: multipart/alternative; boundary="0000000000005cdbf305b74a2ef8" --0000000000005cdbf305b74a2ef8 Content-Type: text/plain; charset="UTF-8" Hi, list. I've got a question about paths and intersections. The following: \starttext \startMPpage path p[]; p[1] = fullcircle scaled 2cm; p[2] = unitsquare shifted (4cm,6cm); if (known (p[1] intersectionpoint p[2])): draw textext("yes"); else: draw textext("no"); fi; \stopMPpage \stoptext yields an error message: "The paths don't intersect". Is there a way to intercept this error message and trigger an action instead? Thank you in advance. Best regards, Jairo --0000000000005cdbf305b74a2ef8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi, list. I= 9;ve got a question about paths and intersections. The following:


\starttext <= /p>

\startMPpage

path p[];


p[1] =3D fullc= ircle scaled 2cm;

p[2] =3D units= quare shifted (4cm,6cm);


if (known (p[1= ] intersectionpoint p[2])):


draw textext(&= quot;yes");


else:


draw textext(&= quot;no");

fi;


\stopMPpage

\stoptext
<= br>

yields = an error message: "The paths don't intersect". Is there a way= to intercept this error message and trigger an action instead? Thank you i= n advance.

Best regards,

Jairo

--0000000000005cdbf305b74a2ef8-- --===============1894577738037705984== 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== --===============1894577738037705984==--