Constrain a point in a b-spline.

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
codeborg00
Posts: 3
Joined: Sun Jan 23, 2022 5:34 pm

Constrain a point in a b-spline.

Post by codeborg00 »

Hello forum members,

OS: Ubuntu 21.04 (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.9.2
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)


I am a relatively new FreeCAD user and have been trying to follow a tutorial which details how to model an a380 airliner.
Link to tutorial: https://www.youtube.com/watch?v=dRCKmc0ZxBk

This tutorial is for solidworks, however I figured it should all be possible to do in FreeCAD. Unfortunately, I have come across an issue at 23:14(tutorial timestamp). I am unable to constrain the B-spline as shown in the tutorial. I have attached the file which I am working on. I was wondering if anybody has a solution to my problem.

Thank you in advance
Attachments
a380_model.FCStd
(557.17 KiB) Downloaded 25 times
chrisb
Veteran
Posts: 54164
Joined: Tue Mar 17, 2015 9:14 am

Re: Constrain a point in a b-spline.

Post by chrisb »

Sketcher B-splines cannot (yet) be defined to go through certain points. You, however, try doing it with Draft splines. You may first have to create DatumPoints lying on the curves and the planes.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mrdic
Posts: 132
Joined: Wed May 10, 2017 4:25 am

Re: Constrain a point in a b-spline.

Post by mrdic »

I find that drawing D-wires/polylines and converting them to splines makes interpolated splines efficiently.
codeborg00
Posts: 3
Joined: Sun Jan 23, 2022 5:34 pm

Re: Constrain a point in a b-spline.

Post by codeborg00 »

Thank you for your replies.

I used the draft workbench after having calculated the necessary datum points. It all seemed to work fine, however, for some reason, I have come across the issue that my b-splines are not symmetrical along the z-axis (I have attached a screenshot). I was wondering if there is any easy fix for this.
Screenshot from 2022-01-27 20-20-13.png
Screenshot from 2022-01-27 20-20-13.png (18.8 KiB) Viewed 1849 times
Thank you in advance
TheMarkster
Veteran
Posts: 5512
Joined: Thu Apr 05, 2018 1:53 am

Re: Constrain a point in a b-spline.

Post by TheMarkster »

I think this would move the object so it's center of mass is on the origin.

Select the object, press Ctrl+Shift+P. In the python console enter:

Code: Select all

obj.Placement.translate(obj.Shape.CenterOfMass *-1)
If CenterOfMass doesn't work try CenterOfGravity.
codeborg00
Posts: 3
Joined: Sun Jan 23, 2022 5:34 pm

Re: Constrain a point in a b-spline.

Post by codeborg00 »

Unfortunately,

Code: Select all

obj.Placement.translate(obj.Shape.CenterOfMass *-1)
doesn't seem to be doing anything for me. Neither does

Code: Select all

obj.Placement.translate(obj.Shape.CenterOfGravity *-1)
.
TheMarkster
Veteran
Posts: 5512
Joined: Thu Apr 05, 2018 1:53 am

Re: Constrain a point in a b-spline.

Post by TheMarkster »

Install MeshRemodel workbench. There is a tool there that can be used to make a bspline though selected points. It actually creates a Draft bspline.
Snip macro screenshot-7fd963.png
Snip macro screenshot-7fd963.png (67.82 KiB) Viewed 1713 times

Snip macro screenshot-72c074.png
Snip macro screenshot-72c074.png (56.59 KiB) Viewed 1713 times
Attachments
Snip macro screenshot-c24418.png
Snip macro screenshot-c24418.png (53.57 KiB) Viewed 1713 times
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Constrain a point in a b-spline.

Post by thomas-neemann »

codeborg00 wrote: Sun Jan 23, 2022 5:57 pm ...I was wondering if anybody has a solution to my problem.

...
I don't know if it's a solution for you, it's not a b-spline either, but it's in the sketcher.


https://www.youtube.com/watch?v=M7JkL6sAuA0

phpBB [video]



OS: Ubuntu 20.04.1 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.20.27078 (Git) AppImage
Build type: Release
Branch: (HEAD detached at bcdd926)
Hash: bcdd926686f2245fe60baface1cce1ab3dff7a5b
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
thomas-neemann
Veteran
Posts: 11895
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Constrain a point in a b-spline.

Post by thomas-neemann »

codeborg00 wrote: Sun Jan 23, 2022 5:57 pm ... I was wondering if anybody has a solution to my problem.

...
here is another suggestion, with symmetrical, closed bsplines

https://forum.freecadweb.org/viewtopic. ... 49#p566949

1.png
1.png (45.37 KiB) Viewed 1611 times
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
Post Reply