Personal tools
You are here: Home Forum Other... (new forum, problems, etc.) Bug in MakeEllipse

Bug in MakeEllipse

Up to Other... (new forum, problems, etc.)

Bug in MakeEllipse

Posted by Shavkat Nizamov at March 15. 2011

Hi!

 

I tried to populate a surface with random ellipses. The simple test case is:

 

import geompy
import salome

gg = salome.ImportComponentGUI("GEOM")

x=10
y=10

r1=50
r2=56

p_s =  geompy.MakeVertex(x, y, 0)
p_e =  geompy.MakeVertex(x, y, 10)
normal = geompy.MakeVector(p_s, p_e)
id_normal = geompy.addToStudy(normal,"Normal")
gg.createAndDisplayGO(id_normal)

ellipse = geompy.MakeEllipse(p_s, normal, r1, r2)

id_face = geompy.addToStudy(ellipse,"Ellipse")
gg.createAndDisplayGO(id_face)

 


Depending on r1/r2 creation of ellipse may succeed or fail. For random r1 and r2 it fails very fast - usually at 2/3rd attempt. 

In this test case following exception is thrown:

 

Traceback (most recent call last):

File "<input>", line 1, in ?

File "/home/shawkat/Workspace/Salome/cyls-test.py", line 18, in ?

ellipse = geompy.MakeEllipse(p_s, normal, r1, r2)

File "/home/shawkat/Salome-V5_1_5_64bit/SALOME5/V5_1_5/GEOM_V5_1_5/bin/salome/geompyDC.py", line 863, in MakeEllipse

RaiseIfFailed("MakeEllipse", self.CurvesOp)

File "/home/shawkat/Salome-V5_1_5_64bit/SALOME5/V5_1_5/GEOM_V5_1_5/bin/salome/geompyDC.py", line 93, in RaiseIfFailed

raise RuntimeError, Method_name + " : " + Operation.GetErrorCode()

RuntimeError: MakeEllipse :

 


The version I use is Salome 5.1.5 binary 64-bit on Ubuntu 10.10.

Re: Bug in MakeEllipse

Posted by Saint Michael at March 16. 2011

Hi

Your script breaks when rMajor < tMinor


BR St.Michael

Quick reply
URLs will be automatically hyperlinked. Basic HTML tags are OK.
Powered by Ploneboard
History
Activate by Shavkat Nizamov on Mar 15, 2011 02:16 PM
Document Actions