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!
User avatar
Sabm01
Posts: 58
Joined: Sun Jun 21, 2020 7:43 pm
Location: Canada
Contact:

Re: Curves workbench

Post by Sabm01 »

How to recompute with 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.

I want to increase the definition of approximate surface:

I created 2 sketches with 2 bsplines that I discretized.
I put them in a group then I generated de approximate surface.

In a second step, I decided to add a new sketch to modify the surface.
I put de discretized points in the group.

Now I want to reactivate the approximate surface without deletion to incorporate the modification.

As the surface could has been used in a design, I dont want to erase it and recreate it. I join the test2 file at this step.

Thanks,

Michel
Attachments
Test2.png
Test2.png (130.5 KiB) Viewed 2960 times
test2.FCStd
(32.05 KiB) Downloaded 46 times
Michel Sabourin (Sabm01)
www.simturb.com
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Post by Vincent B »

I've got warning/error this morning about comb: :o
I can't see if that's make an issue.

Code: Select all

09:45:21  PropertyPythonObject::toString(): failed for <class 'freecad.Curves.ParametricComb.Comb'>
09:45:21  Traceback (most recent call last):
  File "C:\Program Files\FreeCAD_0.20.25541_Win-LPv12.5.4_vc17.x-x86-64\bin\lib\json\__init__.py", line 231, in dumps
    return _default_encoder.encode(obj)
  File "C:\Program Files\FreeCAD_0.20.25541_Win-LPv12.5.4_vc17.x-x86-64\bin\lib\json\encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "C:\Program Files\FreeCAD_0.20.25541_Win-LPv12.5.4_vc17.x-x86-64\bin\lib\json\encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "C:\Program Files\FreeCAD_0.20.25541_Win-LPv12.5.4_vc17.x-x86-64\bin\lib\json\encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
<class 'TypeError'>: Object of type Edge is not JSON serializable
User avatar
Vincent B
Veteran
Posts: 4713
Joined: Sun Apr 05, 2015 9:02 am
Location: La Rochelle, France

Re: Curves workbench

Post by Vincent B »

Sabm01 wrote: Fri Sep 03, 2021 8:43 pm How to recompute with approximate ?
I can't understand what you expect to do. A loft doesn't fit?
Attachments
Capture.JPG
Capture.JPG (38.44 KiB) Viewed 2884 times
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

Ramses wrote: Wed Sep 01, 2021 1:18 pm 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.
Hello,
I don't know why the sketch fails to project on the surface.
CurveOnSurface is old code, I am not sure it has anything useful to offer anymore.
What is your goal ?
Maybe there are solutions with other tools ?
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves workbench

Post by Chris_G »

GlouGlou wrote: Sun Sep 05, 2021 7:48 am I've got warning/error this morning about comb: :o
I can't see if that's make an issue.
Should be fixed now.
User avatar
Sabm01
Posts: 58
Joined: Sun Jun 21, 2020 7:43 pm
Location: Canada
Contact:

Re: Curves workbench

Post by Sabm01 »

GlouGlou wrote: Sun Sep 05, 2021 7:56 am
Sabm01 wrote: Fri Sep 03, 2021 8:43 pm How to recompute with approximate ?
I can't understand what you expect to do. A loft doesn't fit?
  • I started from 2 curves discretized in a group to do an approximate surface.
  • I add a third discretized curve in the group and I want to actualize the surface to incorpore it
If I App.ActiveDocument.recompute(), the approximate surface is not updated.

Is it more clear?

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

Re: Curves workbench

Post by Chris_G »

In Gui, you must clic the ... button of the PointObject property, validate with OK, and recompute.

point-obj.png
point-obj.png (68.64 KiB) Viewed 2713 times

in python :

Code: Select all

FreeCAD.getDocument('test2').getObject('Approximation_Surface').PointObject = FreeCAD.getDocument('test2').getObject('Group')
App.activeDocument().recompute(None,True,True)
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: Mon Sep 06, 2021 3:35 pm In Gui, you must clic the ... button of the PointObject property, validate with OK, and recompute.
in python :

Code: Select all

FreeCAD.getDocument('test2').getObject('Approximation_Surface').PointObject = FreeCAD.getDocument('test2').getObject('Group')
App.activeDocument().recompute(None,True,True)
This is the answer I was looking for. It works perfectly!

Thank you very much!
Michel
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 »

Beltrami workbench for turbomachine blade design
https://forum.freecadweb.org/viewtopic. ... 56#p531466

Thanks to Curves workbench and Chris support, I am proud to lauch today this workbench on blade design. This is probably the first open tool to design turbomachines. It is applicable to any kind of turbomachine, of course hydraulic turbine but also pump, propeller, turbofan, compressor, steam turbine, gas turbine, fan etc.

I wish to push further the development to include solid generation from surfaces of blade. Up to now, I did not succeed to find I robust method. I will continue to post here my questions on Curves functions.

I will be please, if you take a look to this workbench and submit your comments.

Tanks,

Michel
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 »

How to create a volume (or solid) with 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 CurvesWB last release and BeltramiWB last release.

Presently, this is what I do:
I make a volume of revolution from the both surfaces approximate (Extrados and Intrados see on the file joined
test.FCStd
(425.54 KiB) Downloaded 42 times
),
I create the intersection of both volumes.
Normaly, it does not work immediately, I have to modify the approximation tolerance of both approximate surfaces until it works.
The result is not satisfactory as the geometry obtained does not follow the points sufficiently.
test.png
test.png (233.51 KiB) Viewed 2421 times
Do you have an advise to correct that?

Thanks in advance,

Michel
Michel Sabourin (Sabm01)
www.simturb.com
Post Reply