How does the tolerance parameter work for a point object? The admapi info seems somewhat vague.
If I code as follows what should I expect?...
If Point1.IsEqualTo(Point2, 0.5) Then
'Do Something incredible
End If
Will the above conditional evaluate to true if point1 is within 0.5cm of point2?
How does the tolerance work?
Solved! Go to Solution.
How does the tolerance parameter work for a point object? The admapi info seems somewhat vague.
If I code as follows what should I expect?...
If Point1.IsEqualTo(Point2, 0.5) Then
'Do Something incredible
End If
Will the above conditional evaluate to true if point1 is within 0.5cm of point2?
How does the tolerance work?
Solved! Go to Solution.
Solved by WCrihfield. Go to Solution.
Solved by SometimesInventorMakesMeAngry. Go to Solution.
You are correct. Though I've programmatically created 2 points on the same coordinates in the past, and this method has failed with tolerance of 0. It has worked fine with 0.001" tolerance (about 0.025 mm). This might be OK depending on what you're doing.
You are correct. Though I've programmatically created 2 points on the same coordinates in the past, and this method has failed with tolerance of 0. It has worked fine with 0.001" tolerance (about 0.025 mm). This might be OK depending on what you're doing.
Hi @CAD_CAM_MAN. This is a good place for a good old fashioned test to prove/disprove the theory (because it is very easy to test). My theory is that the tolerance is simply asking for a single numerical value (expecting a number with decimal places, but that may not be necessary) that the coordinates of the first point can be different from the coordinates of the second point and still pass or fail the test, depending on your purpose/need for the test.
For instance/example, you can use the following simple iLogic rule code to test this theory.
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oP1 As Point = oTG.CreatePoint(1, 2, 3)
Dim oP2 As Point = oTG.CreatePoint(1.0001, 2.0001, 3.0001)
If oP1.IsEqualTo(oP2, .00001) Then
MsgBox("They are Equal.", , "")
Else
MsgBox("Then are not Equal.", , "")
End If
If ran exactly like this, it will return False (the two points are not equal - not within the specified tolerance). However, if you eliminate 2 of the zeros between the decimal point and the 1 at the end, then run the rule again, the test returns True (the two points are now equal - within the specified tolerance). In the case of this point object, think of the tolerance as a radius dimension around the original point that the second point is either within, or outside of.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb: or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)
Hi @CAD_CAM_MAN. This is a good place for a good old fashioned test to prove/disprove the theory (because it is very easy to test). My theory is that the tolerance is simply asking for a single numerical value (expecting a number with decimal places, but that may not be necessary) that the coordinates of the first point can be different from the coordinates of the second point and still pass or fail the test, depending on your purpose/need for the test.
For instance/example, you can use the following simple iLogic rule code to test this theory.
Dim oTG As TransientGeometry = ThisApplication.TransientGeometry
Dim oP1 As Point = oTG.CreatePoint(1, 2, 3)
Dim oP2 As Point = oTG.CreatePoint(1.0001, 2.0001, 3.0001)
If oP1.IsEqualTo(oP2, .00001) Then
MsgBox("They are Equal.", , "")
Else
MsgBox("Then are not Equal.", , "")
End If
If ran exactly like this, it will return False (the two points are not equal - not within the specified tolerance). However, if you eliminate 2 of the zeros between the decimal point and the 1 at the end, then run the rule again, the test returns True (the two points are now equal - within the specified tolerance). In the case of this point object, think of the tolerance as a radius dimension around the original point that the second point is either within, or outside of.
If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.
If you want and have time, I would appreciate your Vote(s) for My IDEAS :light_bulb: or you can Explore My CONTRIBUTIONS
Wesley Crihfield
(Not an Autodesk Employee)
Thanks to responders for clarification. I suspected this was the case but was getting some unexpected results. Found the "real" issue and it is unrelated to my tolerance parameter setting.
Thanks to responders for clarification. I suspected this was the case but was getting some unexpected results. Found the "real" issue and it is unrelated to my tolerance parameter setting.
Can't find what you're looking for? Ask the community or share your knowledge.