Hi everybody,
I have a problem with AecWallCustomGeometry. I want to add a AcDb3dSolid to
a wall, by using addCustomGeometryComponent. For that I need an AecWallCustomGeometryBody.
How can I get the Body from an AcDb3dSolid object to store it in an AecWallCustomGeometryBody?
Thanks in advance
HI
you can use an instance of AecModelerBody to retrieve the body auf a solid.
AecModelerBody Body(pSolid); Body* pBody = Body.getAModelerBody();
Thanks,
your solution worked. I get a pointer to the Body object.
But when I add it as a geometry component to my wall the wall is not replaced by the solid, which is the objective.
Everything compiles fine and the ErrorStatus is always eOk. Do I need to update the wall representation or something like that?
Here is my code snippet:
AecWallCustomGeometryBody* pCustomGeom = new AecWallCustomGeometryBody;
pCustomGeom->setComponentId(0);
pCustomGeom->setOperationType(AecWallCustomGeometry::kReplace);
AecModelerBody solidBody(pSolid);
Body* pBody = solidBody.getAModelerBody();
pCustomGeom->setBody(*pBody);
pWall->addCustomGeometryComponent(pCustomGeom);
pSpace->appendAcDbEntity(pWall);