Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Method to find identical elements?

Status
Not open for further replies.

OMarkusO

Automotive
Apr 19, 2010
5
SE
Hi.
Any one aware of a method or script to find identical elements in a part?

I have a large model with thousands of elements in.
I'm about optimize it and replace and erase elements that are identical (not by name).

/M
 
Replies continue below

Recommended for you

Hi,

What is the parameter you are setting for identical ? Please be specific.
 
For example two surfaces offset the same distance from same reference.
Or a curve projected several times on a plane.
Mathematical identical I guess.

/M
 
I suggest you do a "Delete Useless Elements" first to remove anything that's not needed. Any identical geometry that is left will have children and will need to be Replaced before deleting.
 

Yes, unused element are no problem.
But how to find these identical/duplicates elements that are used?
Say you have about 3000 elements in a model and 200 of them are duplicates.
 
It seems like this would be a lot of work to write. I think you would need to do something like:
(Talking GSD only)
-collect all geosets in part
-collect all hybridshapes in all geosets
-get the first hybridshapes' inputs ***
-get the first hybridshapes' typename
-loop through the rest of the hybrid shapes in the part
-if the typename of subsequent hybridshapes matches the first, check to see if the inputs are the same
-repeat for all hybridshapes in part

But as Ferdo mentions, this may not be enough. You would need a way to detect geometric differences like what if one join removes sub elements and another join of the same inputs does not? Or if surfaces are split to save one side then the same surfaces are split to save the other side? You would also need to compare each features parameters, like if propagation was turned on or off.

***you would need to interrogate inputs for each feature, but each features inputs are exposed with different functions. I.e. For a join (hybridshapeassemble) you can get the number of elements joined by using the GetElementsSise function, then loop through the inputs using the GetElements function. An extracts inputs could be exposed using element or support.
 
Thanks for ideas about a solution, but I think I will let this one go.
As I assumed there is not an easy way of doing this.

BR

M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Top