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

Function _pts_to_harray

cadquery/occ_impl/shapes.py:5412–5422  ·  view source on GitHub ↗

Convert a sequence of Vector to a TColgp harray (OCCT specific).

(pts: Sequence[VectorLike])

Source from the content-addressed store, hash-verified

5410
5411
5412def _pts_to_harray(pts: Sequence[VectorLike]) -> TColgp_HArray1OfPnt:
5413 """
5414 Convert a sequence of Vector to a TColgp harray (OCCT specific).
5415 """
5416
5417 rv = TColgp_HArray1OfPnt(1, len(pts))
5418
5419 for i, p in enumerate(pts):
5420 rv.SetValue(i + 1, Vector(p).toPnt())
5421
5422 return rv
5423
5424
5425def _pts_to_harray2D(pts: Sequence[tuple[Real, Real]]) -> TColgp_HArray1OfPnt2d:

Callers 1

splineFunction · 0.85

Calls 2

VectorClass · 0.85
toPntMethod · 0.80

Tested by

no test coverage detected