×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Associative vs Non-Associative in journal

Associative vs Non-Associative in journal

Associative vs Non-Associative in journal

(OP)
The sub I am posting works, it is creating an intersection line, except for the fact that the intersection line is not associative. I set associative to true and have gone over the code over and over to the point where I think I may be missing the obvious.

any help would be greatly appreciated.

CODE --> vb

Sub PlaceIntersection( ByRef checkFace() As Face, ByRef dPStation As DatumPlane, _
      ByRef InterLine As Features.IntersectionCurve )

      Dim intersectionCurveBuilder1  As Features.IntersectionCurveBuilder
      Dim plane2                     As Plane
      Dim objects2(-1)               As TaggedObject
      Dim added2                     As Boolean
      Dim faceDumbRule1              As FaceDumbRule
      Dim rules1(0)                  As SelectionIntentRule
      Dim geom2(0)                   As NXObject
      Dim datumPlane1                As DatumPlane
      Dim origin2                    As Point3d
      Dim normal2                    As Vector3d
      Dim faces1(-1)                 As Face
      Dim intersectionCurve1         As Features.IntersectionCurve
      Dim feature1                   As Features.Feature

      '------------------------------------------------------------------------------------------
      '   Place an intersection line on surface associated with the datum plane
      '      Modified journal to accept passed variables
      '------------------------------------------------------------------------------------------

      Dim nullFeatures_Feature As Features.Feature = Nothing

      intersectionCurveBuilder1 = workPart.Features.CreateIntersectionCurveBuilder( nullFeatures_Feature )

      origin2 = New Point3d( 0.0, 0.0, 0.0 )
      normal2 = New Vector3d( 0.0, 0.0, 1.0 )
      plane2 = workPart.Planes.CreatePlane( origin2, normal2, SmartObject.UpdateOption.WithinModeling )

      intersectionCurveBuilder1.Tolerance = 0.0001

      intersectionCurveBuilder1.Associative = True

      faces1 = checkFace

      faceDumbRule1 = workPart.ScRuleFactory.CreateRuleFaceDumb(faces1)
      rules1(0) = faceDumbRule1
      intersectionCurveBuilder1.FirstFace.ReplaceRules( rules1, False )
      objects2 = faces1
      added2 = intersectionCurveBuilder1.FirstSet.Add( objects2 )
      datumPlane1 = dPStation
      plane2.SetMethod( PlaneTypes.MethodType.Distance )

      geom2(0) = datumPlane1
      plane2.SetGeometry( geom2 )
      plane2.SetFlip( False )
      plane2.SetReverseSide( False )
      plane2.SetAlternate( PlaneTypes.AlternateType.One )
      plane2.Evaluate()

      intersectionCurveBuilder1.SecondPlane = plane2

      Try
         feature1 = intersectionCurveBuilder1.commitFeature()
      Catch
         MessageBox.Show( "Intersection Line could not be completed make sure root surface was selected", _
            "Error", MessageBoxButtons.OK, MessageBoxIcon.Error )
         'boolIntersection = false
      End Try

      intersectionCurveBuilder1.Destroy()

   End Sub 

I have tried setting Associative to false, just to see if it did any good but it made no difference.

Thanks for the help

RE: Associative vs Non-Associative in journal

When I run your code, I get an intersection curve feature that shows up in the part navigator. This feature is associative and it is made up of spline objects.

www.nxjournaling.com

RE: Associative vs Non-Associative in journal

(OP)
I am using it on an assembly in which the faces belong to sub components.

Maybe that is the problem...

RE: Associative vs Non-Associative in journal

For that to work you'll probably need to wave link the faces into the assembly file.

www.nxjournaling.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources