-
Notifications
You must be signed in to change notification settings - Fork 12
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
intersection line are not complanar with line in plane #319
Comments
Hello @volkoshkursk, Could you please post a minimal working example of this? I'll need to see this in code to decide if this is an issue. |
P.S. ubuntu 20, python 3.10 |
It doesn't make sense to add a tolerance to the coplanar check in |
These lines can not be non-coplanar due to the fact that |
It's actually not the same. See this code: if self.direction.is_parallel(other.direction, **kwargs):
raise ValueError("The lines must not be parallel.")
if not self.is_coplanar(other):
raise ValueError("The lines must be coplanar.") Notice that the first check is "if parallel", but the second check is "if NOT coplanar". So passing a tolerance to If the lines aren't coplanar, then the output of this method will not be an intersection point of the two lines. It'll be the point on line A which is closest to line B, but it won't be an actual intersection point because the lines don't intersect. I tried your code without the >>> point = line.intersect_line(intersection)
>>> intersection.contains_point(point)
False |
However, if we calculate the distance between the point and line we get the value, which is less than data precision.
I completely agree, that it would be non-coplanar if the data was enought precise. However, my data's precision is limited by accuracy of sensor. So, difference less then 10^-6 in absolute value is most probably due to inaccuracy of collecting/storage/processing data. |
Ok, how about I add a keyword argument |
Sorry for late answer. Yes, it would be solution for my case, because I know that points are coplanar. However, I think, that the problem of non-precise data is popular. Usually, the threshold can be estimated from the description of the task. So, in direct case I think using a tolerance is more expedient. |
Then I think we should have two types of kwargs in the function signature: |
Yes, you are right. I solve this by adding an optional parameter In general, Also, we can add an optional parameter |
Would you be fine with me doing this, or would you rather I review your PR? |
I would like you to review my PR |
Hello I think you have some trailing whitespaces causing the automatic checks to fail.
|
Hello! I generate a plane from points and make a plane from point and normal. Then I make an intersection line with
Plane.intersect_plane
. When I try to find an intersection point of the intersection line and a line from points, which was used to making a first plane I get an errorThe text was updated successfully, but these errors were encountered: