Hi again,
Took me a while to get time to continue this project but I did manage to create a solution in the end...
I also tried your suggestion but it didn't seem feasible to use transitional constraints on a curved cylindrical surface, at least I couldn't get it to work in any reliable fashion. Instead I ventured down the programming route and created the attached code. This was far more complex than I had wished but it does work and serves my purposes.
The basic principle is to determine which face the work axis should be referencing based on the radius position, and once know, redefine the work axis with the "correct" inputs.
Attached is a part file which demonstrates this code (Inventor 2025).
Dim partDoc As PartDocument = ThisDoc.Document
Dim partDef As PartComponentDefinition = partDoc.ComponentDefinition
' Positioning axis
Dim posAxis As WorkAxis = partDef.WorkAxes.Item("ref axis (vertical)")
' Positioning work point
Dim posPoint As WorkPoint = partDef.WorkPoints.Item("Position point")
' Work axis perpendicular to face
Dim faceAxis As WorkAxis = partDef.WorkAxes.Item("Position Axis")
' Get absolute value used for positioning (non-negative)
Dim radiusValue As Double = Math.Abs(radialPos)
Dim faceRef As String = Nothing
Dim facePoint As WorkPoint = Nothing
' Set reference to face name depending on radial position value
Select Case radiusValue
Case < IR
faceRef = "Main Radius"
facePoint = partDef.WorkPoints.Item("Main radius origin point")
Case > IR
faceRef = "Secondary Radius"
If radialPos < 0 Then
facePoint = partDef.WorkPoints.Item("Secondary radius origin point (negative direction)")
Else
facePoint = partDef.WorkPoints.Item("Secondary radius origin point (positive direction)")
End If
End Select
' Get the face object
Dim namedEnt = iLogicVb.Automation.GetNamedEntities(ThisDoc.Document)
Dim f As Inventor.Face = namedEnt.FindEntity(faceRef)
' Set necessary transient geometry variables
Dim planeNormal As UnitVector = partDef.WorkPlanes.Item("Top face ref").Plane.Normal
Dim TGpoint As Point = partDef.WorkPoints.Item("ref point (top face)").Point
Dim foundEnts As ObjectsEnumerator = Nothing
Dim locPoints As ObjectsEnumerator = Nothing
Dim body As SurfaceBody = f.Parent
' Get the first intersection point
Call body.FindUsingRay(TGpoint, planeNormal, 0.00001, foundEnts, locPoints, True)
Dim p As Point = locPoints.Item(1)
If locPoints.Count > 0 Then
' Redefine the positioning workpoint (constrained to face)
posPoint.SetByCurveAndEntity(posAxis, f, p) ' (proximity point (p) is used to ensure the work point is placed correctly, if other solutions are also possible)
' Redefine the face axis (perpendicular to face)
faceAxis.SetByTwoPoints(posPoint, facePoint)
Else
MsgBox("Failed to locate intersection.", MessageBoxIcon.Warning,"Error: " & iLogicVb.RuleName)
Return
End If
Best,
Fredrik