albie0803
Alibre Super User
Code:
Options = []
Options.append([None, WindowsInputTypes.Label, 'Enter values below from your model']) #[0]
Options.append(["Select Origin Face", WindowsInputTypes.Face, None]) #[1]
Options.append(["Select Reference Face", WindowsInputTypes.Face, None]) #[2]
Options.append(["Select Shaft Edge", WindowsInputTypes.Edge, None]) #[3]
OF = Values[1] # Origin Face
RF = Values[2] # Reference face
E = Values[3] # Edge Value
SEF = OF.DistanceTo(RF)
print SEF
This used to work but now all I get is SEF=0
I have restarted Alibre and also rebooted the machine to no avail.
I had a look at this thread and it seems to be related. I have investigated further and if the face normals are in the same direction I get a correct answer but if they oppose then I get 0. I thought from the mentioned thread that this was only an issue when the opposing planes were equidistant from the origin but now it seems not.
This script used to work so something has changed somewhere.
Last edited: