I’m checking if two conduits are parallel (with some tolerance) using the IsAlmostEqualTo method as shown below:
On API remark it reads “tolerance value represents the variation in direction between the vectors”
By trial and error I was able to figure out the tolerance value seems to be pivotal around 0.12325 & 0.12326 for one conduit in XY plane and another one sloped at 10°.
I want the user to enter the tolerance in degrees but can’t seem to figure out how to convert it to a double for the API call?
Tried calculating the dot product & angle between the vectors but that didn’t help!
Does anyone know what’s the calculation behind this tolerance value?
Check If Parallel with Tolerance.dyn (7.8 KB)
cndts = UnwrapElement(IN) tolerance = IN vecta= cndts.Location.Curve.Direction vectb= cndts.Location.Curve.Direction check = vecta.IsAlmostEqualTo(vectb, tolerance) OUT = check,vecta,vectb