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

Method surface

cadquery/occ_impl/nurbs.py:208–231  ·  view source on GitHub ↗

Convert to a OCCT Surface object.

(self)

Source from the content-addressed store, hash-verified

206 vperiodic: bool
207
208 def surface(self) -> Geom_BSplineSurface:
209 """
210 Convert to a OCCT Surface object.
211 """
212
213 unique_knots, mults_arr = np.unique(self.uknots, return_counts=True)
214 uknots = _colRealArray(unique_knots)
215 umults = _colIntArray(mults_arr)
216
217 unique_knots, mults_arr = np.unique(self.vknots, return_counts=True)
218 vknots = _colRealArray(unique_knots)
219 vmults = _colIntArray(mults_arr)
220
221 return Geom_BSplineSurface(
222 _colPtsArray2(self.pts),
223 uknots,
224 vknots,
225 umults,
226 vmults,
227 self.uorder,
228 self.vorder,
229 self.uperiodic,
230 self.vperiodic,
231 )
232
233 def face(self, tol: float = 1e-3) -> Face:
234 """

Callers 1

faceMethod · 0.95

Calls 3

_colRealArrayFunction · 0.85
_colIntArrayFunction · 0.85
_colPtsArray2Function · 0.85

Tested by

no test coverage detected