How to project a curve onto a cylindrical surface?
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Veteran
- Posts: 7790
- Joined: Tue Jan 07, 2014 11:10 am
- Contact:
How to project a curve onto a cylindrical surface?
Hello,
which possibilities are there in Freecad to project a closed Reflect-Lines (curves-workbench) onto an outer cylindrical surface?
In this way, I was able to create very good parting surfaces in Creo for tool- and mould making. The reflect lines and the projection curve of the cylinder surface have to be connected afterwards only by loft.
Who knows a trick how to project onto a cylindrical surface?
A scaled clone doesn't quite return the result I'm looking for.
Many greetings
Wilfried
which possibilities are there in Freecad to project a closed Reflect-Lines (curves-workbench) onto an outer cylindrical surface?
In this way, I was able to create very good parting surfaces in Creo for tool- and mould making. The reflect lines and the projection curve of the cylinder surface have to be connected afterwards only by loft.
Who knows a trick how to project onto a cylindrical surface?
A scaled clone doesn't quite return the result I'm looking for.
Many greetings
Wilfried
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: How to project a curve onto a cylindrical surface?
there is no default method but it is simple to map the coordinates of some discretized points of the curve to cylindric coordinates and than normalize the radius.
I will look for the script, I'm sure I had it already.
I will look for the script, I'm sure I had it already.
Re: How to project a curve onto a cylindrical surface?
Maybe not exactly what you need but it does give you quite a lot of room to play with the parameters and get different results out of it...
Note:
- I have not made the final loft surface between the section and the reflectlines
- I have scaled the clone only in X an Z directions (not Y)
- with the scale and placement properties of the clone one can get a lot of flexibility on the shape of the section curve
- this is just a quick test of the first idea I had and so I did not check if it is fully parametric or search for ways to make it
Note:
- I have not made the final loft surface between the section and the reflectlines
- I have scaled the clone only in X an Z directions (not Y)
- with the scale and placement properties of the clone one can get a lot of flexibility on the shape of the section curve
- this is just a quick test of the first idea I had and so I did not check if it is fully parametric or search for ways to make it
- Attachments
-
- project_to_cylindrical_face (1).FCStd
- (407.47 KiB) Downloaded 66 times
Last edited by saso on Tue Jul 30, 2019 11:22 am, edited 2 times in total.
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: How to project a curve onto a cylindrical surface?
It's an intersting solution.saso wrote: ↑Tue Jul 30, 2019 10:56 am Maybe not exactly what you need but it does give you quite a lot of room to play with the parameters and get different results out of it...
Note:
- I have not made the final loft surface between the section and the reflectlines
- I have scaled the clone only in X an Z directions (not Y)
- with the scale and placement properties of the clone one can get a lot of flexibility on the section curve
- I did not check if it is fully parametric or search for ways to make it
Here my method
Code: Select all
import numpy as np
s=App.activeDocument().ReflectLines001.Shape
eds=[]
for e in s.Edges:
pts2=[]
pts=e.discretize(100)
for p in pts:
h=p.y
arc=np.arctan2(p.x,p.z)
r=FreeCAD.Vector(p.x,p.z).Length
R=150
p2=FreeCAD.Vector(np.sin(arc)*R,h,np.cos(arc)*R)
pts2 += [p2]
Part.show(Part.makePolygon(pts2))
Re: How to project a curve onto a cylindrical surface?
Yes, it was also my first curious idea to check (compare) that after I generated yours
- microelly2
- Veteran
- Posts: 4688
- Joined: Tue Nov 12, 2013 4:06 pm
- Contact:
Re: How to project a curve onto a cylindrical surface?
I still have a little bit to fight with the self connecting cylinder face but this is a use case of uv projection from pyflow too.
the same result.
the same result.
-
- Veteran
- Posts: 7790
- Joined: Tue Jan 07, 2014 11:10 am
- Contact:
Re: How to project a curve onto a cylindrical surface?
Hi Thomas,microelly2 wrote: ↑Tue Jul 30, 2019 11:43 am I still have a little bit to fight with the self connecting cylinder face but this is a use case of uv projection from pyflow too.
the same result.
cp_019.png
that looks good. Many thanks to you and Saso for the help. Please upload your Freecad file, because I want to create the loft face to be able to judge it.
Many greetings
Wilfried
-
- Veteran
- Posts: 7790
- Joined: Tue Jan 07, 2014 11:10 am
- Contact:
Re: How to project a curve onto a cylindrical surface?
… a solution with the means of PartWB and slice:
- Attachments
-
- proj_cylindrical_face_2.FCStd
- FC.19.17300
- (405.6 KiB) Downloaded 91 times
Re: How to project a curve onto a cylindrical surface?
But he probably had to downgrade your original ReflectLines because they had overlapping edges and simply cloning and lofting gives wrong result. Are those overlapping lines supposed to be there?