ObjectARX

ObjectARX

Reply
Valued Contributor
loic.jourdan
Posts: 53
Registered: ‎01-24-2006
Message 1 of 3 (326 Views)
Accepted Solution

Hlr api protocol extension (AsdkHiddenLineBase)

326 Views, 2 Replies
09-26-2012 03:33 AM

Hi All,

I'm using AsdkHlrApi since a while to compute hidden lines on autocad entities and custom entities. For custom entities, I manuall extract embedded native entities before sending them to hlr engine, I've found this morning that a protocol extension class is provided along with the hlr api: AsdkHiddenLineBase. It seems this class purpose is to allow custom entities that embedds acis bodies participate to hlr api but I would need clues on how to implement this protocol extension.

 

Any help would be appreciated.

 

Thank you

----
20-20 CAD / 20-20 Technologies

This is the documentation and sample I wrote on that Class back in 2001 when I originally wrote HLR

 

class AsdkHiddenLineBase

This class should be used by third party developer, who want to provide support of the HLR engine for their custom entity if the default implementation provided by HLR is not accurate. This is an abstract class, and you must derived from it.

Overridables : prepare, getBody

  • virtual Acad::ErrorStatus prepare (AcDbEntity *pEnt, AcDbVoidPtrArray &bodies, int control, const AcDbViewport *pVp)
    Parameters
      pEnt: Pointer to an entity which will be used to generate a body entity to be processed by the HLR engine.
      bodies: An array of body pointer to be processed.
      control: HLR controls in process.
      pVp: The viewport information in use.
    Return Value
      Return 'Acad::eOk' if you are successful.

    Note
    When overriding that method, you should create memory only entity and forward the call to the PEX class of that newly created entity. See sample for more information on the usage.

  • virtual Acad::ErrorStatus getBody (void *pBodyData, int control)
    Parameters
      pBodyData: HLR constructed private data.
      control: HLR controls in process.
    Return Value
      Returns 'Acad::eOk' if you are successful.

    Note
    Usually not overridden, if you do not want the object being processed just return 'Acad::eInvalidInput'. See sample for more information on the usage.

Note that the sample project files might need to be remade as I haven;t touch them for a long time, but the code should be ok still.

 

cheers

cyrille

ADN Support Specialist
cyrille
Posts: 33
Registered: ‎10-05-2012
Message 2 of 3 (296 Views)

Re: Hlr api protocol extension (AsdkHiddenLineBase)

10-05-2012 09:01 AM in reply to: loic.jourdan

This is the documentation and sample I wrote on that Class back in 2001 when I originally wrote HLR

 

class AsdkHiddenLineBase

This class should be used by third party developer, who want to provide support of the HLR engine for their custom entity if the default implementation provided by HLR is not accurate. This is an abstract class, and you must derived from it.

Overridables : prepare, getBody

  • virtual Acad::ErrorStatus prepare (AcDbEntity *pEnt, AcDbVoidPtrArray &bodies, int control, const AcDbViewport *pVp)
    Parameters
      pEnt: Pointer to an entity which will be used to generate a body entity to be processed by the HLR engine.
      bodies: An array of body pointer to be processed.
      control: HLR controls in process.
      pVp: The viewport information in use.
    Return Value
      Return 'Acad::eOk' if you are successful.

    Note
    When overriding that method, you should create memory only entity and forward the call to the PEX class of that newly created entity. See sample for more information on the usage.

  • virtual Acad::ErrorStatus getBody (void *pBodyData, int control)
    Parameters
      pBodyData: HLR constructed private data.
      control: HLR controls in process.
    Return Value
      Returns 'Acad::eOk' if you are successful.

    Note
    Usually not overridden, if you do not want the object being processed just return 'Acad::eInvalidInput'. See sample for more information on the usage.

Note that the sample project files might need to be remade as I haven;t touch them for a long time, but the code should be ok still.

 

cheers

cyrille

Valued Contributor
loic.jourdan
Posts: 53
Registered: ‎01-24-2006
Message 3 of 3 (278 Views)

Re: Hlr api protocol extension (AsdkHiddenLineBase)

10-11-2012 04:42 AM in reply to: cyrille

Thank you Cyrille for this very complete answer, I really appreciate you took some time to search in your old code!

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

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!