mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 09:36:35 +08:00

* Prototype gcode infix math, very basic. * Adding exprtk math parser library, header only. @ArashPartow https://github.com/ArashPartow/exprtk@4e1315a87dcc99a1ccad21fae1def0c2d4913c0f * Now evaluating strings with exprtk, only support no variables in input strings. * Moved executable code to cpp file, stubbed out xsp and let the testing begin... * Added conditional gcode parser into export path, added tests. * Added one more test to ensure that {if0} only removes up to newlines. * Test failure to parse * Add some compiler flags to compile out stuff from exprtk * Fix debug messages to be more specific, don't use deleted stringstream = method. * Trade expression speed for apparently around 50MB of object size. * Removed an extra trim that was breaking existing tests. * fix test Fixes #3390
19 lines
278 B
Plaintext
19 lines
278 B
Plaintext
%module{Slic3r::XS};
|
|
|
|
%{
|
|
#include <xsinit.h>
|
|
#include "libslic3r/ConditionalGcode.hpp"
|
|
%}
|
|
|
|
|
|
%package{Slic3r::ConditionalGCode};
|
|
|
|
%{
|
|
PROTOTYPES: DISABLE
|
|
std::string apply_math(std::string input)
|
|
CODE:
|
|
RETVAL = Slic3r::apply_math(input);
|
|
OUTPUT:
|
|
RETVAL
|
|
%}
|