MCPcopy Index your code
hub / github.com/CadQuery/cadquery / positions

Method positions

cadquery/occ_impl/shapes.py:3377–3392  ·  view source on GitHub ↗

Computes position vectors at the desired locations in the u,v parameter space. :returns: list of vectors corresponding to the requested u,v positions :param uvs: iterable of u,v pairs.

(self, uvs: Iterable[tuple[Real, Real]])

Source from the content-addressed store, hash-verified

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 """
3379 Computes position vectors at the desired locations in the u,v parameter space.
3380
3381 :returns: list of vectors corresponding to the requested u,v positions
3382 :param uvs: iterable of u,v pairs.
3383 """
3384 p = gp_Pnt()
3385 vn = gp_Vec()
3386 rv = []
3387
3388 for u, v in uvs:
3389 BRepGProp_Face(self.wrapped).Normal(u, v, p, vn)
3390 rv.append(Vector(p))
3391
3392 return rv
3393
3394 @multimethod
3395 def normalAt(self, locationVector: VectorLike | None = None) -> Vector:

Callers 3

distributeMethod · 0.45
test_face_positionsFunction · 0.45
testPositionAtMethod · 0.45

Calls 2

VectorClass · 0.85
appendMethod · 0.80

Tested by 2

test_face_positionsFunction · 0.36
testPositionAtMethod · 0.36