ObjectARX

Reply
Active Member
zhoutao1130
Posts: 6
Registered: ‎09-03-2012
Message 1 of 6 (263 Views)

worldDraw() problem

263 Views, 5 Replies
09-28-2012 11:49 AM

I have a problem with worldDraw(), we can use

AcGiWorldDraw * mode ,

define a solid ,mode->worldDraw(solid) before

 but now can not use; the problem is AcGiDrawable no member worldDraw();

i want to find a new function to replace it .anyone kowns

thanks very much  

 

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 2 of 6 (260 Views)

Re: worldDraw() problem

09-28-2012 12:14 PM in reply to: zhoutao1130

Please post some code that demonstrates the problem. Describe what you think it should do, and what it actually does, to clarify what is not working.

--
Owen Wengerd
ManuSoft
Active Member
zhoutao1130
Posts: 6
Registered: ‎09-03-2012
Message 3 of 6 (241 Views)

Re: worldDraw() problem

09-29-2012 01:32 AM in reply to: owenwengerd

Thank you can reply.

AcDb3dPolyline *p3dPoly=new AcDb3dPolyline(AcDb::k3dSimplePoly,points, Adesk::kTrue );
 AcDbRegion *pRegion;
    AcDbVoidPtrArray regions;
    AcDbVoidPtrArray voidPtrArr;
    voidPtrArr.append(p3dPoly);
    Acad::ErrorStatus es = AcDbRegion::createFromCurves(voidPtrArr, regions);
    pRegion = AcDbRegion::cast((AcRxObject*)regions[0]);
 
 AcDbRevolveOptions revolveOptions;
 AcDb3dSolid *pSolid  = new AcDb3dSolid();
 pSolid->createRevolvedSolid( pRegion,startPt1, -vector1, 12*asin(0.5), 0,  revolveOptions);

 pSolid->worldDraw(mode);

 delete pSolid;

 

when compilethe problem occurs at worldDraw(mode),  AcGIdrawable has no member worldDraw(), but in another computer .it can compile and run .i want to know why, and whether there is a  new methed to replace it .

 

thanks

Active Member
zhoutao1130
Posts: 6
Registered: ‎09-03-2012
Message 4 of 6 (236 Views)

Re: worldDraw() problem

09-29-2012 02:36 AM in reply to: owenwengerd

i find the problem where it is;

is pSolid->worldDraw(mode);

very thanks .

 

Distinguished Mentor
owenwengerd
Posts: 686
Registered: ‎08-06-2002
Message 5 of 6 (231 Views)

Re: worldDraw() problem

09-29-2012 03:49 AM in reply to: zhoutao1130

I don't understand; did you solve the problem? If so, please describe the solution in case someone else has the same problem.

--
Owen Wengerd
ManuSoft
Valued Contributor
loic.jourdan
Posts: 53
Registered: ‎01-24-2006
Message 6 of 6 (212 Views)

Re: worldDraw() problem

10-01-2012 01:39 AM in reply to: zhoutao1130

I think what you want to do is:

mode->geometry().draw(pSolid);

this initializes the gi system correctly by calling AcDbEntity::setAttributes(..) then AcDbEntity::worldDraw(..) and finally (if required by worldDraw result) AcDbEntity::viewportDraw().

 

calling directly pSolid->worldDraw(mode) may result in unexpected behavior (for instance, it may mess up the graphic system cache)

 

regards

 

 

----
20-20 CAD / 20-20 Technologies
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.