NX - Total Length of Sheet Boundaries
NX - Total Length of Sheet Boundaries
(OP)
Hi,
I can use the analysis function "Examine Geometry" to report the number of "Sheet Boundaries" I have on a sheet body. What I would also like to get is the total length of these sheet boundaries. Any method I have tried includes tangent edges between faces (for example the tangent edge between a fillet and the adjacent surface), but I only want the edges that don't border another edge (exactly what the "Sheet Boundaries" shows).
Is there a way I can get these lengths?
Thanks,
Jeff
I can use the analysis function "Examine Geometry" to report the number of "Sheet Boundaries" I have on a sheet body. What I would also like to get is the total length of these sheet boundaries. Any method I have tried includes tangent edges between faces (for example the tangent edge between a fillet and the adjacent surface), but I only want the edges that don't border another edge (exactly what the "Sheet Boundaries" shows).
Is there a way I can get these lengths?
Thanks,
Jeff





RE: NX - Total Length of Sheet Boundaries
CODE --> VB
Option Strict Off Imports System Imports NXOpen Imports NXOpen.UF Imports NXOpen.UI Module get_length_of_sheet_boundary_edges Dim theSession As Session = Session.GetSession() Dim ufs As UFSession = UFSession.GetUFSession() Dim lw As ListingWindow = theSession.ListingWindow Sub Main() Dim dp As Part = theSession.Parts.Display Dim theBody As Body = select_a_body("Sheet Body to process:") If theBody Is Nothing Then Return End If Dim theEdges() As Edge = theBody.GetEdges() Dim newCurveCounter As Integer = 0 Dim boundaryLengths As Double = 0 For Each thisEdge As Edge In theEdges Dim theFaces() As Face = thisEdge.GetFaces() If theFaces.GetLength(0) < 2 Then boundaryLengths += thisEdge.GetLength() newCurveCounter += 1 End If Next lw.open() lw.WriteLine("Found " & newCurveCounter & " sheet boundary edges") lw.WriteLine("Total length of sheet boundary edges is " & boundaryLengths) End Sub Function select_a_body(ByVal prompt As String) As Body Dim mask() As Selection.MaskTriple = {New Selection.MaskTriple( _ UFConstants.UF_solid_type, 0, UFConstants.UF_UI_SEL_FEATURE_SHEET_BODY)} Dim cursor As Point3d = Nothing Dim obj As TaggedObject = Nothing Dim resp As Selection.Response = _ UI.GetUI().SelectionManager.SelectTaggedObject("Select a body", prompt, _ Selection.SelectionScope.AnyInAssembly, _ Selection.SelectionAction.ClearAndEnableSpecific, _ False, False, mask, obj, cursor) Return obj End Function Sub Echo(ByVal output As String) theSession.ListingWindow.Open() theSession.ListingWindow.WriteLine(output) theSession.LogFile.WriteLine(output) End Sub Public Function GetUnloadOption(ByVal dummy As String) As Integer Return Session.LibraryUnloadOption.Immediately End Function End ModuleSuresh
www.technisites.com.au
RE: NX - Total Length of Sheet Boundaries
RE: NX - Total Length of Sheet Boundaries
I thought there was something for sheet edges, but for some reason when I looked for it I only saw face edges and sheet bodies as selection rules. But I see now that I missed the sheet edge selection rule.
Suresh,
Your journal does provide the total length I am looking for, but it doesn't report the correct number of sheet boundaries. It seems to provide the total number of edges, but a single sheet boundary (as reported by examine geometry) could contain more than one edge.
Jeff