(self, bsp_surface)
Private method that deforms the control points of `surface` using the
        inherited method. All the changes are performed in place.

        :param Geom_Bspline_Surface bsp_surface: the surface to deform
Private method that deforms the control points of `surface` using the
        inherited method. All the changes are performed in place.
Private method that deforms the control points of surface using the inherited method . All the changes are performed in place .
def _deform_bspline_surface(self, bsp_surface):
        """
        Private method that deforms the control points of `surface` using the
        inherited method. All the changes are performed in place.

        :param Geom_Bspline_Surface bsp_surface: the surface to deform
        """
        if not isinstance(bsp_surface, Geom_BSplineSurface):
            raise TypeError("bsp_surface must be a Geom_BSplineSurface")
        # we first extract the poles of the curve
        # number of poles in u direction
        n_poles_u = bsp_surface.NbUPoles()
        # number of poles in v direction
        n_poles_v = bsp_surface.NbVPoles()
        # array which will contain the coordinates of the poles
        poles_coordinates = np.zeros(shape=(n_poles_u * n_poles_v, 3))

        # cycle over the poles to get their coordinates
        pole_ids = product(range(n_poles_u), range(n_poles_v))
        for pole_id, (u, v) in enumerate(pole_ids):
            pole = bsp_surface.Pole(u + 1, v + 1)
            poles_coordinates[pole_id, :] = self._pole_get_components(pole)

        # the new poles positions are computed through FFD
        new_pts = super().__call__(poles_coordinates)

        # the surface is now looped again to set the new poles positions
        pole_ids = product(range(n_poles_u), range(n_poles_v))
        for pole_id, (u, v) in enumerate(pole_ids):
            new_pole = self._pole_set_components(new_pts[pole_id, :])
            bsp_surface.SetPole(u + 1, v + 1, new_pole)
def _deform_bspline_surface ( self , bsp_surface ) : if not isinstance ( bsp_surface , Geom_BSplineSurface ) : raise TypeError ( "bsp_surface must be a Geom_BSplineSurface" ) # we first extract the poles of the curve # number of poles in u direction n_poles_u = bsp_surface . NbUPoles ( ) # number of poles in v direction n_poles_v = bsp_surface . NbVPoles ( ) # array which will contain the coordinates of the poles poles_coordinates = np . zeros ( shape = ( n_poles_u * n_poles_v , 3 ) ) # cycle over the poles to get their coordinates pole_ids = product ( range ( n_poles_u ) , range ( n_poles_v ) ) for pole_id , ( u , v ) in enumerate ( pole_ids ) : pole = bsp_surface . Pole ( u + 1 , v + 1 ) poles_coordinates [ pole_id , : ] = self . _pole_get_components ( pole ) # the new poles positions are computed through FFD new_pts = super ( ) . __call__ ( poles_coordinates ) # the surface is now looped again to set the new poles positions pole_ids = product ( range ( n_poles_u ) , range ( n_poles_v ) ) for pole_id , ( u , v ) in enumerate ( pole_ids ) : new_pole = self . _pole_set_components ( new_pts [ pole_id , : ] ) bsp_surface . SetPole ( u + 1 , v + 1 , new_pole )