Curves workbench

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Ramses
Posts: 31
Joined: Fri Sep 28, 2018 6:16 pm

Re: Curves workbench

Post by Ramses »

Curve on surface works fine when loft is just a surface, not when it's a solid.
Image
With the last CurvesWB
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.20.25541 (Git) AppImage
Build type: Release
Branch: master
Hash: ca043dcb6d20d70b8e24d75e810683214eecc5d4
Python version: 3.9.6
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.2
Locale: French/France (fr_FR)
Attachments
curve_on_surface_loft.FCStd
(28.72 KiB) Downloaded 43 times
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Curves workbench

Post by Kunda1 »

Off-topic but related:
OCC upstream has fixed a bug that I wonder has any implication on Curves ?
https://github.com/Open-Cascade-SAS/OCC ... 3e720d6e97
0026979: Parabola curve intersection with variety of surfaces produces incorrect results.

Method Intf_Tool::ParabBox now properly estimates the number of segments for a 3D parabola.
Fix input arguments of called Bnd_Box::Get method in Intf_Tool::HyprBox method.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Sabm01
Posts: 58
Joined: Sun Jun 21, 2020 7:43 pm
Location: Canada
Contact:

Re: Curves workbench

Post by Sabm01 »

Potential bug in approximate.

My configuration :
OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24291 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: 7b5e18a0759de778b74d3a5c17eba9cb815035ac
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: French/Canada (fr_CA)
with last version of CurvesWB.

To replicate the bug :
  • Create a Groupe.
    Create 2 bsplines in 2 sketchs.
    Discretize the 2 curves.
    Approximate the Groupe to obtain a surface.
    Save the file then you obtain the message :
09:56:53 PropertyPythonObject::toString(): failed for <class 'freecad.Curves.approximate.Approximate'>
09:56:53 Traceback (most recent call last):
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type FeaturePython is not JSON serializable
10:08:17 PropertyPythonObject::toString(): failed for <class 'freecad.Curves.approximate.Approximate'>
10:08:17 Traceback (most recent call last):
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\__init__.py", line 231, in dumps
return _default_encoder.encode(obj)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Program Files\FreeCAD 0.19\bin\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type FeaturePython is not JSON serializable
The test file is provided.


Thanks for your time,

Michel
Attachments
test1.FCStd
(24.33 KiB) Downloaded 47 times
Test1.png
Test1.png (120.37 KiB) Viewed 2525 times
Michel Sabourin (Sabm01)
www.simturb.com
User avatar
Sabm01
Posts: 58
Joined: Sun Jun 21, 2020 7:43 pm
Location: Canada
Contact:

Re: Curves workbench

Post by Sabm01 »

Sabm01 wrote: Mon Aug 30, 2021 3:02 pm Potential bug in approximate.
Consequential problem.

Reading the file test1.FCStd then modifying the Approximate_Surface Parametrization to Curvilinear we obtain:
19:23:32 Traceback (most recent call last):
File "C:\Users\miche\AppData\Roaming\FreeCAD\Mod\Curves\freecad\Curves\approximate.py", line 204, in execute
num = len(self.Points)
<class 'AttributeError'>: 'Approximate' object has no attribute 'Points'
19:23:42 Traceback (most recent call last):
File "C:\Users\miche\AppData\Roaming\FreeCAD\Mod\Curves\freecad\Curves\approximate.py", line 204, in execute
num = len(self.Points)
<class 'AttributeError'>: 'Approximate' object has no attribute 'Points'
Similar behavior has been raised recently by :
byteofsoren wrote: Sat Aug 07, 2021 2:26 pm Hi. I think I found a bug.
When I reopen a file that uses rails I get
2021-08-07-151617_449x138_scrot.png

Code: Select all

File "/home/magnus/.FreeCAD/Mod/Curves/freecad/Curves/approximate.py", line 204, in execute
    num = len(self.Points)
<class 'AttributeError'>: 'Approximate' object has no attribute 'Points'
15:24:03  Recompute failed! Please check report view.
Hope that this helps.


Thanks for your support,

Michel
Attachments
Test1_1.png
Test1_1.png (160 KiB) Viewed 2492 times
Michel Sabourin (Sabm01)
www.simturb.com
User avatar
Chris_G
Veteran
Posts: 2596
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

Sabm01 wrote: Mon Aug 30, 2021 11:31 pm Reading the file test1.FCStd then modifying the Approximate_Surface Parametrization to Curvilinear we obtain ...
Hello,
I think it is fixed now.
Could you please update the workbench and retry, please.
User avatar
Sabm01
Posts: 58
Joined: Sun Jun 21, 2020 7:43 pm
Location: Canada
Contact:

Re: Curves workbench

Post by Sabm01 »

Chris_G wrote: Tue Aug 31, 2021 2:33 pm
Sabm01 wrote: Mon Aug 30, 2021 11:31 pm Reading the file test1.FCStd then modifying the Approximate_Surface Parametrization to Curvilinear we obtain ...
Hello,
I think it is fixed now.
Could you please update the workbench and retry, please.
Thank you very much Chris, problem solved!

Moreover, I advise you that I will publish, in the next days, a new workbench based on CurvesWB to design blades for turbine, fan, compressor, pump, etc. It is, for me, a 2 years work.
Documentation is already available at
https://michelsabourin.scenari-communit ... trace.html
Yes, it is in french but using browser translator like MS Edge gives a very good result.

I will verify the robustness of solid and body creation. Up to now, it was not perfectly reliable. Anyway, it is coming.
I will need your comments and support.

Thank you again,
Michel
Michel Sabourin (Sabm01)
www.simturb.com
User avatar
Chris_G
Veteran
Posts: 2596
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

Sabm01 wrote: Tue Aug 31, 2021 3:18 pm Moreover, I advise you that I will publish, in the next days, a new workbench based on CurvesWB to design blades for turbine, fan, compressor, pump, etc. It is, for me, a 2 years work.
Hello,
As indicated on Curves workbench Github repository :
This workbench is in ALPHA state and should NOT be used for any serious work.
Therefor, making your own workbench depend on Curves WB, is not a good idea.
I think you'd better copy the CurvesWB files that you use to your own workbench.
Ramses
Posts: 31
Joined: Fri Sep 28, 2018 6:16 pm

Re: Curves workbench

Post by Ramses »

Hello
Is someone able to give an answer to my post Thu Aug 26, 2021 8:05 pm .
Thanks a lot for the time you spend.
User avatar
Vincent B
Veteran
Posts: 4731
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Post by Vincent B »

Hi Chris,
HQ Ruled surface is vanished? :roll:
User avatar
Chris_G
Veteran
Posts: 2596
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

It was not working good. I removed it for now.
Post Reply