NX Journal - Test for B-spline surface Closed or Not?
NX Journal - Test for B-spline surface Closed or Not?
(OP)
How do I determine from the askbsurf (or other information) if a B-surface/parametric surface is closed (ie. like a tube)?
Thanks,
Jeff
Thanks,
Jeff





RE: NX Journal - Test for B-spline surface Closed or Not?
CODE
Imports System
Imports NXOpen
Imports NXOpen.UI
Imports NXOpen.UF
Module Module1
Sub Main()
Dim theSession As Session = Session.GetSession()
Dim lw As ListingWindow = theSession.ListingWindow
Dim body As Body = Nothing
lw.Open()
While select_a_sheet_body(body) = Selection.Response.Ok
lw.WriteLine("Number of edges: " & body.GetEdges.Length)
End While
End Sub
Function select_a_sheet_body(ByRef obj As Body)
Dim ui As UI = GetUI()
Dim mask(0) As Selection.MaskTriple
With mask(0)
.Type = UFConstants.UF_solid_type
.Subtype = UFConstants.UF_solid_body_subtype
.SolidBodySubtype = UFConstants.UF_UI_SEL_FEATURE_SHEET_BODY
End With
Dim cursor As Point3d = Nothing
Dim resp As Selection.Response = _
ui.SelectionManager.SelectObject("Select a sheet body", "Select a sheet body", _
Selection.SelectionScope.AnyInAssembly, _
Selection.SelectionAction.ClearAndEnableSpecific, _
False, False, mask, obj, cursor)
If resp = Selection.Response.ObjectSelected Or _
resp = Selection.Response.ObjectSelectedByName Then
Return Selection.Response.Ok
Else
Return Selection.Response.Cancel
End If
End Function
Public Function GetUnloadOption(ByVal dummy As String) As Integer
'Unloads the image when the NX session terminates
GetUnloadOption = NXOpen.Session.LibraryUnloadOption.AtTermination
End Function
End Module
www.nxjournaling.com
RE: NX Journal - Test for B-spline surface Closed or Not?
I'm thinking more in terms of the poles & knots of a b-surface, but I can't remember how to use that to define if it is closed or not.
Jeff
RE: NX Journal - Test for B-spline surface Closed or Not?
NXOpen.UF -> UFModl -> AskFaceTopology Method
I have not tried it out, but it looks like it may help get the info you are looking for. Not the total solution, but maybe a piece of the puzzle.
www.nxjournaling.com
RE: NX Journal - Test for B-spline surface Closed or Not?
John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Industry Sector
Cypress, CA
http://www.siemens.com/plm
UG/NX Museum: http://www.plmworld.org/p/cm/ld/fid=209
To an Engineer, the glass is twice as big as it needs to be.
RE: NX Journal - Test for B-spline surface Closed or Not?
Thanks,
Jeff
RE: NX Journal - Test for B-spline surface Closed or Not?
So if you get the surface properties and determine the end knots you have another method for determining open or closed status.
Frank Swinkels