Hello all,
I am trying to read a single extended element(type 106) using IElementGraphicsProcessor ::process().
ProcessParasolid() callback is getting called 15 times.
In this callback function, I am using mdlKISolid_bodyToElements() to get the microstation elements.
So I am getting 15 cones as the microstation elements from this single extended element.
I am getting all the coincident cones while reading, which is not correct.
So my question is, "should I apply any translation for these cones ?" to get the correct cones.
Thanks in advance,
Pasu
Did you look at the _AnnounceTransform callback? to see if you were also getting informed about the transform change?
Rgds,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Mark,
As you said, _AnnounceTransform is giving me the transformation matrix.
And I applied it using the following function:
int iStatus = mdlKISolid_applyTransform( (KIENTITY*)pBody , &m_currentTransform );
Then I am converting the parasolid body to microstation elements as follows:
StatusInt SI = mdlKISolid_bodyToElements
(
&pElemDescr ,
(KIBODY*)(pBody) ,
FALSE ,
-1 ,
NULL ,
g_pDgnModelRef
);
The problem which I asked in my previous mail has been resolved but for some other file the transformation is not happening properly.
NOTE:The function mdlKISolid_applyTransform() is returning a negative value (-9094).
Am I wrong some where?
Please let me know your comments.
Don't apply the transform to the body, that can scale and/or translate it outside the solids working area making it invalid. Create the element from the body and apply the transform to the element descriptor. HTH
-B
Thanks Brien.