MCPcopy
hub / github.com/CadQuery/cadquery / locationAt

Method locationAt

cadquery/occ_impl/shapes.py:3360–3375  ·  view source on GitHub ↗

Computes the location at the desired location in the u,v parameter space. :returns: a location :param u: the u parametric location to compute the normal at. :param v: the v parametric location to compute the normal at.

(self, u: Real, v: Real)

Source from the content-addressed store, hash-verified

3358 return Vector(p)
3359
3360 def locationAt(self, u: Real, v: Real) -> Location:
3361 """
3362 Computes the location at the desired location in the u,v parameter space.
3363
3364 :returns: a location
3365 :param u: the u parametric location to compute the normal at.
3366 :param v: the v parametric location to compute the normal at.
3367 """
3368 p = gp_Pnt()
3369 du = gp_Vec()
3370 dv = gp_Vec()
3371
3372 ga = self._geomAdaptor()
3373 ga.D1(u, v, p, du, dv)
3374
3375 return Location(Plane(Vector(p), Vector(du), Vector(du).cross(Vector(dv))))
3376
3377 def positions(self, uvs: Iterable[tuple[Real, Real]]) -> list[Vector]:
3378 """

Callers 3

toLocsMethod · 0.45
textFunction · 0.45
testSketchMethod · 0.45

Calls 5

_geomAdaptorMethod · 0.95
LocationClass · 0.85
PlaneClass · 0.85
VectorClass · 0.85
crossMethod · 0.80

Tested by 1

testSketchMethod · 0.36