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!
Post Reply
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Can't convert from Wire to Bspline

Post by herbk »

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 22 times
Gruß Herbert
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Can't convert from Wire to Bspline

Post by vocx »

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?
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
hammax
Veteran
Posts: 1991
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Can't convert from Wire to Bspline

Post by hammax »

… 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 1118 times
Attachments
testprofile_2.FCStd
(22.23 KiB) Downloaded 17 times
herbk
Veteran
Posts: 2660
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Can't convert from Wire to Bspline

Post by herbk »

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 1106 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
Veteran
Posts: 1991
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Can't convert from Wire to Bspline

Post by hammax »

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

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

Re: Can't convert from Wire to Bspline

Post by Syres »

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
Veteran
Posts: 2899
Joined: Thu Aug 09, 2018 11:14 am

Re: Can't convert from Wire to Bspline

Post by Syres »

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

Re: Can't convert from Wire to Bspline

Post by herbk »

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
Post Reply