From: William Adams <will.adams@frycomm.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Creating SVG: using MetaFun, exporting proper units, conversion to DXF
Date: Thu, 16 Feb 2017 15:07:42 -0500 [thread overview]
Message-ID: <CAENrYJCG=B6ei-1C_nkZ-W+2q32HvOwW-J9S44qpRX6Wu-xQwA@mail.gmail.com> (raw)
In-Reply-To: <8d99c215-c4b8-e5cd-8784-e505bc406439@wxs.nl>
[-- Attachment #1.1: Type: text/plain, Size: 4101 bytes --]
Another option here would be to use a tool which directly accepts SVGs ---
one free/opensource tool for that is PartKAM/MakerCAM.
My apologies for the late response --- investigating this sort of thing
myself, though I'll likely be using a proprietary tool, Carbide Create to
drive either a Nomad or a Shapeoko.
William
On Thu, Jun 30, 2016 at 3:15 AM, Hans Hagen <pragma@wxs.nl> wrote:
> On 6/29/2016 10:49 PM, Mojca Miklavec wrote:
>
>> On 29 June 2016 at 14:12, Hans Hagen wrote:
>>
>>> On 6/29/2016 12:31 PM, Mojca Miklavec wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> I want to play with CNC and don't yet have any experience with CAD
>>>> software (nor the licence for the expensive ones) other than perhaps
>>>> some Blender, so I decided to try to use the super ugly route with
>>>> metapost -> svg -> dxf -> g-code
>>>> for the first time.
>>>>
>>>> I have a few questions.
>>>>
>>>> (1) I love Hans' shortcuts in metafun, but I seem to remember that
>>>> things
>>>> like
>>>> input metafun;
>>>> or perhaps
>>>> input mp-tool;
>>>> used to work, so that I don't have to remember to use
>>>> mpost -mem=metafun my-drawings.mp
>>>> when compiling the graphics.
>>>>
>>>> Did the method with "input" ever work (or is it supposed to work)? Now
>>>> I'm getting a bunch of weird errors.
>>>> I would love to specify everything in the source file and then just
>>>> call mpost. If that doesn't work, that's fine, I can still add
>>>> "-mem=metafun", but ...
>>>>
>>>
>>>
>>> input metafun.mpiv ;
>>>
>>
>> How should one properly compile that file then to get the SVG?
>>
>
> some mp directive (but i never tried) as i always just use \startMPpage ..
> \stopMPpage so that fonts etc work ok too
>
> Using just "mpost something.mp" doesn't work that way.
>>
>> (2) I guess that using "raw metapost" is the only sane way to generate
>>>> SVG. If I use metapost inside ConTeXt that's probably not going to
>>>> work, right?
>>>>
>>>> (3) Is there any way to convince the SVG output mode to generate
>>>> something
>>>> like
>>>> <svg ... width="100.0mm" height="100.0mm" ... >
>>>> rather than
>>>> <svg ... width="283.46456692913387" height="283.46456692913387" ...
>>>> >
>>>> because the program I use to convert SVG to DXF has troubles
>>>> interpreting "points" properly. I read somewhere that they assume 90
>>>> points per inch because that's Inkskape's default.
>>>>
>>>
>>> why not just
>>>
>>> \startMPpage
>>> whatever you want
>>> \stopMPpage
>>>
>>> and then use mudraw (mutools) to go from pdf to svg (that's what i do
>>> when i
>>> need svg)
>>>
>>
>> Given that metapost supports SVG natively I imagined that it would
>> produce a simpler/cleaner output. Thanks a lot for the suggestion,
>> I'll test it.
>>
>
> the svg from pdf is normally quite simple as it just output the same
> paths, colors etc + text as outline
>
> It turned out that the (opensource) tools I used for converting SVG
>> into DXF gives very weird result, so I have to change the other parts
>> of the "toolchain" as well.
>>
>> Nevertheless, the question about whether one could convince MP to
>> output true units in cm/mm/in.--
>>
>
> no, but you can of course scale the whole lot just before shipping so that
> units represent cm
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
> -----------------------------------------------------------------
> ____________________________________________________________
> _______________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/list
> info/ntg-context
> webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ____________________________________________________________
> _______________________
>
[-- Attachment #1.2: Type: text/html, Size: 6928 bytes --]
[-- Attachment #2: Type: text/plain, Size: 492 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2017-02-16 20:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-29 10:31 Mojca Miklavec
2016-06-29 12:12 ` Hans Hagen
2016-06-29 20:49 ` Mojca Miklavec
2016-06-30 7:15 ` Hans Hagen
2017-02-16 20:07 ` William Adams [this message]
2017-02-17 6:33 ` Mojca Miklavec
2016-06-29 21:05 ` Jan Tosovsky
2017-07-27 1:52 ` Mojca Miklavec
2017-07-27 8:49 ` Hans Hagen
2017-07-27 14:21 ` Mojca Miklavec
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAENrYJCG=B6ei-1C_nkZ-W+2q32HvOwW-J9S44qpRX6Wu-xQwA@mail.gmail.com' \
--to=will.adams@frycomm.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).