Commit Graph

46 Commits

Author SHA1 Message Date
Florian Foinant-Willig
c7c768995b OpenSCAD: Prevent user to remove core properties 2025-04-22 23:52:17 +02:00
Johannes Wüller
13caf40036 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
ef9936a940 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
38a01939e0 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
5538557df9 OpenSCAD: linting OpenSCADFeatures.py
Fix bad indentation and separated import statements
2023-03-27 16:31:18 +02:00
Chris Hennes
68ef28713d OpenSCAD: Remove aux spline when no twist 2022-09-13 19:59:30 -05:00
luz paz
b3ce571ad7 OpenSCAD: pep8-ified + removed superfluous whitespace + uniform headers 2022-01-23 19:52:37 -06:00
Chris Hennes
1ef20ed984 OpenSCAD: Minor cleanup of import code 2021-11-07 21:50:48 -06:00
Chris Hennes
ef60a73cb5 [OpenSCAD] Fix regression with angle specification
Correct mistake introduced in 0e66abcab.
2021-04-21 14:20:10 +02: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
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
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
9213565b3f [OpenSCAD] Minor fixes from LGTM analysis 2021-03-09 15:58:07 +01:00
sgrogan
a8ca6ada87 fix import, OpenSCAD isn't namespace workbench 2020-10-17 23:54:26 +02:00
mwganson
ee7b4054ce [openscad] fix refine shape feature 2020-07-20 14:24:29 +02:00
mwganson
c845ece1e3 [openscad] add ulrich's mirror mesh macro, fix error in refine shape 2020-07-20 14:24:29 +02:00
wmayer
312e98d003 OpenSCAD: [skip ci] fix missing treeview icon 2020-06-23 12:34:25 +02:00
Keith Sloan
59e644c346 resize 2020-06-05 13:17:34 +02:00
luz.paz
893868b539 Swap http:// for https:// 2019-10-17 17:37:12 -03:00
KeithSloan
459edb13db Fix OpenSCAD Frustrum 2019-08-30 15:55:15 +02:00
cclauss
00d8f39840 Fix file, long, raw_input, and xrange for Python 3 2019-01-07 15:42:37 +01:00
Clemens Weissbacher
fffca1f2ee py3: OpenSCAD: fix type cast 2018-10-29 17:18:13 +01:00
Keith Sloan
3d4f8091de Fix for linearextrude with twist 2017-05-11 20:17:26 +02:00
Priit Laes
839e7eed22 python: OpenSCAD: *.py: Fix python3 syntax 2017-02-12 17:40:07 +01:00
triplus
461e8c0bdc OpenSCAD IncreaseTolerance (edges and faces support) 2015-10-26 11:48:20 +01:00
Sebastian Hoogen
7db2cdc008 use Icons for Refine and Increase tolerance features 2014-10-11 13:09:33 +02:00
Sebastian Hoogen
856c66d12d use exceptions in OpenSCAD module
derive OpenSCADError from FreeCADError if possible
2014-09-17 11:59:49 +02:00
Sebastian Hoogen
f20f2a0085 + fixes #0001543: OpenSCAD.RefineShape Features breaks Placement for 'faces' 2014-05-18 21:13:29 -03:00
Sebastian Hoogen
cf538e94b8 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
e63a40c170 OpenSCAD: import surfaces 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
c5f73a2bba OpenSCAD: use PropertyQuantity 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
3db8e7ed54 OpenSCAD use PythonFeatures for hull and minkowski 2014-02-20 11:12:51 -03:00
Sebastian Hoogen
5e7a61bc04 OpenSCAD Module: Adds support for Frustum and fixes minor bugs 2014-02-14 14:43:29 -02:00
Sebastian Hoogen
821dd8a1c6 use a python feature for unsupported operations 2013-10-28 06:33:40 +01:00
Sebastian Hoogen
c810deed46 fixed syntax error in OpenSCADFeatures.py 2013-09-21 13:00:08 -03:00
Sebastian Hoogen
6da3eabaee remove transformGeometry in OpenSCADFeatures.GetWire 2013-09-17 13:39:38 +02:00
Yorik van Havre
4005b199e0 0001102: Updated all links to old freecad homepage and wiki to the new ones 2013-09-15 17:04:42 -03:00
wmayer
bed8a97114 Replace BRepTools_ReShape with BRepBuilderAPI_MakeSolid in refinement algorithm 2013-08-23 15:25:17 +02:00
Sebastian Hoogen
50a7c5d164 added licences for OpenSCAD module 2013-01-09 15:09:23 +01:00
Sebastian Hoogen
a9d1f4f3fb 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
d984093f1c OpenSCAD module
fixes #3 #7 #25 #26 #28 #30 #35 #36 #41
2012-06-25 15:01:33 +02:00