You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I doubt it is a bug, but still would like to ask.
In several intersection methods of compas, input parameters are either a tuple or a primitive geometry object, but it works only with a tuple. For example:
@gonzalocasas this problem still exists in many places. perhaps we should remove the explicit reference to equivalent geometry objects from the docs. the lower level function API then explicitly uses the minimal mathematical representation of these objects, and in the higher level object API, we do this conversion behind the scenes automatically...
also, i think we should rename the function to always list the lower dimensional entity first.
some lower level functions used to refer explicitly to objects like circle and sphere as valid input. if that is still the case, we should remove those references, and instead make it clear that when the input is, for example, a circle, the user should provide it as (point, normal, radius).
i indeed think that all of the lower level functions should be accessible through the higher level API. to avoid repetition, i would suggest to always make such functionality available on the lower dimensional object. for example
line.intersection_plane(plane)
line.intersection_box(box)
line.intersection_surface(surface)
even better would be to make an intersection class that groups all of these...
Describe the bug
I doubt it is a bug, but still would like to ask.
In several intersection methods of compas, input parameters are either a tuple or a primitive geometry object, but it works only with a tuple. For example:
p0, p1 = intersection_sphere_line((sphere.base, sphere.radius), line)
But this does not work, since the intersection method tries to unpack the sphere:
p0, p1 = intersection_sphere_line(sphere, line)
To Reproduce
Above.
Expected behavior
Preferred way would be to work with a primitive rather than a tuple.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: