(cls, e: Edge)
| 165 | |
| 166 | @classmethod |
| 167 | def fromEdge(cls, e: Edge): |
| 168 | |
| 169 | assert ( |
| 170 | e.geomType() == "BSPLINE" |
| 171 | ), "B-spline geometry required, try converting first." |
| 172 | |
| 173 | g = e._geomAdaptor().BSpline() |
| 174 | |
| 175 | knots = np.repeat(list(g.Knots()), list(g.Multiplicities())) |
| 176 | pts = np.array([(p.X(), p.Y(), p.Z()) for p in g.Poles()]) |
| 177 | order = g.Degree() |
| 178 | periodic = g.IsPeriodic() |
| 179 | |
| 180 | return cls(pts, knots, order, periodic) |
| 181 | |
| 182 | def __call__(self, us: Array) -> Array: |
| 183 |