VB Script - Calculate Measured Arc Length
To find the Arc length, you need 3 measurements. A circle (Arc), and a line or point at each of the Arc. From there, construct lines from the center of Circle to Arc's endpoints and report both the diameter of Circle and Angle between two constructed lines.
Given the equation to calculate partial circumference is:
(sweep angle / 360) * Circle Dia * pi
You need to perform this calculation in the VB Script operation after performing these Measurements, Constructions, and initial Reports. Assuming you have features named "CIRCLE1", "LINE2", and "LINE3" and have reported Diameter and Angle, then you can add this VB Script:
CODE:
MyDia = GetReportInfo("CIRCLE1", "DIA", 2)
MyAng = GetReportInfo("ANGL BT LINE1 and LINE3", "3D",2)
pi = 4*Atn(1)
MyArc = (MyAng/360) * MyDia * pi
Now you have a Variable with your answer. To get the variable value back into your CMM-Manager report, add a User Defined dimension and set Variable for Actual value as "MyArc."
Related Articles
VB Script - Getting Started
What can I do with VB Scripting? CMM-Manager VB Scripts run in line with program execution and can be used to perform loops and flow control, display custom messages, prompt user for input that then influences program execution - i.e. skip section of ...
VB Script - Variable use for Feature Names and User Notes
When looping Program steps by use of VB Script loop - i.e. For Loop, Do Until, etc. - Features that have been executed more than one time will automatically be renamed using standard convention as such - Circle1, Circle1...1, Circle1...2, ...
Parametric Programming - Part Families
Do you manufacture and inspect Part Families? Meaning, variety of parts having similar overall geometry but with varying dimensional characteristics? Instead of cresting one program for each unique part, you can realize significant time savings by ...
Launch CMM-Manager Program using External Command
It is possible to run another CMM-Manager Program from the External Command operation. This is useful if you'd like to create a simple launching program - i.e. main program that prompts user for next program, and then runs accordingly to user ...
VB Script - Prompt to skip manual Alignment
Many times a CMM program may have a manual alignment followed by a DCC alignment. In some cases, the manual alignment does not need to be executed each time the program is run. This is true if subsequent running of the program is done with each part ...