Commit Graph

51 Commits

Author SHA1 Message Date
Uwe
ae2b73567d [SCAD] remove unnecessary Python 3 check
we only support Python 3
2022-07-31 05:26:03 +02:00
Chris Hennes
9dd852202b OpenSCAD: Warning message tweaks 2022-02-24 09:08:43 -06:00
luz paz
78d0fc786a OpenSCAD: pep8-ified + removed superfluous whitespace + uniform headers 2022-01-23 19:52:37 -06:00
Chris Hennes
2e504ab3b6 [OpenSCAD] Add ability to communicate via pipes
In 2021.01 OpenSCAD added the ability to read from stdin and write
output to stdout: this allows us to communicate with an OpenSCAD process
that does not have read/write access to the same directories that
FreeCAD does (for example, if one or the other is installed via a Snap
package).

This commit adds an additional preference to the OpenSCAD workbench
allowing the user to choose between communication methods, as well as to
optionally specify their own temporary directory for the data transfer,
for use in cases where their version of OpenSCAD is installed via Snap,
etc., but does not yet support the piped input and output.
2021-09-29 09:36:58 -05:00
Chris Hennes
7b33ba361b [OpenSCAD] Minor fixes from LGTM analysis 2021-03-09 15:58:07 +01:00
hrobeers
aaf12da9d0 [OpenSCAD] consistent FreeCADGui imports, fixes headless CSG import 2020-09-14 13:28:40 +02:00
mwganson
1ce486f178 [OpenSCAD] Add 2 new commands: Scale and Resize, fix bug in Mirror mesh feature 2020-08-06 12:34:16 +02:00
mwganson
5b56ce4d11 [openscad] mirror mesh feature -- rename OpenSCADUtils.mirror() to OpenSCADUtils.mirrormesh(), and provide some better interactive help information when typing OpenSCADUtils.mirrormesh() into the python console 2020-07-20 14:24:29 +02:00
mwganson
2c0b49ea46 [openscad] mirror mesh feature -- separate gui from function 2020-07-20 14:24:29 +02:00
mwganson
4c259e43b3 [openscad] add icon for mirror mesh feature 2020-07-20 14:24:29 +02:00
mwganson
c5b93d698e [openscad] add ulrich's mirror mesh macro, fix error in refine shape 2020-07-20 14:24:29 +02:00
wmayer
7415e3602a improve detection of OpenSCAD executable to print a more appropriate error message in case of failures 2019-11-06 16:09:50 +01:00
luz.paz
879c814409 Swap http:// for https:// 2019-10-17 17:37:12 -03:00
luz.paz
3532b91526 More code format fixes 2019-10-17 17:37:12 -03:00
Matthew Fallshaw
af4f8b284b fix crash on macOS when opening OpenSCAD Workbench
The OpenSCAD Workbench crashes on open on macOS with error
"a bytes-like object is required, not 'str'", due to python 2 to
python 3 incompatibility. This is me implementing the fix described by
oapa at
https://forum.freecadweb.org/viewtopic.php?t=35384#p311908 (with an
untested attempt to make it also still run with python 2).
2019-10-05 16:31:32 +02:00
luz.paz
4cfda0c3a5 Misc. typos
Found via `codespell`
2019-02-08 11:01:24 -02:00
cclauss
f1c6c549a9 Cannot mix bytes and nonbytes literals in OpenSCADUtils.py
Fixes Travis test failure: https://travis-ci.org/FreeCAD/FreeCAD/jobs/474743289#L8528
2019-01-03 11:37:00 +01:00
wmayer
01367d21f6 fix bytes vs. str issue on macOS 2019-01-02 16:26:16 +01:00
PoroCYon
da09f7c3d9 OpenSCAD: fix error in workaroundforissue128needed with date formats (YYYYMMDD vs YYYY.MM.DD)
This happens when the git version of OpenSCAD is installed (which uses YYYYMMDD), instead of
the latest released version (from 2015, which uses YYYY.MM.DD).
2018-11-14 00:14:19 +01:00
Clemens Weissbacher
1be9f18b52 py3: OpenSCAD: use io.open more explicit 2018-10-29 17:17:53 +01:00
Clemens Weissbacher
cef825c567 py3: OpenSCAD: make Mod/OpenSCAD python3 compatible 2018-10-25 11:03:36 -03:00
Martin Kroeker
13584d64fb py3: cannot take len() of zip() object directly 2018-10-22 15:38:16 -03:00
lo
d990fb15fa py3: <generator>.next -> next(<generator>)
reported: https://github.com/FreeCAD/FreeCAD_Conda/issues/16
ref1: https://stackoverflow.com/questions/12274606/theres-no-next-function-in-a-yield-generator-in-python-3
2018-07-11 21:17:57 -03:00
wandererfan
9975c75888 Fix #3419 Circles as Polygons
- by default, OpenScad represents circles from
  dxf files as octogons.  This fix provides
  access to the OpenScad variable "$fn" which
  controls the number of polygon sides.
