On 2011/11/4 Thomas Paviot wrote: > 2011/11/3 Pierre JUILLARD wrote >> >> Hi Thomas, > > Hi Pierre, > >> >> Thank you for your answers. >> >> Following your advices, I had a look to the 52 posts on the OCC forum that >> are returned when searching with the keyword "unit", but none are >> interesting. They are either irrelevant, or without answer. >> >> I had however a look to the *.cdl file in Units and UnitsAPI folder. >> UnitsAPI.cdl is quite interesting and describes a large number of method >> to achieve conversion. >> >> However, I cannot use it in PythonOCC and don't know why. >> >> I am quite sure it is because I am unfamiliar with Python at the moment. >> >> For instance, typing: >> >> from OCC.UnitsAPI import * >> >> if __name__ == '__main__': >> u = UnitsAPI() >> u.CurrentUnit("LENGTH") >> >> returns: >> >> Traceback (most recent call last): >> File "L:\[coding]\python\pythonOCC_units\unitManagementTest.py", line >> 13, in <module> >> u.CurrentUnit("LENGTH") >> RuntimeError: Standard_NoSuchObject > > Same here: >>>> u = UnitsAPI() >>>> u.CurrentUnit("LENGTH") > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Library/Python/2.6/site-packages/OCC/UnitsAPI.py", line 214, in > CurrentUnit > return _UnitsAPI.UnitsAPI_CurrentUnit(*args) > RuntimeError: Resource_NoSuchResource > LENGTH
Same here in C++ with OCE, 3 resource files are not installed under UnitsAPI (CurrentUnits MDTVBaseUnits MDTVCurrentUnits, the former is needed in your test). This will be fixed, but... [...] >> I have installed PythonOCC all in one, but I couldn't find those file >> where I installed PythonOCC: where are the OCC sources installed? > > Only Windows dll are installed with pyocc, not resource files. this is a problem, those resource files are needed. Denis _______________________________________________ Pythonocc-users mailing list Pythonocc-users@gna.org https://mail.gna.org/listinfo/pythonocc-users