Hello,

I've reworked the matgen matlab-to-xcircuit script a little bit. The script 
enables to import a matlab eps/ps plot in xcircuit. The axes components of 
the plot are embedded in a library object for easy editing. Although 
originally implemented as a Perl script that would convert the Matlab file to 
the xcircuit eps format, the current implementation is entirely based on the 
Tcl facilities of Xcircuit.

As an implementation example, I've added an extra import option under the file 
menu: "Import Matlab PS".

A patch for the current stable version in CVS (3.4.26) is available at
http://homes.esat.kuleuven.be/~wvereeck/matgen_extension/patch_matlab_3_4_26
(the patch was created at the top-level xcircuit-3.4/ dir)

Also, the matgen.tcl script should be copied to the 'xcircuit-3.4/lib/tcl/' 
directory where the other tcl-scripts are located (Should be done before 
configure/make/install...). The matgen.tcl script can be found at 
http://homes.esat.kuleuven.be/~wvereeck/matgen_extension/matgen.tcl

See also the Matlab-generated files for testing purposes:
http://homes.esat.kuleuven.be/~wvereeck/matgen_extension/example_matlab.eps
http://homes.esat.kuleuven.be/~wvereeck/matgen_extension/torus_matlab.eps 
(takes a few seconds to load)

An example of the results:
http://homes.esat.kuleuven.be/~wvereeck/matgen_extension/screenshot_matgen.png

Kind regards,
Wim Vereecken

_______
Changes are located in:
* prototypes.h, xcircuit.c, tclxcircuit.c (fix for the "color index" issue)
* wrapper.tcl -> added xcircuit::promptimportmatlab {} 
              -> added "Import Matlab PS" file menu entry
* xcircuit.tcl.m4 -> source matgen.tcl (I'm not sure if this is the correct 
location for sourcing scripts at the startup of xcircuit. Maybe the 
matgen.tcl script could be imported when it is needed...)





Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

_______________________________________________
Xcircuit-dev mailing list
[email protected]
http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev

Reply via email to