Пример #1
0
Acad::ErrorStatus PDSphere::subExplode(AcDbVoidPtrArray& entitySet) const
#else
Acad::ErrorStatus PDSphere::explode(AcDbVoidPtrArray& entitySet) const
#endif
{
	assertReadEnabled();

	AcDb3dSolid *pBody;
	pBody = new AcDb3dSolid;
	if(pBody->createSphere(m_dRadius) != Acad::eOk)
	{
		delete pBody;
		return Acad::eNotApplicable;
	}

	AcGeMatrix3d mat;
	mat.setTranslation(m_ptCenter.asVector());

	pBody->transformBy(mat);

	pBody->setPropertiesFrom(this);
	entitySet.append(pBody);

	return Acad::eOk;
}
Пример #2
0
//  [9/5/2007 suzhiyong]
Acad::ErrorStatus PDSphere::explodeTo3DSolid(AcDb3dSolid* &p3dSolid) const
{
	assertReadEnabled();

	AcDb3dSolid *pBody;
	pBody = new AcDb3dSolid;
	if(pBody->createSphere(m_dRadius) != Acad::eOk)
	{
		delete pBody;
		return Acad::eNotApplicable;
	}

	AcGeMatrix3d mat;
	mat.setTranslation(m_ptCenter.asVector());

	pBody->transformBy(mat);

	pBody->setPropertiesFrom(this);
	p3dSolid = pBody;

	return Acad::eOk;
}