Currently using the below Java code I am getting many more edges compared to searching for edges in the GUI (ctrl+f, look for:edge)
Where are all the extra edges coming from?
Session currSession= pfcSession.GetCurrentSessionWithCompatibility (CreoCompatibility.C4Compatible); Model currModel = currSession.GetCurrentModel(); Solid currSolid = (Solid)currModel; ModelItems edgeItems = currSolid.ListItems(ModelItemType.ITEM_EDGE); int edgeItemsNum = edgeItems.getarraysize();
Solved! Go to Solution.
Are you listing items in asm or prt ? .. you can insert selected items to buffer to see in gui what edges are selected. If nothing help you can use macro to select edges through ctrl+f and then fire another macro (your command) to do the job.
Yes, I am using only Java Free
The workaround I currently have is to test each edge to check for two connected surfaces, though this seems to make my code run quite slow given the number of edges to check
While this works to an extend, there is still some differences, for example for one of my models:
(1) ctrl+f = 9069 edges
(2) above code = 31,587 edges
(3) above code + test for connected surfaces = 9011
I am hoping to find a more efficient way to do this