Home
Reply
Contributor
littlecircle
Posts: 9

How can i select a single face or edge?

i am now using ACIS and HOOPS as my developing tools.After building a model with ACIS,the model is rendered by HOOPS.Now the problem is,after a model such as a cuboid is rendered and displayed,how can i select a single face or edge instead of the whole object by mouse clicking and change its rendering attributes and match it with FACE or EDGE entity in ACIS.Thanks for help!

  

     cynthia

New Visitor
steve0
Posts: 3

Re: How can i select a single face or edge?

Sorry  ,dont know  it  very  much ..

Contributor
littlecircle
Posts: 9

Re: How can i select a single face or edge?

it's very nice of you to answer
Contributor
wangpai7776
Posts: 9

Re: How can i select a single face or edge?

First, you should overload HOpSelectAperture class to select a face or an edge. Then make sure that you used HC_Set_Selectability("everything = off, faces =on") before selected a face or an edge.

Finally,use  "HBaseView::SetOperator()" function to select a face or an edge.

Contributor
littlecircle
Posts: 9

Re: How can i select a single face or edge?

Thank you very much for your reply.But the problem is how do i overload HOpSelectAperture.

Could you please explain in detail?Thanks again.

Contributor
wangpai7776
Posts: 9

Re: How can i select a single face or edge?

1.First,derived your own class HOpSelectAperture from HOpSelectAperture  
class HOpMySelectAperture : public HOpSelectAperture  

2.Then, added the following codes to the responded function.
HC_Open_Segment_By_Key(m_pHSolidView->GetModelKey());
        HC_Set_Selectability("everything = off, faces =on");
        HC_Set_Visibility("vertices =off,markers=off");
HC_Close_Segment();

HOpMySelectAperture* pOperator = new HOpMySelectAperture(m_pHSolidView,0,1);
m_pHSolidView->SetOperator(pOperator);
////////////////////////////////////////////////////////////////////////////////////////////////////////
HSolidView* m_pHSolidView;
class HSolidView : public HBaseView