Hallo zusammen,
ich habe das gleiche Problem - möchte genau wie der "fräsmurml" Zwangsbedingungen über ein .vb auf benannte Flächen automatisch generieren
Das Hauptproblem liegt dabei (glaube ich, :-)) in der Beschreibung der Fläche ("PARTIAL_PROTO#.Bodies|Body8|HANDLE R-24670") die NX intern irgendwie anderst beschrieben wird.
Hier ein kleiner Auszug aus einem Journal:
Dim constraint1 As Positioning.Constraint
constraint1 = componentPositioner1.CreateConstraint()
Dim componentConstraint1 As Positioning.ComponentConstraint = CType(constraint1, Positioning.ComponentConstraint)
componentConstraint1.ConstraintType = Positioning.Constraint.Type.Distance
Dim component1 As Assemblies.Component = CType(workPart.ComponentAssembly.RootComponent.FindObject("COMPONENT 106685419/A 1"), Assemblies.Component)
Dim component2 As Assemblies.Component = CType(component1.FindObject("COMPONENT 106685418/A 1"), Assemblies.Component)
Dim face1 As Face = CType(component2.FindObject("PARTIAL_PROTO#.Bodies|Body8|HANDLE R-24670"), Face)
Dim constraintReference1 As Positioning.ConstraintReference
constraintReference1 = componentConstraint1.CreateConstraintReference(component2, face1, False, False, False)
Dim helpPoint1 As Point3d = New Point3d(-150.0, 149.747798956316, -196.254595600822)
constraintReference1.HelpPoint = helpPoint1
Dim component3 As Assemblies.Component = CType(workPart.ComponentAssembly.RootComponent.FindObject("COMPONENT 106759059_richtig_CAM/0 1"), Assemblies.Component)
Dim face2 As Face = CType(component3.FindObject("PARTIAL_PROTO#.Bodies|Body8|HANDLE R-2055"), Face)
Dim constraintReference2 As Positioning.ConstraintReference
constraintReference2 = componentConstraint1.CreateConstraintReference(component3, face2, False, False, False)
Dim helpPoint2 As Point3d = New Point3d(-99.7499999999996, 150.797076555669, -104.885115960453)
constraintReference2.HelpPoint = helpPoint2
constraintReference2.SetFixHint(True)
componentConstraint1.SetExpression("0")
Dim expression1 As Expression
expression1 = componentConstraint1.Expression
componentConstraint1.SetExpression("50.2500000000004")
componentNetwork1.Solve()
Ich hoffe es kann mir jemand bei diesem nicht gerade einfachen Thema helfen?!
Danke
------------------
NC Programmierer
Eine Antwort auf diesen Beitrag verfassen (mit Zitat/Zitat des Beitrags) IP