It is possible to reconstruct a Circle from User Defined parameters. For example, you may create a measured circle in program, then prompt user for diameter, and finally reconstruct a circle using same XYZ center point with unique diameter. This may be useful for measurement system where accurate measurement of position is possible but diameter is not - i.e. vision system, portable arm, very tight tolerance on diameter, etc.
Program structure as follows:
- Measure Circle
- VB Script (see below)
- Construct 3 points using values from VB Script
- (Re)construct Circle from
VB Script:
- Do until d > 0
- d = InputBox("Please enter circle diameter in current units", "Enter Diameter")
- If d > 0 Then
- Else
- MsgBox("Please enter a diameter larger than 0.0")
- End If
- Loop
- 'Get Info from Measured Feature CIRCLE1
- x = GetFeaturePropertyAct("CIRCLE1",1)
- y = GetFeaturePropertyAct("CIRCLE1",2)
- z = GetFeaturePropertyAct("CIRCLE1",3)
- r = d/2
- xP = x+r
- yP = y+r
- yM = y-r
When program is run, user will see following prompt. Value will be used to construct new circle with specified diameter: