Can't convert from Wire to Bspline

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
herbk
Posts: 1501
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Can't convert from Wire to Bspline

Postby herbk » Thu Sep 19, 2019 8:42 pm

Hi,

like the topic says, i can't convert a imported .dat file to a B-Spline. The object tree shows the BSpline Object, bot i got nothing at the main window.

OS: openSUSE Leap 15.1 (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18227 (Git) AppImage
Build type: Release
Branch: master
Hash: a374ecc8ef2abf38b146a1013a0f9700d1cb5fe9
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Attachments
testprofile.FCStd
(17.73 KiB) Downloaded 8 times
Gruß Herbert
vocx
Posts: 1425
Joined: Thu Oct 18, 2018 9:18 pm

Re: Can't convert from Wire to Bspline

Postby vocx » Thu Sep 19, 2019 9:25 pm

herbk wrote:
Thu Sep 19, 2019 8:42 pm
Hi,

like the topic says, i can't convert a imported .dat file to a B-Spline. The object tree shows the BSpline Object, bot i got nothing at the main window.

...
Please indicate how you are importing the data. What type of data is this? A text file with a collection of vertices?
User avatar
hammax
Posts: 841
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: Can't convert from Wire to Bspline

Postby hammax » Fri Sep 20, 2019 5:29 am

… if I have nothing else than the pure profile (-shape),
I'm trying to reproduce it by sketcher BSpline and to do it with a minimum of control points.
When the fitting is ok you can constrain it.

T_prof.PNG
T_prof.PNG (10.94 KiB) Viewed 232 times
Attachments
testprofile_2.FCStd
(22.23 KiB) Downloaded 3 times
herbk
Posts: 1501
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Can't convert from Wire to Bspline

Postby herbk » Fri Sep 20, 2019 6:19 am

Hi Hammax,
I know that. :D The post is not for asking for help, i want to show of that there something not works, what worked bevore...

BTW. If i need a profile i usualy recreate it with a sketcher B-Spline, because there is an other problem if conferting a profile from a .dat file to a B-Spline:
The end tip of the profile does not come off sharp. It shows some curios shape, depending at the profile a bit different.

Edit: Your pic dosn't show the BSpline at the object tree... Thats what i have:
testprofile.jpg
testprofile.jpg (23.67 KiB) Viewed 220 times
And, like sayd, i just have it with the 0.19.18227 AppImage, not with Appimage 0.19.17681, the latest AppImage bevore "the big merge" i have.
Gruß Herbert
User avatar
hammax
Posts: 841
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee

Re: Can't convert from Wire to Bspline

Postby hammax » Fri Sep 20, 2019 8:17 am

… OK in my FC0.19.17300 version Wire=>BSpline works (+recalculate)

T_prof_2.PNG
T_prof_2.PNG (6.86 KiB) Viewed 210 times
Syres
Posts: 351
Joined: Thu Aug 09, 2018 11:14 am

Re: Can't convert from Wire to Bspline

Postby Syres » Fri Sep 20, 2019 6:52 pm

herbk wrote:
Thu Sep 19, 2019 8:42 pm
like the topic says, i can't convert a imported .dat file to a B-Spline. The object tree shows the BSpline Object, bot i got nothing at the main window.
I believe the root cause is there were approx. 28 'Recompute' lines removed from Draft.py at least five months ago and this function obviously isn't used much as I'm not ware of it being reported since the change. So for the meantime, you need to press Ctrl+R (or click the Recompute icon) in order to clear the tick mark on the BSpline and it will appear on screen. If I can find the correct fix I'll submit a Pull Request as I can replicate on both:

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18234 (Git)
Build type: Release
Branch: master
Hash: 3af5d97e9b2a60823815f662aba25422c4bc45bb
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)

OS: Linux Mint 19.1 (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18260 (Git) AppImage
Build type: Release
Branch: master
Hash: dbf0644b60c35273525985fa13859ad39b0c10df
Python version: 3.7.3
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Syres
Posts: 351
Joined: Thu Aug 09, 2018 11:14 am

Re: Can't convert from Wire to Bspline

Postby Syres » Sat Sep 21, 2019 8:24 am

PR submitted https://github.com/FreeCAD/FreeCAD/pull/2542 to fix both directions Wire>BSpline and BSpine>Wire
herbk
Posts: 1501
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Can't convert from Wire to Bspline

Postby herbk » Sun Sep 22, 2019 7:20 am

Syres wrote:
Sat Sep 21, 2019 8:24 am
PR submitted https://github.com/FreeCAD/FreeCAD/pull/2542 to fix both directions Wire>BSpline and BSpine>Wire
Thank you very much.
Gruß Herbert