Message 1 of 2
3d Solid Custom Entity
Not applicable
11-22-2005
10:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I derived a class from "AcDb3dSolid" to create a 3D Plate. It is working fine to create the plate. I used following code to create the Plate in worldDraw().
AcDb3dSolid* pPlate = new AcDb3dSolid();
pPlate->createBox(m_Length, m_Width, m_Thickness);
pPlate->transformBy(Ecs);
mode->geometry().draw(pPlate);
But I am not able to get BRep object of this Entity?
Please see the code I used:
AcDbEntity* pEnt = NULL;
Acad::ErrorStatus es = Acad::eOk;
es = acdbOpenObject((AcDbEntity* &)pEnt, PlateEntityId, AcDb::kForWrite);
AcBr::ErrorStatus returnValue;
AcBrBrep* pBrep = new AcBrBrep();
returnValue = pBrep->set((const AcDbEntity&)*pEnt);
after execution of the last statement
returnValue = eNullObjectPointer
I am not able find the problem. Please suggest to get it done.
AcDb3dSolid* pPlate = new AcDb3dSolid();
pPlate->createBox(m_Length, m_Width, m_Thickness);
pPlate->transformBy(Ecs);
mode->geometry().draw(pPlate);
But I am not able to get BRep object of this Entity?
Please see the code I used:
AcDbEntity* pEnt = NULL;
Acad::ErrorStatus es = Acad::eOk;
es = acdbOpenObject((AcDbEntity* &)pEnt, PlateEntityId, AcDb::kForWrite);
AcBr::ErrorStatus returnValue;
AcBrBrep* pBrep = new AcBrBrep();
returnValue = pBrep->set((const AcDbEntity&)*pEnt);
after execution of the last statement
returnValue = eNullObjectPointer
I am not able find the problem. Please suggest to get it done.