2018-06-10 19:33:33 +02:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Pawel Bogut
118757abcd OpenScad path detection fix for python3 on unix 2018-03-30 11:30:27 +02:00
luzpaz
128239b54a Typos: Various workbenches and misc.
[skip ci]
2017-12-25 10:58:10 +01:00
Priit Laes
159dbe2cb8 python: OpenSCAD: *.py: Fix python3 syntax 2017-02-12 17:40:07 +01:00
wmayer
bf5dcbd062 move import statement to fix error 2017-01-06 18:04:07 +01:00
wmayer
f065f8eb53 if UnicodeUTF8 is not defined use a fallback implementation of translate() 2016-12-27 20:12:39 +01:00
l3iggs
4901553a2d fix for 0002358
This strips off any trailing '-' text reported by openscad when asking it for its version.
2015-12-10 14:50:01 +00:00
Sebastian Hoogen
333e6e3155 use exceptions in OpenSCAD module
derive OpenSCADError from FreeCADError if possible
2014-09-17 11:59:49 +02:00
Michael Ang
db54a748b1 automatically find the OpenSCAD binary on Mac OS X 2014-07-13 11:37:33 +02:00
Sebastian Hoogen
691fd11286 Raise exception if the OpenSCAD executeable is unavailable 2014-07-01 12:32:05 +02:00
Sebastian Hoogen
5374302e93 Add default for path to OpenSCAD on Mac OS X 2014-07-01 12:32:04 +02:00
Sebastian Hoogen
7ab2f4fe1f use compounds for unknown shape types
in OpenSCADUtils.applyPlacement
2014-06-10 10:36:09 -03:00
Sebastian Hoogen
27a2e52d66 + fixes #0001537: python function to apply a placement to a shape 2014-05-18 21:13:29 -03:00
Sebastian Hoogen
b58d1caea7 OpenSCAD Module: bugfixes and improvements
if more than 14 digits are given don round in general,
but test for <eps only.
refine before extrusion
support polyhedron faces which replaces polyhedron faces
importCSG round rotations
don't call Draft.makecircle and makeprism as they trigger a recompute
use group placholder for objects with no children
move removesubtree to OpenSCADUtils
add resize and offset keywords
add OpenSCAD_ExplodeGroup command
add OpenSCAD_IncreaseToleranceFeature
change refine shape logo
2014-03-06 19:41:38 +01:00
Sebastian Hoogen
d702911523 OpenSCAD binary gives version info on stderr in never versions 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
103321cff7 Use Part::Mirroing in importCSG 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
0e6b7a629d OpenSCAD use PythonFeatures for hull and minkowski 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
d46fcf08b1 OpenSCAD Module: Adds support for Frustum and fixes minor bugs 2014-02-14 14:43:29 -02:00
Keith Sloan
bcb7d02c05 Hull and Minkowski operations using OpenSCAD 2013-11-17 13:50:35 +01:00
Sebastian Hoogen
e59e5e5be4 bugfix in OpenSCADUtils.callopenscad()
it did not return any result if outputfilename was given
reported by Keith Sloan
2013-10-28 06:44:08 +01:00
Yorik van Havre
42fdbefc54 0001102: Updated all links to old freecad homepage and wiki to the new ones 2013-09-15 17:04:42 -03:00
Sebastian Hoogen
12f4190c93 OpenSCAD: call which to find openscad executable
on all platforms except 'win32'
2013-07-10 20:52:23 +02:00
Sebastian Hoogen
9f4c547afe search for OpenSCAD executable when initalizing WB 2013-07-10 16:19:24 +02:00
Sebastian Hoogen
f1762bf3f4 added function to search for the openscad executeable
this function implmented but not called at the moment
2013-07-10 16:11:32 +02:00
Sebastian Hoogen
558a3e715e process OpenSCADs stdout and allow os.unlink to fail 2013-07-10 16:11:31 +02:00
Sebastian Hoogen
d42a7c82ea added licences for OpenSCAD module 2013-01-09 15:09:23 +01:00