Cancel
Showing results for 
Search instead for 
Did you mean: 

Isoparametric curve for array of faces

Pioneer
Pioneer

Hello,

who knows is it possible to create isoparametric curve for array of faces, which UI selected?

I,ve tried to implement that, but program stops when only one isoparametric curve is created for first (as I think) face:

Error and code in attach note.

2 REPLIES 2
Highlighted

Re: Isoparametric curve for array of faces

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

In the code, the isoparametric curves builder object is created then the faces are processed in a for loop. Inside the for loop, the builder is committed and destroyed. The second time through the loop, there is no builder object to work with and an error is raised.

 

I'm guessing that either the code will need to create the builder, iterate the faces, then commit and destroy the builder OR create a builder, apply it and destroy it for each face. I suggest recording a journal while creating isoparametric curves for multiple faces to see what the required code looks like.

Re: Isoparametric curve for array of faces

Pioneer
Pioneer
Yes, you are **bleep** right (as usual), I put curve creation in each face in the list, as below. But still don,t know why it,s not possible in for loop, actually it,s also iterate every face item in array. Anyway thanks a lot!
Dim theSession As Session = Session.GetSession()
Dim ufsession As UFSession = UFSession.GetUFSession()
Dim workPart As Part = theSession.Parts.Work
Dim point1 As Point3d = Nothing
Dim nXObject1 As NXOpen.NXObject = Nothing
Dim ListofFace As New List (Of Face)
For i As Integer=0 To TaggedFaces.Length-1
ListofFace.Add(TaggedFaces(i))
Next
For Each face As Face In ListofFace
Dim nullNXOpen_Features_IsoparametricCurves As IsoparametricCurves = Nothing
Dim isoparametricCurvesBuilder1 As NXOpen.Features.IsoparametricCurvesBuilder = Nothing
isoparametricCurvesBuilder1 = _
workPart.Features.CreateIsoparametricCurvesBuilder(nullNXOpen_Features_IsoparametricCurves)
isoparametricCurvesBuilder1.Direction = NXOpen.Features.IsoparametricCurvesBuilder.DirectionTypes.IsoV
isoparametricCurvesBuilder1.UpdateIsoparametricCurves()
isoparametricCurvesBuilder1.SelectObject.SetValue(face, workPart.ModelingViews.WorkView, point1)
isoparametricCurvesBuilder1.UpdateIsoparametricCurves()
isoparametricCurvesBuilder1.Number = 3
isoparametricCurvesBuilder1.UpdateIsoparametricCurves()
nXObject1 = isoparametricCurvesBuilder1.Commit()
isoparametricCurvesBuilder1.Destroy()
Next