Commit Graph

291 Commits

Author SHA1 Message Date
luz paz
28ab1bb68f Fix various superfluous whitespace in *.dox files 2022-01-09 21:01:42 -06:00
Yorik van Havre
91bfb0fbb6 Merged crowdin translations 2021-12-29 12:20:12 +01:00
Chris Hennes
ba6fb8fb8e OpenSCAD: Handle missing script element from text() 2021-12-18 16:23:31 -06:00
Yorik van Havre
c4d4575eb3 Merged crowdin translations 2021-11-16 17:30:39 +01:00
Chris Hennes
1ef20ed984 OpenSCAD: Minor cleanup of import code 2021-11-07 21:50:48 -06:00
Chris Hennes
81830d850f OpenSCAD: Refactor tests to all use the same code path for tempdir generation 2021-11-07 17:13:51 -06:00
luz paz
be693528be Fix user facing typos [skip ci]
Typos in Draft and OpenSCAD code.
2021-10-06 18:11:48 -04:00
Chris Hennes
3904cbf291 Merge pull request #5075 from chennes/openSCADSandboxingFix
[OpenSCAD] Add ability to communicate over stdin/stdout (to support Snaps, etc.)
2021-09-29 14:29:57 -05:00
Chris Hennes
0bf885145f [OpenSCAD] Update STL unit test to warn on pipes
If OpenSCAD or FreeCAD is set up to use pipes for communication, assume
it's because one or the other is sandboxed. In that case, OpenSCAD will
not be able to import the generated STL file from FreeCAD, so don't try
to run that test.
2021-09-29 10:24:11 -05:00
Chris Hennes
c842b6a8c1 [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
Yorik van Havre
140e03301e Updated ts files 2021-09-29 14:32:12 +02:00
Yorik van Havre
6ad3530981 Merged crowdin translations 2021-09-23 17:14:48 +02:00
Yorik van Havre
a9717a1e17 Merged crowdin translations 2021-09-07 11:26:48 +02:00
Yorik van Havre
199e8a8d6e Merged crowdin translations 2021-08-26 14:51:36 +02:00
Yorik van Havre
8acd9f8734 Updated ts files 2021-08-26 14:50:54 +02:00
Chris Hennes
274544d868 [OpenSCAD] Fix OpenSCAD bounding box calculations
When not using the GUI, bounding box calculations can sometimes use the
B-spline represenation in OCCT, which can in some cases give incorrect
results. To correct for this, explicit calls to tessellate() are added
to ensure that the bounding box calculation uses the true shape, even if
the GUI is not running.

Fixes #4622 - OpenSCAD/OpenSCADTest/app/test_importCSG.py assertion failure
2021-08-17 11:09:55 -05:00
Ajinkya Dahale
78b644e313 [OpenSCAD] Fixes cut color while importing CSG (#4920)
* [OpenSCAD] Fixes cut color while importing CSG

Fixes #4684.
For some reason colors of "base" and "tool" need to be set in order for the cut
to have colors as well, just like fuse and multifuse.
Also tidied up the relevant code portions a little.
Some testing might be needed.

* [OpenSCAD] Color settings for other booleans in importCSG

As per Keith's comments, this change extends recursive color setting to other
boolean features viz. `Part::Common` and `Part::MultiCommon`. Also possible to
add any other features needing the same treatment.

* Update importCSG.py

Remove unneeded parentheses and fix its/it's mixup

Co-authored-by: Kurt Kremitzki <kkremitzki@users.noreply.github.com>
2021-08-14 15:04:02 -05:00
Yorik van Havre
834933866e Merged crowdin translations 2021-07-08 16:06:38 +02:00
Yorik van Havre
da508e30b0 Merged crowdin translations 2021-07-01 13:56:25 +02:00
Yorik van Havre
acedf491f3 Merged crowdin translations 2021-06-24 17:22:19 +02:00
Yorik van Havre
24362e9020 Merged crowdin translations 2021-06-17 16:04:02 +02:00
Yorik van Havre
9f81ca933d merged crowdin translations 2021-06-03 15:43:34 +02:00
Yorik van Havre
441635aff0 updated ts files 2021-06-03 15:37:33 +02:00
Yorik van Havre
84b270b3c2 OpenSCAD: Fixed typo 2021-05-31 14:54:48 +02:00
Yorik van Havre
dd1220b345 Merged crowdin translations 2021-05-27 14:51:33 +02:00
Yorik van Havre
4b7a5d2e98 Updated translation files 2021-05-27 14:44:40 +02:00
Chris Hennes
cdf50cb47b [OpenSCAD] Fix missing hide() on linear extrude 2021-05-13 10:27:49 -05:00
Yorik van Havre
0be2757e13 Merged crwodin translations 2021-05-12 16:36:31 +02:00
Yorik van Havre
91ea7fbba8 Updated ts files 2021-05-11 13:05:20 +02:00
Yorik van Havre
966906da96 Merge pull request #4557 from luzpaz/crowdin/whitespaces-substituted-into-code
Crowdin: represent whitespace in code instead of in string
2021-05-05 17:18:35 +02:00
Keith Sloan
985cbad2fa Add Load/Save/Refresh to add OpenSCAD Elements 2021-04-27 17:42:06 +01:00
Keith Sloan
1e82643eed Add load/save/refresh to addElement 2021-04-25 15:10:46 +01:00
Chris Hennes
ef60a73cb5 [OpenSCAD] Fix regression with angle specification
Correct mistake introduced in 0e66abcab.
2021-04-21 14:20:10 +02:00
luz paz
b94ee8b275 Crowdin: represent whitespace in code instead of in string [skip ci]
Removing possible whitespace from strings lead to more accurate translations
2021-04-19 06:16:09 -04:00
Chris Hennes
2751398ec0 [OpenSCAD] Fix twist angle to not limit to 360 deg 2021-04-09 12:09:24 -05:00
Chris Hennes
08b7d9d0f3 [OpenSCAD] Fix projection for OCCT7.3
OCCT 7.3 did not work well when using a very large projection plane, so
this commit reduces the plane size to the minimum required for the cut
operation. It also performs some minor refactoring in anticipation of
the implementation of the true projection feature, and it removes the
last attempted fix, which proved unnecessary.
2021-03-30 22:55:16 +02:00
Chris Hennes
9540cf0bbd [OpenSCAD] Add piecewise helix for OCCT < 7.5
Address a hang when using older versions of OCC to create a rotated
extrusion. This approximates the auxilliary spine as set of line
segments formed from the helix, rather than using the helix directly.
2021-03-29 13:59:03 -05:00
Chris Hennes
46b0043b49 [OpenSCAD] Add additional recompute() logic 2021-03-29 13:58:52 -05:00
wmayer
bc51f50720 OpenSCAD: [skip ci] disable rich text in OpenSCAD widget to avoid weird behaviour when copying code from an HTML page 2021-03-28 13:51:38 +02:00
Chris Hennes
5b9f7116ce [OpenSCAD] Add angle & $fn to rotate_extrude(file) 2021-03-28 12:38:31 +02:00
Chris Hennes
74c2ef4e8d [OpenSCAD] Add $fn and angle to rotate_extrude()
As pointed out in Issue #0004353 the OpenSCAD Workbench does not
correctly implement the angle parameter to rotate_extrude (it's a
relatively recent addition to OpenSCAD), nor does it attempt to do
anything with a specified $fn. This commit adds both features. To add
$fn handling, the code from the cylinder extrusion was mimicked,
allowing FreeCAD to create perfect, smooth representations when $fn
exceeds a user specified value in Preferences, but attempting to create
OpenSCAD's more discrete representation when using a lower $fn. Note
that this determination is made at creation time: if the user later
increases the segments parameter in the new object, it will remain
prismatic regardless of how high the value is made.
2021-03-28 12:38:11 +02:00
wmayer
cd458165c3 OpenSCAD: [skip ci] pipeshell -> pipe_shell 2021-03-25 21:45:03 +01:00
Chris Hennes
57c93cd6b3 [OpenSCAD] Improve helical extrusion, fix scaling
Modify the auxiliary spine to be a true helix, resulting in a much
smoother linear extrusion when a twist angle is applied. This also
corrects a bug in the scaling during linear extrusion, where non-uniform
scaling was not handled correctly.
2021-03-25 21:23:29 +01:00
Chris Hennes
a0464d1b00 [OpenSCAD] Fix bug in resize code
The resize code must recompute some kinds of objects prior to requesting
their bounding box, or the bounding box can be invalid.
2021-03-25 21:20:47 +01:00
wmayer
fc39b205d2 OpenSCAD: fix test_import_surface by changing currently working directory 2021-03-17 12:35:15 +01:00
wmayer
a1952dade7 OpenSCAD: fix utility_create_scad by changing currently working directory so that test_import_surface doesn't fail any more 2021-03-17 11:59:14 +01:00
wmayer
a9b602816d OpenSCAD: [skip ci] fix incorrect filename creation in unit tests 2021-03-17 11:56:58 +01:00
Chris Hennes
748e113418 [OpenSCAD] Reimplement surface() to match OpenSCAD
The original implementation of the surface() function used a simple
B-spline representation for the surface, which generated degenerate
surface with several of OpenSCAD's demo input files. This commit
modifies the algorithm to generate a discrete surface identical to the
one generated within OpenSCAD itself. It also adds several units tests
to identify future regressions.

Note that PNG input is not yet supported for the surface() function.
2021-03-13 16:11:16 +01:00
Chris Hennes
0a0d939522 [OpenSCAD] Add scale parameter to linear_extrude 2021-03-11 13:56:26 +01:00
Chris Hennes
5dbeb210e0 [OpenSCAD] Add unit tests for resize() and others 2021-03-10 15:33:45 +01:00