<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: 3d Solid Custom Entity in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/3d-solid-custom-entity/m-p/1493850#M24905</link>
    <description>To gain access to the brep, here is an example from the brep sample from the SDK (look in utils\brep). It uses a subent path type in the set() method. Perhaps you can try doing the same.&lt;BR /&gt;
&lt;BR /&gt;
AcDbFullSubentPath subPath(kNullSubent);&lt;BR /&gt;
		acadReturnValue = selectEntity(subType, subPath);&lt;BR /&gt;
		if (acadReturnValue != Acad::eOk) {&lt;BR /&gt;
			acutPrintf("\n Error in selectEntity: %d", acadReturnValue);&lt;BR /&gt;
			return (AcBr::ErrorStatus)acadReturnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
&lt;BR /&gt;
		// Call the appropriate subentity constructor&lt;BR /&gt;
		switch (subType) {&lt;BR /&gt;
		case AcDb::kNullSubentType:&lt;BR /&gt;
    		pEnt = new AcBrBrep();&lt;BR /&gt;
			break;&lt;BR /&gt;
		case AcDb::kFaceSubentType:&lt;BR /&gt;
    		pEnt = new AcBrFace();&lt;BR /&gt;
			break;&lt;BR /&gt;
		case AcDb::kEdgeSubentType:&lt;BR /&gt;
    		pEnt = new AcBrEdge();&lt;BR /&gt;
			break;  &lt;BR /&gt;
		default:&lt;BR /&gt;
			acutPrintf("\n selectEntityByType: unsupported subentity type: %d\n", subType);&lt;BR /&gt;
			returnValue = (AcBr::ErrorStatus)Acad::eWrongSubentityType;&lt;BR /&gt;
			return returnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
		if (pEnt == NULL) {&lt;BR /&gt;
			acutPrintf("\n selectEntityByType: unable to allocate memory\n");&lt;BR /&gt;
			returnValue = (AcBr::ErrorStatus)Acad::eOutOfMemory;&lt;BR /&gt;
			return returnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
&lt;BR /&gt;
		returnValue = pEnt-&amp;gt;set(subPath);</description>
    <pubDate>Thu, 24 Nov 2005 01:16:18 GMT</pubDate>
    <dc:creator>krishnamurthy.kalvai</dc:creator>
    <dc:date>2005-11-24T01:16:18Z</dc:date>
    <item>
      <title>3d Solid Custom Entity</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/3d-solid-custom-entity/m-p/1493849#M24904</link>
      <description>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().&lt;BR /&gt;
&lt;BR /&gt;
                     AcDb3dSolid* pPlate = new AcDb3dSolid();&lt;BR /&gt;
	pPlate-&amp;gt;createBox(m_Length, m_Width, m_Thickness);&lt;BR /&gt;
	pPlate-&amp;gt;transformBy(Ecs);&lt;BR /&gt;
	mode-&amp;gt;geometry().draw(pPlate);&lt;BR /&gt;
&lt;BR /&gt;
But I am not able to get BRep object of this Entity?&lt;BR /&gt;
Please see the code I used:&lt;BR /&gt;
                     AcDbEntity* pEnt = NULL;&lt;BR /&gt;
	Acad::ErrorStatus es = Acad::eOk;&lt;BR /&gt;
	es = acdbOpenObject((AcDbEntity* &amp;amp;)pEnt, PlateEntityId, AcDb::kForWrite);&lt;BR /&gt;
&lt;BR /&gt;
                     AcBr::ErrorStatus returnValue;&lt;BR /&gt;
	AcBrBrep* pBrep = new AcBrBrep();&lt;BR /&gt;
                     returnValue = pBrep-&amp;gt;set((const AcDbEntity&amp;amp;)*pEnt);&lt;BR /&gt;
&lt;BR /&gt;
after execution of the last statement&lt;BR /&gt;
                    returnValue = eNullObjectPointer&lt;BR /&gt;
&lt;BR /&gt;
I am not able find the problem. Please suggest to get it done.</description>
      <pubDate>Wed, 23 Nov 2005 06:29:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/3d-solid-custom-entity/m-p/1493849#M24904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2005-11-23T06:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: 3d Solid Custom Entity</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/3d-solid-custom-entity/m-p/1493850#M24905</link>
      <description>To gain access to the brep, here is an example from the brep sample from the SDK (look in utils\brep). It uses a subent path type in the set() method. Perhaps you can try doing the same.&lt;BR /&gt;
&lt;BR /&gt;
AcDbFullSubentPath subPath(kNullSubent);&lt;BR /&gt;
		acadReturnValue = selectEntity(subType, subPath);&lt;BR /&gt;
		if (acadReturnValue != Acad::eOk) {&lt;BR /&gt;
			acutPrintf("\n Error in selectEntity: %d", acadReturnValue);&lt;BR /&gt;
			return (AcBr::ErrorStatus)acadReturnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
&lt;BR /&gt;
		// Call the appropriate subentity constructor&lt;BR /&gt;
		switch (subType) {&lt;BR /&gt;
		case AcDb::kNullSubentType:&lt;BR /&gt;
    		pEnt = new AcBrBrep();&lt;BR /&gt;
			break;&lt;BR /&gt;
		case AcDb::kFaceSubentType:&lt;BR /&gt;
    		pEnt = new AcBrFace();&lt;BR /&gt;
			break;&lt;BR /&gt;
		case AcDb::kEdgeSubentType:&lt;BR /&gt;
    		pEnt = new AcBrEdge();&lt;BR /&gt;
			break;  &lt;BR /&gt;
		default:&lt;BR /&gt;
			acutPrintf("\n selectEntityByType: unsupported subentity type: %d\n", subType);&lt;BR /&gt;
			returnValue = (AcBr::ErrorStatus)Acad::eWrongSubentityType;&lt;BR /&gt;
			return returnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
		if (pEnt == NULL) {&lt;BR /&gt;
			acutPrintf("\n selectEntityByType: unable to allocate memory\n");&lt;BR /&gt;
			returnValue = (AcBr::ErrorStatus)Acad::eOutOfMemory;&lt;BR /&gt;
			return returnValue;&lt;BR /&gt;
		}&lt;BR /&gt;
&lt;BR /&gt;
		returnValue = pEnt-&amp;gt;set(subPath);</description>
      <pubDate>Thu, 24 Nov 2005 01:16:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/3d-solid-custom-entity/m-p/1493850#M24905</guid>
      <dc:creator>krishnamurthy.kalvai</dc:creator>
      <dc:date>2005-11-24T01:16:18Z</dc:date>
    </item>
  </channel>
</rss>

