fc_tofu wrote: ↑Fri Apr 24, 2020 6:07 pm
Could you please figure out G1 connection at Gordon rim? I made a test with perpendicular profile way, but failed to get G1 connection at mirror rim.
The mathematics of a gordon surface does not allow to create such a tangent constraint with these profiles.
You need other profiles.
If you want such a helmet the simplest way is to use another model to create the surface.
here an example how I create tangent helmets
I use a bottom border sketch and some sketches to create the dome.
To get the tangent I insert a lifted bottom.
- dp_04_25_001.png (48.06 KiB) Viewed 1538 times
Code: Select all
import numpy as np
hh=3
poles=np.zeros((5,5,3))
ptsa=np.round(np.array([v.Point for v in App.ActiveDocument.Sketch.Shape.Wires[0].Vertexes]),1)
poles=poles.swapaxes(0,1)
poles[0,0:-1]=ptsa[12:17][::-1]
poles[4]=ptsa[4:9]
poles=poles.swapaxes(0,1)
poles[0]=ptsa[0:5]
poles[4]=ptsa[8:13][::-1]
ptsa=np.array([v.Point for v in App.ActiveDocument.Sketch001.Shape.Wires[0].Vertexes])
poles[1,1:4]=ptsa
ptsa=np.array([v.Point for v in App.ActiveDocument.Sketch002.Shape.Wires[0].Vertexes])
poles[2,1:4]=ptsa
ptsa=np.array([v.Point for v in App.ActiveDocument.Sketch003.Shape.Wires[0].Vertexes])
poles[3,1:4]=ptsa
ud=3
vd=3
mu=[4,1,4]
mv=[4,1,4]
uk=range(len(mu))
vk=range(len(mv))
sf=Part.BSplineSurface()
sf.buildFromPolesMultsKnots(poles,mu,mv,uk,vk,False,False,ud,vd)
a=FreeCAD.ActiveDocument.getObject("ShapeA")
if a is None:
a=FreeCAD.ActiveDocument.addObject("Part::Feature","ShapeA")
a.Shape=sf.toShape()
polesb=np.zeros((7,7,3))
print (polesb.shape)
polesb[1:-1,1:-1]=poles
polesb[0]=polesb[1]
polesb[-1]=polesb[-2]
polesb=polesb.swapaxes(0,1)
polesb[0]=polesb[1]
polesb[-1]=polesb[-2]
polesb=polesb.swapaxes(0,1)
polesb[1,1:-1,2] += hh
polesb[-2,1:-1,2] += hh
polesb[2:-2,1,2] += hh
polesb[2:-2,-2,2] += hh
polesb[0,0]=polesb[0,1]
polesb[-1,-1]=polesb[-1,-2]
polesb[0,-1]=polesb[0,-2]
polesb[-1,0]=polesb[-1,1]
ud=3
vd=3
mu=[4,1,1,1,4]
mv=[4,1,1,1,4]
uk=range(len(mu))
vk=range(len(mv))
sf=Part.BSplineSurface()
sf.buildFromPolesMultsKnots(polesb,mu,mv,uk,vk,False,False,ud,vd)
a=FreeCAD.ActiveDocument.getObject("ShapeB")
if a is None:
a=FreeCAD.ActiveDocument.addObject("Part::Feature","ShapeB")
a.Shape=sf.toShape()