Code Monkey home page Code Monkey logo

Comments (14)

GouMinghao avatar GouMinghao commented on August 15, 2024 1

Thanks for your bug report, it seems that it is indeed a bug.
I will try to fix it as soon as possible!

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024 1

Thank you again for you report, this bug is caused by numerical inaccuracy and has been addressed in #2. If you have any other question you can ask me later.

from geometry3d.

benoitxp avatar benoitxp commented on August 15, 2024 1

Hey,

Thank you for solving the bug so quickly 🙌.

I have another question related to this issue:
plane1 = ConvexPolygon((Point(171.76, 98.39, -36.5), Point(0.0, 0.0, -0.0), Point(171.76, 0.0, -0.0))) plane2 = ConvexPolygon((Point(-50.0, 10.0, -86.5), Point(-50.0, 10.0, 50.0), Point(221.76, 10.0, 50.0), Point(221.76, 10.0, -86.5)))

It looks like these coordinates give me a similar error.
Even tho there is also an intersection.

Any thoughts?

Thanks in advance

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024 1

It should be able to be installed using pip as I have uploaded the latest version to pypi. Maybe you have installed the old version. To update it using pip install Geometry3D==0.2.4

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024 1

Hi,

I've found another small problem

Input:

ConvexPolygon((Point(1350.16, 665.0, 2095.33), Point(1350.16, 0.0, 1487.0), Point(1350.16, 665.0, 1487.0)))
ConvexPolygon((Point(1300.16, 200.0, 1437.0), Point(1300.16, 200.0, 2145.33), Point(1400.16, 200.0, 2145.33), Point(1400.16, 200.0, 1437.0)))

Output: Point(1350.16, 200.0, 1487.0)

It has been a long time since this bug report, but it seems to be solved in here.

New patch will come soon.

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024

issue closed as there is no further discussion

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024

Thank you for another bug report, it is caused by the bug or my misunderstanding in the solver module provided by the old repo sgl. Instead, I reimplement a method to solve this problem.
The bug has be addressed in #4.

from geometry3d.

benoitxp avatar benoitxp commented on August 15, 2024

Awesome work!
Just tested it and it works perfect!

PS: Is it possible that the update isn't yet installable with pip?

from geometry3d.

benoitxp avatar benoitxp commented on August 15, 2024

Hey,

I think I found another case related to this issue.
These are my coordinates:

plane1 = ConvexPolygon((Point(156.05, 0.0, -1189.0), Point(156.05, 1000.0, -122.42), Point(156.05, 0.0, -122.42))) plane2 = ConvexPolygon((Point(106.05000000000001, 330.0, -1239.0), Point(106.05000000000001, 330.0, -72.42), Point(206.05, 330.0, -72.42), Point(206.05, 330.0, -1239.0)))

The answer I get when doing an intersection is only one point ( answer: Point(156.05, 330.0, -122.42000000000007) ). But by making a visualization then there is another point missing:
Screenshot 2021-09-29 at 14 56 44

Thanks in advance,
You're awesome!

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024

So sorry for the very long time delay as I'm busy finding a job these days.
This problem is caused by the inaccuracy of the vector calculation.
It is solved in this commit 99d97ef

from geometry3d.

benoitxp avatar benoitxp commented on August 15, 2024

Hi,

Thank you. I will try to test it as soon as possible.

Thanks

from geometry3d.

benoitxp avatar benoitxp commented on August 15, 2024

Hi,

I've found another small problem

Input:

ConvexPolygon((Point(1350.16, 665.0, 2095.33), Point(1350.16, 0.0, 1487.0), Point(1350.16, 665.0, 1487.0)))
ConvexPolygon((Point(1300.16, 200.0, 1437.0), Point(1300.16, 200.0, 2145.33), Point(1400.16, 200.0, 2145.33), Point(1400.16, 200.0, 1437.0)))

Output:
Point(1350.16, 200.0, 1487.0)

from geometry3d.

ldo avatar ldo commented on August 15, 2024

Why not use math.isclose() to do the approximately-equal comparison? Just to save some effort.

from geometry3d.

GouMinghao avatar GouMinghao commented on August 15, 2024

Why not use math.isclose() to do the approximately-equal comparison? Just to save some effort.

Thank you for your suggestion. However, this library relays heavily on precise floating point calculation. Using math.isclose is not easy to manage the precision.

from geometry3d.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.