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

Method tangentAt

cadquery/occ_impl/shapes.py:3466–3480  ·  view source on GitHub ↗

Computes tangent vectors at the desired location in the u,v parameter space. :returns: vectors representing the tangent directions and the position :param u: the u parametric location to compute at. :param v: the v parametric location to compute at.

(self, u: Real, v: Real)

Source from the content-addressed store, hash-verified

3464 return rv_n, rv_p
3465
3466 def tangentAt(self, u: Real, v: Real) -> tuple[Vector, Vector, Vector]:
3467 """
3468 Computes tangent vectors at the desired location in the u,v parameter space.
3469
3470 :returns: vectors representing the tangent directions and the position
3471 :param u: the u parametric location to compute at.
3472 :param v: the v parametric location to compute at.
3473 """
3474
3475 p = gp_Pnt()
3476 du = gp_Vec()
3477 dv = gp_Vec()
3478 BRepAdaptor_Surface(self.wrapped).D1(u, v, p, du, dv)
3479
3480 return Vector(du).normalized(), Vector(dv).normalized(), Vector(p)
3481
3482 def Center(self) -> Vector:
3483

Callers 14

filterMethod · 0.45
tangentArcPointMethod · 0.45
_getAxisMethod · 0.45
_getLinMethod · 0.45
filletMethod · 0.45
test_curve_tangentsFunction · 0.45
test_surface_tangentsFunction · 0.45
testSplineMethod · 0.45
testSweepMethod · 0.45
testTangengAtMethod · 0.45

Calls 2

VectorClass · 0.85
normalizedMethod · 0.80

Tested by 9

test_curve_tangentsFunction · 0.36
test_surface_tangentsFunction · 0.36
testSplineMethod · 0.36
testSweepMethod · 0.36
testTangengAtMethod · 0.36
test_splineFunction · 0.36