Why are arc segments not twisted during sweep?

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!
Post Reply
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Why are arc segments not twisted during sweep?

Post by UR_ »

Hello,
why are arc segments not twisted during sweep?

Two sweeps between twisted sketches
Two sweeps.png
Two sweeps.png (82.26 KiB) Viewed 1846 times
Arc segment isnt twisted continuously, but line segments are.

File
TwoSweeps.FCStd
(29.68 KiB) Downloaded 31 times
done with
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.10802 (Git)
Build type: Release
Branch: master
Hash: 10ce910c03347a90712327a7cc7be2bcdee13afc
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Why are arc segments not twisted during sweep?

Post by UR_ »

Hello,
i have done some investigations and tried to build up this sweep in SALOME 8.2.0
Salome Pipe Construction.png
Salome Pipe Construction.png (424.71 KiB) Viewed 1798 times
Checking this box moves path into contact with edges to sweep.
That does the trick. Don't ask we why. :roll:

Works in FreeCAD also.
ScreenShot.png
ScreenShot.png (78.76 KiB) Viewed 1798 times
Seems we need also more of these tiny checkboxes :D
Attachments
TwoSweepsCorrected.FCStd
(31.88 KiB) Downloaded 25 times
User avatar
Willem
Veteran
Posts: 1852
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Why are arc segments not twisted during sweep?

Post by Willem »

Hi, first I thought it is a problem with a bad constrained sketch. Sketches 1a and 1b in your first post are overconstrained because of unnecessary constrains 5 and 6. Deleting them keeps the sketches full constrained but unfortunately gives no result in making a better sweep. To me it seems you found a bug. You changed this bad constrained sketch in your second post. In Freecad I do not see anything that is simular to the checkbox you found in Salome. I think you only moved the ARC for the sweep from the center of the arc in the sketch 15 mm downwards to the bottom of the shape.
Schermafdruk van 2017-04-17 06-20-03.png
Schermafdruk van 2017-04-17 06-20-03.png (230.7 KiB) Viewed 1786 times
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Why are arc segments not twisted during sweep?

Post by UR_ »

Willem wrote:I think you only moved the ARC for the sweep from the center of the arc in the sketch 15 mm downwards to the bottom of the shape
That's right. In SALOME one can see results immediately after checking offered boxes, of course if "preview" is checked too.
If box "With contact" is checked both sketches are moved automatically to get in contact with sweep path.
In FreeCad i imitated this behaviour by simply moving sweep path manually.

BTW:
Length of distortion nearby Sketch1B is influenced by this preference :roll:
preferences.png
preferences.png (111.57 KiB) Viewed 1760 times
User avatar
Willem
Veteran
Posts: 1852
Joined: Fri Aug 12, 2016 3:27 pm
Location: Lisse, The Netherlands

Re: Why are arc segments not twisted during sweep?

Post by Willem »

Hi, I never thought of this setting as a solution for this problem. By helping other people on this forum I sometimes learn something new
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Why are arc segments not twisted during sweep?

Post by Chris_G »

Hi,
I just checked the bottom face of the sweep.
It is a clean BSpline surface :
Sweep-2.jpeg
Sweep-2.jpeg (12.42 KiB) Viewed 1756 times
Sweep-1.jpeg
Sweep-1.jpeg (36.06 KiB) Viewed 1756 times
So the problem is indeed only with the tesselation, but the sweep is good.
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Why are arc segments not twisted during sweep?

Post by Chris_G »

In fact, I think the sweep failed.
The upper surface of the sweep is identified as a toroid, and the 2 edges that join sketch 1 to sketch 2, as circles :
Sweep-3.jpeg
Sweep-3.jpeg (12.81 KiB) Viewed 1725 times
Since, the 2 sketches form a kind of twist, I think the 2 joining edges can't be circles.
So this might be an OCC bug ?
I have been able to produce a good sweep by converting the path to nurbs before :
Sweep-4.jpeg
Sweep-4.jpeg (8.81 KiB) Viewed 1725 times
good-sweep.fcstd
(20.81 KiB) Downloaded 23 times
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Why are arc segments not twisted during sweep?

Post by UR_ »

Hello Chris_G,
you are right, bsplined path works too!
Please, can you give some hints, which way you've done these examinations?
User avatar
Chris_G
Veteran
Posts: 2579
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Why are arc segments not twisted during sweep?

Post by Chris_G »

A lot of information is accessible with python commands.
For example, select an edge in the 3D view.
In the Selection panel, right-clic and "selection to python console" :
select.jpeg
select.jpeg (36.98 KiB) Viewed 1706 times
you get something like this in the python console :

Code: Select all

>>> obj = App.getDocument("Sans_nom").getObject("Spline")
>>> shp = App.getDocument("Sans_nom").getObject("Spline").Shape
>>> elt = App.getDocument("Sans_nom").getObject("Spline").Shape.Edge1
Then you get info with :

Code: Select all

elt.Curve
# result :
<BSplineCurve object>
I also made a tool for getting nurbs information in my crappy Curves workbench (the blue icon in the screenshot below)
curvesWB.jpeg
curvesWB.jpeg (53.85 KiB) Viewed 1706 times
UR_
Veteran
Posts: 1354
Joined: Tue Jan 03, 2017 8:42 pm

Re: Why are arc segments not twisted during sweep?

Post by UR_ »

Thank you!!
I have to check out this.
Post Reply