Project s onto base using normal projection.
(
s: Shape,
base: Shape,
continuity: Literal["C1", "C2", "C3"] = "C2",
degree: int = 3,
maxseg: int = 30,
tol: float = 1e-4,
)
| 7540 | |
| 7541 | @multidispatch |
| 7542 | def project( |
| 7543 | s: Shape, |
| 7544 | base: Shape, |
| 7545 | continuity: Literal["C1", "C2", "C3"] = "C2", |
| 7546 | degree: int = 3, |
| 7547 | maxseg: int = 30, |
| 7548 | tol: float = 1e-4, |
| 7549 | ) -> Shape: |
| 7550 | """ |
| 7551 | Project s onto base using normal projection. |
| 7552 | """ |
| 7553 | |
| 7554 | bldr = BRepAlgo_NormalProjection(base.wrapped) |
| 7555 | bldr.SetParams(tol, tol ** (2 / 3), _to_geomabshape(continuity), degree, maxseg) |
| 7556 | |
| 7557 | for el in _get_wires(s): |
| 7558 | bldr.Add(el.wrapped) |
| 7559 | |
| 7560 | bldr.Build() |
| 7561 | |
| 7562 | return _compound_or_shape(bldr.Projection()) |
| 7563 | |
| 7564 | |
| 7565 | @multidispatch |