Skip to content

Intersection methods that accepts tuples. #1323

@petrasvestartas

Description

@petrasvestartas

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):

  • OS: Ubuntu
  • Python version 3.9.10
  • Python pip installed compas version from git clone.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions