|
def | __init__ (self, Xc, Yc, Zc, diameter, indentationDepth) |
|
def | sDF (self, x, y, z) |
|
def | gradSdf (self, x, y, z) |
|
def | hessSdf (self, x, y, z) |
|
Definition at line 60 of file sdf_ydirection.py.
◆ __init__()
def sdf_ydirection.CylinderZ.__init__ |
( |
|
self, |
|
|
|
Xc, |
|
|
|
Yc, |
|
|
|
Zc, |
|
|
|
diameter, |
|
|
|
indentationDepth |
|
) |
| |
Definition at line 61 of file sdf_ydirection.py.
61 def __init__(self, Xc, Yc, Zc, diameter, indentationDepth):
76 self.radius = diameter/2
77 self.depth = indentationDepth
◆ gradSdf()
def sdf_ydirection.CylinderZ.gradSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 82 of file sdf_ydirection.py.
82 def gradSdf(self, x, y, z):
83 a = (x-self.xc)**2 + (y-self.yc)**2
84 c_val_A = 1./np.sqrt(a)
85 c_val_dx = c_val_A * (x-self.xc)
86 c_val_dy = c_val_A * (y-self.yc)
87 c_val_dz = np.zeros_like(c_val_dy)
89 return np.hstack([c_val_dx.reshape((-1,1)), c_val_dy.reshape((-1,1)), c_val_dz.reshape((-1,1))])
◆ hessSdf()
def sdf_ydirection.CylinderZ.hessSdf |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 91 of file sdf_ydirection.py.
91 def hessSdf(self, x, y, z):
92 a = (x-self.xc)**2 + (y-self.yc)**2
93 c_val_A = 1./np.sqrt(a)
94 c_val_B = 1./(a**(3./2.))
95 Hxx = c_val_A - c_val_B * (x-self.xc)**2
96 Hxy = -c_val_B * (x-self.xc)*(y-self.yc)
97 Hyy = c_val_A - c_val_B * (y-self.yc)**2
98 zeros = np.zeros_like(Hxx).reshape((-1,1))
100 return np.hstack([Hxx.reshape((-1,1)), Hxy.reshape((-1,1)), zeros, Hyy.reshape((-1,1)), zeros, zeros])
◆ sDF()
def sdf_ydirection.CylinderZ.sDF |
( |
|
self, |
|
|
|
x, |
|
|
|
y, |
|
|
|
z |
|
) |
| |
Definition at line 79 of file sdf_ydirection.py.
79 def sDF(self, x, y, z):
80 return np.sqrt((x - self.xc)**2 + (y - self.yc)**2) - self.radius
◆ depth
sdf_ydirection.CylinderZ.depth |
◆ radius
sdf_ydirection.CylinderZ.radius |
sdf_ydirection.CylinderZ.t |
◆ Xc
sdf_ydirection.CylinderZ.Xc |
◆ xc
sdf_ydirection.CylinderZ.xc |
◆ Yc
sdf_ydirection.CylinderZ.Yc |
◆ yc
sdf_ydirection.CylinderZ.yc |
◆ Zc
sdf_ydirection.CylinderZ.Zc |
◆ zc
sdf_ydirection.CylinderZ.zc |
The documentation for this class was generated from the following file: