int ZW_MODL_create_box(svxAxis axis, svxPoint center, double edgelen[3], char boxname[32])
{
svxBoxData box;
cvxPartBoxInit(&box);
box.Combine = VX_BOOL_NONE;
box.axis= axis;
box.Center = center;
box.X = edgelen[0];
box.Y = edgelen[1];
box.Z = edgelen[2];
strcpy_s(box.ftrName, sizeof(box.ftrName), boxname);
int idShape = 0;
cvxPartBox(&box, &idShape);
return idShape;
}
int ZWcreatplaneoffYZ(double psi)
{
svxPlaneData plane;
cvxMemZero((void*)&plane, sizeof(svxPlaneData));
plane.method = VX_PLANE_YZ;
plane.inpUnion.xyz.Offset = 0;
svxPoint xpoint = { 0,1,0 };
plane.XPnt = xpoint;
plane.XAng = 0.0;
plane.YAng = psi;
plane.ZAng = 0.0;
int idplane;
cvxPartPlaneNew(&plane, &idplane);
return idplane;
}
char msg[256];
svxAxis axis;
axis.Pnt = { 0.0,0.0,0.0 };
axis.Dir = { 0.0,0.0,1.0 };
svxPoint center = { 0.0,0.0,0.0 };
double edgelen[3] = { 10.0,10.0,10.0 };
char boxname[32] = "box1";
int idShape = ZW_MODL_create_box(axis, center, edgelen, boxname);
int planen = ZWcreatplaneoffYZ(0.0);
svxDivideData divide;
cvxPartDivideInit(÷);
divide.numBase = 1;
divide.idBase= { &idShape };
divide.numCutter =1 ,
divide.idCutters={ &planen };
divide.keepCutter = 1;
int numShapes = 0;
int* idShapses = nullptr;
cvxPartDivide(÷, &numShapes, &idShapses);
![在这里插入图片描述](https://img-blog.csdnimg.cn/direct/00b6454f218146eaa14485f4809513ea.png#pic_center)