Commit Graph

24 Commits

Author SHA1 Message Date
PhoneDroid
7595a83f36 [ OpenSCAD ]: Updated SPDX 2025-10-14 10:01:41 -05:00
Adrian Insaurralde Avalos
eae9d2fbca Fix OpenSCAD test failing when using pipe transfer mechanism 2024-10-28 17:34:25 +01:00
wmayer
8e6fbd2886 OpenSCAD: a test internally uses the DXF importer
If not all 3rd party packages are installed the DXF importer opens a modal dialog and blocks the tests
2023-07-12 21:44:27 -05:00
luzpaz
129d5882a7 Migrate domain name from freecadweb to freecad (#9352)
* Migrate domain name from freecadweb to freecad
* Migrate src/Mod/Material files
* Migrate Stylesheet related files
* Migrate *.svg files
* Migrate miscellaneous files
* Migrate some build files
* Migrate recently added TD AR_IRAM template files

Closes #6415
2023-04-24 15:19:20 -05:00
luzpaz
729685316e Fix trailing whitespace, typos, headers
Fix trailing whitespace, typos, and header uniformity.
2023-01-23 00:34:37 +01:00
luz paz
dda171f427 OpenSCAD: remove indentations from test_importCSG.py
Follow-up to 3f118b52b
2022-11-30 20:57:34 -06:00
Chris Hennes
3f118b52bc OpenSCAD: Ensure complex fuse has no extra placement 2022-11-30 18:30:06 -06:00
wmayer
32db6656f3 OpenSCAD: add unit test to check for empty 'union' 2022-09-12 14:48:01 +02:00
luz paz
78d0fc786a OpenSCAD: pep8-ified + removed superfluous whitespace + uniform headers 2022-01-23 19:52:37 -06:00
Chris Hennes
0b50daec4d OpenSCAD: Handle missing script element from text() 2021-12-18 16:23:31 -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
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
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
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
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
wmayer
371b089ea0 OpenSCAD: fix test_import_surface by changing currently working directory 2021-03-17 12:35:15 +01:00
wmayer
9a105e3405 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
0581409fbe OpenSCAD: [skip ci] fix incorrect filename creation in unit tests 2021-03-17 11:56:58 +01:00
Chris Hennes
6bf27e0ae1 [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
bfce108083 [OpenSCAD] Add scale parameter to linear_extrude 2021-03-11 13:56:26 +01:00
Chris Hennes
a00c00e4da [OpenSCAD] Add unit tests for resize() and others 2021-03-10 15:33:45 +01:00
Chris Hennes
b2ebaa01a2 [OpenSCAD] Add unit tests for importing primitives 2021-03-06 13:31:09 +01:00
Chris Hennes
c1408f130c [OpenSCAD] Add unit test framework to module
The OpenSCAD module did not have any unit tests. This commit adds the
basic framework (and two very simple tests). The framework is modeled
after the unit tests in the FEM module.
2021-03-01 15:21:18 +01:00