def frame_at(self, u, v): """Compute the local frame at a point on the curve. Parameters ---------- u : float v : float Returns ------- :class:`~compas.geometry.Frame` """ point = gp_Pnt() uvec = gp_Vec() vvec = gp_Vec() self.occ_surface.D1(u, v, point, uvec, vvec) return Frame(Point.from_occ(point), Vector.from_occ(uvec), Vector.from_occ(vvec))
def curvature_at(self, u, v): """Compute the curvature at a point on the surface. Parameters ---------- u : float v : float Returns ------- :class:`~compas.geometry.Vector` """ props = GeomLProp_SLProps(self.occ_surface, u, v, 2, 1e-6) gaussian = props.GaussianCurvature() mean = props.MeanCurvature() point = props.Value() normal = props.Normal() return gaussian, mean, Point.from_occ(point), Vector.from_occ(normal)