Compute parameter value at the specified normalized distance or a point. :param d: normalized distance [0, 1] or a point :return: parameter value
(self: Mixin1DProtocol, d: Real | Vector)
| 2148 | return rv |
| 2149 | |
| 2150 | def paramAt(self: Mixin1DProtocol, d: Real | Vector) -> float: |
| 2151 | """ |
| 2152 | Compute parameter value at the specified normalized distance or a point. |
| 2153 | |
| 2154 | :param d: normalized distance [0, 1] or a point |
| 2155 | :return: parameter value |
| 2156 | """ |
| 2157 | |
| 2158 | curve = self._geomAdaptor() |
| 2159 | |
| 2160 | if isinstance(d, Vector): |
| 2161 | curve_ = self._curve() |
| 2162 | |
| 2163 | rv = GeomAPI_ProjectPointOnCurve( |
| 2164 | d.toPnt(), curve_, curve.FirstParameter(), curve.LastParameter(), |
| 2165 | ).LowerDistanceParameter() |
| 2166 | |
| 2167 | else: |
| 2168 | l = GCPnts_AbscissaPoint.Length_s(curve) |
| 2169 | rv = GCPnts_AbscissaPoint(curve, l * d, curve.FirstParameter()).Parameter() |
| 2170 | |
| 2171 | return rv |
| 2172 | |
| 2173 | def params( |
| 2174 | self: Mixin1DProtocol, pts: Iterable[Vector], tol: float = 1e-6 |
no test coverage detected