MEASUREMENTS from BEST FIT ARC . . .
I would like to add a BEST FIT ARC TOOL to a project that I am working on.
In this application, the USER would create the BEST FIT ARC using 4 points.
In the SCREEN CAPTURE below, the BEST FIT ARC (BFA1) follows the CIRCLE.
For this project, the IMAGE-PRO CODE needs to create a NEW ARC (BFA2) that has
BFA2 CENTER = BFA1 CENTER
BFA2 RADIUS = BFA1 RADIUS - OFFSET
After doing an ADD ALL in the AVAILABLE MEASUREMENTS, BFA1 generates the following measurements.
The TIF IMAGE with BFA1 overlaid on the IMAGE is attached as
When I record a MACRO and create a BEST FIT ARC, the code below is generated.
Public Function NewMacro3() As SimpleScript NewMacro3 = New SimpleScript Dim doc1, meas1 With Application.DocumentCommands.Active(NewMacro3) .Run(doc1) End With With Measure.MeasurementsCommands.Options(NewMacro3) .NMaxPointsArcs = 4 .Run(doc1) End With With Measure.MeasurementsCommands.Add(NewMacro3) .MeasurementType = McMeasurements.enumMMSTypes.mmtsBestFitArc .Points = New System.Collections.Generic.List(Of System.Drawing.PointF) .Points.Add(New System.Drawing.PointF(89.73759F,251.2154F)) .Points.Add(New System.Drawing.PointF(117.1162F,298.7089F)) .Points.Add(New System.Drawing.PointF(333.9099F,265.7428F)) .Points.Add(New System.Drawing.PointF(345.6436F,217.6906F)) .FeatureName = "BFA2" .SnapFeature = False .Run(doc1, meas1) End With End Function
Knowing the BFA1 CENTER, I can find 4 points that are OFFSET from the original BFA1 POINTS along lines from the POINTS to the CENTER. This is a bit of a headache but I know it can be done and then these points can be used to create BFA2.
Is there a better way to achieve a BFA2 that is CONCENTRIC with BFA1 but with a RADIUS that is reduced by an OFFSET?