How to make a circle perpendicular to a randomly oriented 3D 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
Mary
Posts: 2
Joined: Wed Jul 29, 2015 5:43 pm

How to make a circle perpendicular to a randomly oriented 3D spline

Post by Mary »

Hi all,
I am trying to generate a 3D tube in freecad.
My plan is:
- to mark some points and generate a spline through the points. The spline is a 3D spline, i.e. it doesn't lie on any of the Cartesian planess
- to generate the tube of a specific diameter around the spline by sweeping a circle perpendicular to the spline along the spline

I am a new user so I am experiencing some difficulties in performing a very simple task: to orient the circle perpendicularly to the starting point of spline.
Please let me know if you can help me and guide me through this! I found some tutorial on you tube but in all of them the line and the circle lie on the Cartesian planes.
Thank you
Mary
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by DeepSOIC »

Hi!
Use Draft PathArray, it has an Align property which does just that.
EDIT: place your circle in XY plane, with the center at the origin
Mary
Posts: 2
Joined: Wed Jul 29, 2015 5:43 pm

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by Mary »

Hi DeepSoic,
thank you very much for your hint. I think I am very close to my desired result. However, the circles are parallel to the curve, not perpendicular. I have used the align property of PathArray (true & false) but that changes the orientation from parallel to the path to parallel to the XY plane.
How can I set the normal direction? I am attaching my project for your reference.
Thank you very much!
Mary
Attachments
tube.FCStd
(5.51 KiB) Downloaded 40 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by DeepSOIC »

Well, it turns out my suggestion about XY sketch orientation was wrong :| , use YZ instead :roll:
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by DeepSOIC »

and before you ask - no, I don't know how to force patharray produce one object, it places two even if I set 1. So you'll have to either use draft downgrade (you are going to loose parametric dependency), or use Part Cut with some box made specially for the purpose to exclude one of the circles.
murdic
Posts: 88
Joined: Fri Feb 28, 2014 12:35 am

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by murdic »

If you place a sphere at the end of the path, then move|copy it a minute increment along the path, section between the spheres, then move the section back to the end of the path, the result is very close to instantaneously normal to the path.
mario52
Veteran
Posts: 4674
Joined: Wed May 16, 2012 2:13 pm

Re: How to make a circle perpendicular to a randomly oriented 3D spline

Post by mario52 »

hi
uses this macro Macro_WorkFeatures and :
1: cut your line line in 3 parts (or 4 . . .) (your line original is not modified)
2: select 3 points (extremity of your line and a point to choose the lines created
3: create plane of 3 points (plane 1)
4: create plane (plane 2) perpendicular of plane 1
5: select the face plane 2
6: select create sketch of face
7: create your circle and sweep
How to make a circle perpendicular to a randomly oriented 3D spline.png
How to make a circle perpendicular to a randomly oriented 3D spline.png (14.82 KiB) Viewed 1670 times
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply