Hi guys,
I need your help. I am stuck here.
When I read the part surface and edge, I didn't consider the difference of user unit and part unit. Now I have to fix this problem. In the part, an user uses the milimeter, but when I read the part, the part unit is meter, which is too small for me to handle.
I am not sure whether there is a better way to do. I try to set the part unit same as the user unit (could user do this via UI?), but it doesn't work as after I set the unit and read the surface, the data I read are still in the part unit which in my case is meter. Do I need to save the part first after I change the unit in order to make the newly set unit work properly?
Then I get the IUserUnit and read the conversion factor, whenever I evaluate part surface or edge point, I multiply the factor.I print out the surface data and edge data. I get the surface point and edges, and through interface IEvaluate for surface interface and IEvaluate2 for curve interface, I evaluate all the surface and edge points and print them out. in the attached image "edge and surf points", red points are the surface and highligh yellow points are the surface edge, The original surface is a long narrow fillet surface and is shown in the attached file "original solidworks surface". You can see the surface and edge I read don't match., do I need to multiply a transform matrix in this case? How do I resolve this issue?
thank you very much.
john
SolidworksApi macros