[ARX]填充交流(RMB)
<P>本人想做一个CAD填充的程序,比较复杂,</P><P>希望可以对不同的图层\线型填充不同的STYLE,想做成自动遍历多个DWG的</P>
<P>希望朋友指点,希望有兴趣的朋友来讨论下,或留qq</P>
<P>如有需要,本人以RMB酬谢(想做个复杂点的)</P>
<P><FONT face=宋体 size=2>这是个屏选的,随便写的</FONT></P>
<P><FONT face=宋体 size=2>void Myfa()<BR>{<BR>ads_name ents,ent;<BR>AcDbObjectId objId;<BR>AcDbEntity* pEnt=NULL;<BR>AcDbObjectIdArray dbObjIds;<BR>acedSSGet(NULL,NULL,NULL,NULL,ents);<BR>long len;<BR>acedSSLength(ents,&len);<BR><BR>AcDbHatch* pHatch = new AcDbHatch();<BR>for(long i=0;i<len;i++){ <LEN;I++){<BR />acedSSName(ents,i,ent);<BR>acdbGetObjectId(objId, ent);<BR>dbObjIds.append(objId);<BR>}<BR>acedSSFree(ent);<BR>acedSSFree(ents);<BR><BR>AcGeVector3d normal(0.0, 0.0, 1.0);<BR>pHatch->setNormal(normal);<BR>pHatch->setElevation(0.0);<BR>pHatch->setColorIndex(3);<BR>pHatch->setPatternScale(2);<BR>pHatch->setPatternAngle(0.0);<BR>pHatch->setPattern(AcDbHatch::kPreDefined, "ANSI31");<BR>pHatch->setHatchStyle(AcDbHatch::kNormal);<BR>pHatch->appendLoop(AcDbHatch::kExternal, dbObjIds);<BR>pHatch->draw(); //更新实体<BR>pHatch->recordGraphicsModified(Adesk::kTrue);<BR>// Set Associativity<BR>//<BR>pHatch->setAssociative(Adesk::kFalse);<BR>pHatch->evaluateHatch();<BR>acedUpdateDisplay();<BR><BR><BR>AcDbBlockTable *pBlockTable=NULL;<BR>AcDbBlockTableRecord *pBlockTableRecord;<BR>acdbHostApplicationServices()->workingDatabase()<BR>->getSymbolTable(pBlockTable, AcDb::kForRead);<BR><BR>pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord,<BR>AcDb::kForWrite);<BR>pBlockTable->close();<BR><BR>AcDbObjectId HatchId;<BR>pBlockTableRecord->appendAcDbEntity(HatchId, pHatch);<BR>pBlockTableRecord->close();<BR>pHatch->close();<BR>} <BR><BR>在选择多个实体填充的时候还有问题,百思不得其解:(</FONT> </P> <P>如果是以polyline做边界,应该怎么填充阿?</P>
<P>楼主知道吗?</P>
页:
[1]