Constructing a Deformable Block

The function

MbResultType NurbsBlockSolid( const MbPlacement3D &    place,
                                    double             ax,
                                    double             ay,
                                    double             az,
                                    bool               outDir,
                              const MbSNameMaker &     names,
                                    SimpleName         name,
                                    NurbsBlockValues & param,
                                    MbSolid *&         result )

constructs a solid in the form of a rectangular parallelepiped with deformable faces.

The input parameters of the function are:

  • place – the local coordinate system;

  • ax – the size along the X axis;

  • ay – the size along the Y axis;

  • az – the size along the Z axis;

  • outDir – the orientation of face normals outward from the solid (true – normals point outward);

  • names – the operation name maker;

  • name – the main name;

  • param – the face construction parameters (see NurbsBlockValues struct in the file op_shell_parameter.h).

The output parameter of the function is the solid result built on NURBS surfaces.

The function is declared in the file action_direct.h.

The function constructs a deformable solid in the form of a rectangular parallelepiped whose dimensions in the local coordinate system place are defined by the parameters ax, ay, az. All faces of the parallelepiped are built on the basis of planar NURBS surfaces whose orders and numbers of control points are determined by the parameter param.

Figure shows the parallelepiped result constructed by the NurbsBlockSolid() function and its control points. The figure on the right shows the same parallelepiped after deformation by moving the face control points:

../../../../_images/M.6.4.1.png

The NurbsBlockSolid() function adds the MbNurbsBlockSolid builder to the construction history of the resulting solid. The builder stores all data required to perform the operation. The MbNurbsBlockSolid builder is declared in the file cr_nurbs_block_solid.h.