Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

大きすぎる半径で生成した Siren.sphere の容積の値が正しくない #22

Open
dyama opened this issue Sep 16, 2016 · 0 comments

Comments

@dyama
Copy link
Owner

dyama commented Sep 16, 2016

mruby および OCCT 双方の巨大数の取り扱いと変換処理を確認する。

> Siren.sphere(10e+10000)
 => #<Shape:0x2192050 @type=SOLID>
> Siren.sphere(10e+10000).volume
 => 0
> Siren.sphere(10e+1000).volume                                             
 => 0
> Siren.sphere(10e+100).volume                                              
 => 4.1887902047864e+303
> Siren.sphere(10e+1000).volume
 => 0
> Siren.sphere(10e-100).volume                                              
 => 0
> Siren.sphere(10e-10).volume                                               
 => 4.1887902047864e-27

そもそも、 BRepPrimAPI_MakeBox では [0, 0, 0] や [0, 1, 2] といった大きさのソリッドは作成できないが、 BRepPrimAPI_MakeSphere は半径 0 でソリッドが作成可能なのは不可解。

> Siren.sphere 0
 => #<Shape:0x21921d0 @type=SOLID>
> Siren.sphere(0).volume
 => 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant