Commit Graph

47 Commits

Author SHA1 Message Date
PhoneDroid
7595a83f36 [ OpenSCAD ]: Updated SPDX 2025-10-14 10:01:41 -05:00
Florian Foinant-Willig
286483ff7d OpenSCAD: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Johannes Wüller
6321d5ceb8 Fix CSG computing geometry too early
onChanged() triggers for the first time before all of the properties are
loaded, so it can fail to compute properly at that stage, depending on
the load order.

However, it's not necessary to compute geometry in onChanged() at all,
because that's usually supposed to happen in execute() anyway. The
solution here is to just not do onChanged() at all.

Fixes #13558
2024-04-20 23:02:49 +02:00
wmayer
83d4080fe8 App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class.
Thus rename them to 'loads' and 'dumps'
2023-09-24 10:56:35 -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
87154535ed OpenSCAD: linting OpenSCADFeatures.py
Fix bad indentation and separated import statements
2023-03-27 16:31:18 +02:00
Chris Hennes
1059dd4f9f OpenSCAD: Remove aux spline when no twist 2022-09-13 19:59:30 -05:00
luz paz
78d0fc786a OpenSCAD: pep8-ified + removed superfluous whitespace + uniform headers 2022-01-23 19:52:37 -06:00
Chris Hennes
02c1277a1d OpenSCAD: Minor cleanup of import code 2021-11-07 21:50:48 -06:00
Chris Hennes
f3e9f6c4cd [OpenSCAD] Fix regression with angle specification
Correct mistake introduced in 7eec10def.
2021-04-21 14:20:10 +02: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
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
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
7b33ba361b [OpenSCAD] Minor fixes from LGTM analysis 2021-03-09 15:58:07 +01:00
sgrogan
f3bdaaa55a fix import, OpenSCAD isn't namespace workbench 2020-10-17 23:54:26 +02:00
mwganson
92b14ba161 [openscad] fix refine shape 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
5c24b236f0 OpenSCAD: [skip ci] fix missing treeview icon 2020-06-23 12:34:25 +02:00
Keith Sloan
f333d9ca0f resize 2020-06-05 13:17:34 +02:00
luz.paz
879c814409 Swap http:// for https:// 2019-10-17 17:37:12 -03:00
KeithSloan
62d85f4491 Fix OpenSCAD Frustrum 2019-08-30 15:55:15 +02:00
cclauss
51ab27f54a Fix file, long, raw_input, and xrange for Python 3 2019-01-07 15:42:37 +01:00
Clemens Weissbacher
6e7beb1a0b py3: OpenSCAD: fix type cast 2018-10-29 17:18:13 +01:00
Keith Sloan
513efcba0e Fix for linearextrude with twist 2017-05-11 20:17:26 +02:00
Priit Laes
159dbe2cb8 python: OpenSCAD: *.py: Fix python3 syntax 2017-02-12 17:40:07 +01:00
triplus
6fe2923d52 OpenSCAD IncreaseTolerance (edges and faces support) 2015-10-26 11:48:20 +01:00
Sebastian Hoogen
05af9207a3 use Icons for Refine and Increase tolerance features 2014-10-11 13:09:33 +02:00
Sebastian Hoogen
333e6e3155 use exceptions in OpenSCAD module
derive OpenSCADError from FreeCADError if possible
2014-09-17 11:59:49 +02:00
Sebastian Hoogen
941fc5c992 + fixes #0001543: OpenSCAD.RefineShape Features breaks Placement for 'faces' 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
7a7fd33672 OpenSCAD: import surfaces 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
8b2134705a OpenSCAD: use PropertyQuantity 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
Sebastian Hoogen
fb48816817 use a python feature for unsupported operations 2013-10-28 06:33:40 +01:00
Sebastian Hoogen
3534709fb8 fixed syntax error in OpenSCADFeatures.py 2013-09-21 13:00:08 -03:00
Sebastian Hoogen
801f08a8af remove transformGeometry in OpenSCADFeatures.GetWire 2013-09-17 13:39:38 +02: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
wmayer
48f8d67b50 Replace BRepTools_ReShape with BRepBuilderAPI_MakeSolid in refinement algorithm 2013-08-23 15:25:17 +02:00
Sebastian Hoogen
d42a7c82ea added licences for OpenSCAD module 2013-01-09 15:09:23 +01:00
Sebastian Hoogen
1d0a79a5f2 Enhancements to OpenSCAD module
interpolate OpenSCAD surface elements (heightmaps) to BSplineSurface
ignore render statement #21
handle difference object with only one child #46
fix sign of import origin in prototype
fixed syntax of minkowski statement
Added Icon for AddOpenSCADElement #50 and fixed typo in OpenSCAD module
ignore OpenSCAD Modifiers #31
handle fuse with a single child
remove redefinition of python list
make OpenSCAD importCSG avavailable in command line mode
add modifier characters to the label of the top affected object
started translation
remove ColorCodeShapes command from toolbar and menu
Added toolbar with Part tools to OpenSCAD WB
remove OpenSCAD prototype importer from build
2012-10-25 10:23:28 +02:00
Sebastian Hoogen
df017149c5 OpenSCAD module
fixes #3 #7 #25 #26 #28 #30 #35 #36 #41
2012-06-25 15:01:33 +02:00