admin 发表于 2024-3-14 20:37:43

[每日一码] 一个创建面域的小程序

static void ahlzlARX采用test(void)
{
    AcDbDatabase* pdb = acdbHostApplicationServices()->workingDatabase();

    AcDbBlockTable* pBlockTable;
    pdb->getBlockTable(pBlockTable, AcDb::kForRead);

    AcDbBlockTableRecord* pBlockTableRecord;
    pBlockTable->getAt(ACDB采用MODEL采用SPACE, pBlockTableRecord, AcDb::kForWrite);

    AcDbCircle* pEnt = new AcDbCircle(AcGePoint3d(1, 2, 0),AcGeVector3d::kZAxis,6);
    AcDbVoidPtrArray curveSegments, regions;
    curveSegments.append (pEnt);
    AcDbRegion::createFromCurves(curveSegments, regions);

    AcDbRegion *pRegion = static采用cast<AcDbRegion *>(regions.at(0));
    pRegion->setDatabaseDefaults();

    pBlockTableRecord->appendAcDbEntity(pRegion);

    pBlockTable->close();
    pBlockTableRecord->close();
    pRegion->close();
}
页: [1]
查看完整版本: [每日一码] 一个创建面域的小程序