bodies not recognized as surfacebody

bodies not recognized as surfacebody

Michele_DeLucaSW7PJ
Contributor Contributor
455 Views
7 Replies
Message 1 of 8

bodies not recognized as surfacebody

Michele_DeLucaSW7PJ
Contributor
Contributor

Hi everyone

i'm trying to do some work on these bodies in this attached part but ilogic does not see them

..

ComponentDefinition.SurfaceBodies.Count 

has 0 as result ..how is it possible?

0 Likes
Accepted solutions (1)
456 Views
7 Replies
Replies (7)
Message 2 of 8

WCrihfield
Mentor
Mentor

That's interesting, and very odd.  It is showing two bodies in the model browser tree, under the Solid Bodies folder, but is oddly not showing any 'proper'/native features below the Origin folder.  Just a couple icons that look like the body icons, with names like "None" & "None_1", for some reason.  And I too get zero bodies from the following code within that part:

Dim oPDoc As PartDocument = ThisDoc.Document
MsgBox("Bodies Count = " & oPDoc.ComponentDefinition.SurfaceBodies.Count.ToString,,"")

How was this part created?  Is it imported from some other file type?  Did it get some other part(s) derived into it, but the 'Link' was broken to its/their source?  Please explain.  

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 3 of 8

Michele_DeLucaSW7PJ
Contributor
Contributor

Hi yes i think some kind of weird import.. 

i notice that is recognized as feature..

ComponentDefinition.Features.Count

 the result of this is 2

 

the problem is that i need to get the maximum length dimension thru OrientedMinimumRangeBox but this works only for solid bodies..

0 Likes
Message 4 of 8

WCrihfield
Mentor
Mentor
Accepted solution

You can use the same Function from the ComponentDefinition object.

Dim oPDoc As PartDocument = ThisDoc.Document
Dim oOBox As OrientedBox = oPDoc.ComponentDefinition.OrientedMinimumRangeBox

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

0 Likes
Message 5 of 8

Michele_DeLucaSW7PJ
Contributor
Contributor

yes that will work

thank you!

0 Likes
Message 6 of 8

Stakin
Collaborator
Collaborator

the basic reason is the component need to repair the surfacebody or surface. I guess
an error occurred during the  translating. 

0 Likes
Message 7 of 8

Michele_DeLucaSW7PJ
Contributor
Contributor
yes in fact I imported again and they are recognized as bodies..
0 Likes
Message 8 of 8

Stakin
Collaborator
Collaborator
Congratulation,It is solved!
0 Likes