![]() |
【转帖】smooth Oddbpolygonmesh 9polymeshtype0
smooth oddbpolygonmesh (polymeshtype)
smooth oddbpolygonmesh (polymeshtype) is it possible to create a polygon mesh of type different then ksimplemesh using dwgdirect? in the code below i attempted to create a smooth mesh, something like a cylinder. but got a box result in. code: oddbblocktablerecordptr pps = pdb->getmodelspaceid().safeopenobject(oddb::kforwrite); oddbpolygonmeshptr ppgmesh = oddbpolygonmesh::createobject(); pps->appendoddbentity(ppgmesh); msize = 4; nsize = 2; ppgmesh->setmsize(msize); ppgmesh->setnsize(nsize); appendpgmeshvertex(ppgmesh, -2, -2, -8); appendpgmeshvertex(ppgmesh, -2, -2, 8); appendpgmeshvertex(ppgmesh, -2, 2, -8); appendpgmeshvertex(ppgmesh, -2, 2, 8); appendpgmeshvertex(ppgmesh, 2, 2, -8); appendpgmeshvertex(ppgmesh, 2, 2, 8); appendpgmeshvertex(ppgmesh, 2, -2, -8); appendpgmeshvertex(ppgmesh, 2, -2, 8); ppgmesh->makemclosed(); ppgmesh->setpolymeshtype(oddb::kcubicsurfacemesh); how do i create a cylinder a right way? hi, currently dd does not calculates fit vertices (oddbpolygonmesh::converttopolymeshtype() is not implemented). so you have to append both control and fit vertices instead of simple ones. don't forget to set proper surface density (setnsurfacedensity() and setmsurfacedensity()). btw: i failed to create smooth quadratic mesh in autocad using points from your sample code as control ("too few vertices"). |
| 所有的时间均为北京时间。 现在的时间是 12:58 PM. |