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 ...
(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
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 ...
(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
rather than
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)
(4) Does anyone have a better proposal for conversion into DXF (or
G-code)? I'm currently playing with FreeCAD and I've seen some
tutorials showing that AutoCAD can open PDF directly, but I don't want
to buy AudoCAD just for the sake of converting files.
(Not to mention that FreeCAD's SVG importer crashes when reading
output from MetaPost unless I manually remove parts of the SVG, but
that's an unrelated problem that I'm somehow able to overcome.)
Thank you,
Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
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?
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
rather than
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.
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.
Mojca
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
(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
rather than
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
-----------------------------------------------------------------
New subject: Creating SVG: using MetaFun, exporting proper units, conversion to DXF
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 wrote:
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.
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!
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.
Now that you brought this topic out of the dead ...
I managed to convert the SVG to DXF somehow back then (I'm not 100%
sure how exactly, perhaps I was using Inkscape), but it turned out
that the conversion was faulty and useless (it converted circles into
octagons, proper scaling was lost, etc.), but I only realized that
once I got to the machine with a limited time slot.
The software that was installed next to the CNC did not accept PDFs,
but eventually the "operator" pulled out his laptop with a newer
version of (commercial) software and eventually imported my PDFs to
get the models for the CNC (annoyed for the fact that I didn't bring
"ready-to-use" files). He earlier explained that we should avoid PDFs
(as they could be bitmap etc.), but of course the vector PDFs
generated by ConTeXt were fine.
(It will probably be a while until I will go there next.)
Mojca
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.
For simple shapes I'd choose Inkscape SVG editor, which can export to DXF directly. In settings you can customize the coords precision to reduce those fractions.
For more sophisticated designing I'd skip simple 2D CADs and use parametric tools instead (allowing to use equations instead of fixed values which simplifies future refactoring).
I'd recommend Autodesk Fusion, which is even free for enthusiasts:
https://knowledge.autodesk.com/support/fusion-360/troubleshooting/caas/sfdca...https://www.youtube.com/watch?v=VzqXo0d0W8s
Jan
New subject: Creating SVG: using MetaFun, exporting proper units, conversion to DXF
Hi,
I just wanted to say that I found a more reliable way to go from
metapost to dxf.
First run "context something.mp" and then
pstoedit -dt -f dxf:-polyaslines\ -mm something.1 something.dxf
For some reason the SVG files from metapost get wrong dimensions when
converted via inkscape, but pstoedit works super reliably.
Mojca
On 29 June 2016 at 12:31, Mojca Miklavec wrote:
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.
(3) Is there any way to convince the SVG output mode to generate something like
rather than
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.
(4) Does anyone have a better proposal for conversion into DXF (or
G-code)? I'm currently playing with FreeCAD and I've seen some
tutorials showing that AutoCAD can open PDF directly, but I don't want
to buy AudoCAD just for the sake of converting files.
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.
(3) Is there any way to convince the SVG output mode to generate something like
rather than
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.
(4) Does anyone have a better proposal for conversion into DXF (or
G-code)? I'm currently playing with FreeCAD and I've seen some
tutorials showing that AutoCAD can open PDF directly, but I don't want
to buy AudoCAD just for the sake of converting files.
Thank you,
Mojca
If your question is of interest to others as well, please add an entry to the Wiki!
For some reason the SVG files from metapost get wrong dimensions when
converted via inkscape, but pstoedit works super reliably.
in that case you can consider:
mp -> pdf -> mudraw/mutool -> svg
The thing is: I don't need svg at all. All I need is dxf and now I
finally have a reliable way to get it from metapost via pstoedit. SVG
was just a workaround since converting from PDF was slightly more
difficult (latest versions of expensive tools provide that conversion
too, but OpenSource is more limited).
I could check if there's any difference in SVG code as generated by
metapost vs. the one generated by mudraw. But SVG images made by
CorelDraw were misconverted by Inkscape as well.
Mojca