我还想从内部块中删除hatch。请帮帮忙。先谢了。
Adesk::Boolean KMTPARCEL::worldDraw (AcGiWorldDraw *mode) {
//........................
AcDbPolyline* pLine = AcDbPolyline::cast(m_pCurve);
if (pLine) {
AcGePoint2dArray vertices;
AcGeDoubleArray bulges;
int nVerts = pLine->numVerts();
AcGePoint2d pnt;
double bulge;
for (int i=0;igetPointAt(i,pnt);
pLine->getBulgeAt(i,bulge);
vertices.append(pnt);
bulges.append(bulge);
}
pLine->getPointAt(0,pnt);
pLine->getBulgeAt(0,bulge);
vertices.append(pnt);
bulges.append(bulge);
AcDbHatch* hatch = new AcDbHatch;
hatch->setNormal(m_normal);
hatch->setPatternScale(m_DimScale);
hatch->setPatternAngle(45);
hatch->setPattern(AcDbHatch::kPreDefined, _T("NET"));
hatch->appendLoop(AcDbHatch::kDefault|AcDbHatch::kExternal, vertices,bulges);
hatch->evaluateHatch();
hatch->worldDraw(mode);
delete hatch;
}
//........................
}
Daniel编辑:添加了代码标记 谢谢乐。
页:
1
[2]