<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Jari,<br>
    <br>
    I have two problems with ControlPointOffsets for smartshape slurs:<br>
    <br>
    1.) When reading 
    FCSmartShapeCtrlPointAdjust:GetControlPoint1OffsetX() and ...Y() 
    (or Point 2)<br>
    from a slur smartshape, the x and y values seem to be scaled
    differently.<br>
    The y value is the correct EVPU value: it is the difference between
    the LeftEndpointOffsetY<br>
    and the ControlPoint1Y respectively RightEndpointOffsetY and
    ControlPoint2Y.<br>
    The x value seems to be scaled differently depending on the length
    of the slur.<br>
    In short slurs (150-200 EVPUs) the x value has a factor of 15-20 of
    the EVPU value,<br>
    in longer slurs (250-500 EVPUs) the x value has a factor 3-10 of the
    EVPU value.<br>
    But I haven't found an exact correlation of the x value yet, it
    looks a bit logarithmic.<br>
    <br>
    I measured: <br>
    slur width         factor to correct the x offset value<br>
    in EVPU             to get the real x offset in EVPU<br>
    170                     1/17.9<br>
    256                      1/7.9<br>
    398                      1/5.5<br>
    476                      1/4.2<br>
    <br>
    Do you know anything about that ?<br>
    <br>
    This is the script to try out:<br>
    (to evaluate the different the scales you would need also to compare
    with the<br>
    smartshape:CalcLeftEntryMetricPos which is not included in the
    snippet)<br>
    <br>
    local region = finenv.Region()<br>
    local marks = finale.FCSmartShapeMeasureMarks()<br>
    marks:LoadAllForRegion(region, true)<br>
    marks:KeepSlursOnly()<br>
    for mark in each(marks) do<br>
      local smartshape = mark:CreateSmartShape()      <br>
      local controlpoint=smartshape:GetCtrlPointAdjust()<br>
      local leftseg=smartshape:GetTerminateSegmentLeft ()<br>
      local rightseg=smartshape:GetTerminateSegmentRight ()<br>
      print("X:",controlpoint:GetControlPoint1OffsetX(),<br>
            leftseg:GetControlPoint1OffsetX(),<br>
            rightseg:GetControlPoint1OffsetX())<br>
      print("Y:",controlpoint:GetControlPoint1OffsetY(),<br>
            leftseg:GetControlPoint1OffsetY(),<br>
            rightseg:GetControlPoint1OffsetY())<br>
    end<br>
    <br>
    The returned x value from the script is way too high.<br>
    <br>
    2.) When reading FCSmartShapeSegment:GetControlPoint1OffsetX  (or Y
    or Point2) with a slur,<br>
    I always get 0,0 values, no matter how much I shifted the control
    points,<br>
    At the same time the
    FCSmartShapeCtrlPointAdjust:GetControlPoint1OffsetX()   (from 1.) <br>
    always returns the correct values.<br>
    It seems to me like FCSmartShapeSegment:GetControlPoint1OffsetX is
    not needed - at least for slurs,<br>
    as FCSmartShapeCtrlPointAdjust returns the correct values.<br>
    But in the online documentation, it says that
    FCSmartShapeSegment:GetControlPoint1OffsetX<br>
    holds the offset values for slurs.<br>
    A demonstration is also the script above which returns 0 for all
    shape segments.<br>
    <br>
    Jan<br>
  </body>
</html>