OpenSCAD scripts can read 'version()' and 'version_num()' to get an idea about the tool version, but there does not seem to be anything to learn more about the tool it runs in.
Is there any function/variable or method to detect that the script is running in FreeCAD?
Detail:
I've been diving into openscad in combination with Freecad for different topics related to PCB design.
Using FreeCAD to get STEP files works with some limitations, one of the limitations being that there some issues extruding text.
I would like to test if the OpenSCAD script is running in FreeCAD or OpenSCAD and adjust the includes items accordingly.
I suppose that FreeCAD's support will improve so that in the future I can enable disabled features.
For example, the following is a screenshot of a model rendered in OpenSCAD, but it does not render properly in FreeCAD due to the extruded text.
In FreeCAD it renders like this :
The code is disabled like so:
Code: Select all
if(0){
translate([-3.55*8-0.3,0.60,case_h/2-case_d])
color(text_c)
linear_extrude(0.001) {
text(line1, size=5.55*0.95, font=LCDFONT);
};
translate([-3.55*8-0.3,-5.55-0.4+0.6,case_h/2-case_d])
color(text_c)
linear_extrude(0.05) {
text(line2, size=5.55*0.95, font=LCDFONT);
};
The question is not about the rendering issue, but about a method to detect that the script is running in FreeCAD.