Commit Graph

297 Commits

Author SHA1 Message Date
Yorik van Havre
b0b1c0afbb Merged crowdin translations 2022-02-01 12:59:42 +01:00
Chris Hennes
b8b3cea035 OpenSCAD: Fixes in several actions from Keith Sloan 2022-01-30 20:19:20 -06:00
Yorik van Havre
b3e2c87530 Merged crowdin translations 2022-01-26 14:15:14 +01:00
luz paz
78d0fc786a OpenSCAD: pep8-ified + removed superfluous whitespace + uniform headers 2022-01-23 19:52:37 -06:00
Chris Hennes
1f70e352a8 OpenSCAD: Rewrite fixVisibility() to use rootObj
The original algorithm tried to use a heuristic to calculate which
objects should be shown or hidden, based on the object name. This commit
replaces that heurstic with a request for the list of root objects from
FreeCAD, which is then filtered to remove those that existed before the
import. Any descendant of those root objects is hidden, and the root
made visible, in keeping with the design of the CSG importer.
2022-01-11 14:04:57 -06:00
luz paz
b70c7b6323 Fix superfluous whitespace in various files 2022-01-09 21:01:42 -06:00
luz paz
b0fcf45513 Fix various superfluous whitespace in *.dox files 2022-01-09 21:01:42 -06:00
Yorik van Havre
6cb3782c03 Merged crowdin translations 2021-12-29 12:20:12 +01:00
Chris Hennes
0b50daec4d OpenSCAD: Handle missing script element from text() 2021-12-18 16:23:31 -06:00
Yorik van Havre
a26fb4db1a Merged crowdin translations 2021-11-16 17:30:39 +01:00
Chris Hennes
02c1277a1d OpenSCAD: Minor cleanup of import code 2021-11-07 21:50:48 -06:00
Chris Hennes
058962362d OpenSCAD: Refactor tests to all use the same code path for tempdir generation 2021-11-07 17:13:51 -06:00
luz paz
bb108cff95 Fix user facing typos [skip ci]
Typos in Draft and OpenSCAD code.
2021-10-06 18:11:48 -04:00
Chris Hennes
eb9f47048a 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
62bd69e53d [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
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
Yorik van Havre
77925c428e Updated ts files 2021-09-29 14:32:12 +02:00
Yorik van Havre
b042405933 Merged crowdin translations 2021-09-23 17:14:48 +02:00
Yorik van Havre
89e1a97d80 Merged crowdin translations 2021-09-07 11:26:48 +02:00
Yorik van Havre
49abe81271 Merged crowdin translations 2021-08-26 14:51:36 +02:00
Yorik van Havre
a8cb3ef1e3 Updated ts files 2021-08-26 14:50:54 +02:00
Chris Hennes
a80e67c04c [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
2343c3cbe2 [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
1cee70cd62 Merged crowdin translations 2021-07-08 16:06:38 +02:00
Yorik van Havre
ed9dca288c Merged crowdin translations 2021-07-01 13:56:25 +02:00
Yorik van Havre
c8b5d8d762 Merged crowdin translations 2021-06-24 17:22:19 +02:00
Yorik van Havre
69b084f492 Merged crowdin translations 2021-06-17 16:04:02 +02:00
Yorik van Havre
d0d637b2c6 merged crowdin translations 2021-06-03 15:43:34 +02:00
Yorik van Havre
4361893f24 updated ts files 2021-06-03 15:37:33 +02:00
Yorik van Havre
ff6845e2f3 OpenSCAD: Fixed typo 2021-05-31 14:54:48 +02:00
Yorik van Havre
b1d9a5607f Merged crowdin translations 2021-05-27 14:51:33 +02:00
Yorik van Havre
c6771853ae Updated translation files 2021-05-27 14:44:40 +02:00
Chris Hennes
99f9c3405c [OpenSCAD] Fix missing hide() on linear extrude 2021-05-13 10:27:49 -05:00
Yorik van Havre
7b0a6358b1 Merged crwodin translations 2021-05-12 16:36:31 +02:00
Yorik van Havre
81a44fcccb Updated ts files 2021-05-11 13:05:20 +02:00
Yorik van Havre
131cdd1e4e 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
d850ed87aa Add Load/Save/Refresh to add OpenSCAD Elements 2021-04-27 17:42:06 +01:00
Keith Sloan
8bdf4a7a2b Add load/save/refresh to addElement 2021-04-25 15:10:46 +01:00
Chris Hennes
f3e9f6c4cd [OpenSCAD] Fix regression with angle specification
Correct mistake introduced in 7eec10def.
2021-04-21 14:20:10 +02:00
luz paz
f2b93a7af3 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
602fef267a [OpenSCAD] Fix twist angle to not limit to 360 deg 2021-04-09 12:09:24 -05:00
Chris Hennes
663ac994a7 [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
fbd6b0441f [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
b18cabae05 [OpenSCAD] Add additional recompute() logic 2021-03-29 13:58:52 -05:00
wmayer
4fbdcfb477 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
dfd683d464 [OpenSCAD] Add angle & $fn to rotate_extrude(file) 2021-03-28 12:38:31 +02:00
Chris Hennes
4e58747c16 [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
2490629a4a OpenSCAD: [skip ci] pipeshell -> pipe_shell 2021-03-25 21:45:03 +01:00
Chris Hennes
8cbfa5a717 [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
69f24859b5 [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