Skip to content

Geom::Point2d.offset does NOT accept zero offset #1029

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

Open
Fredosixx opened this issue Jan 11, 2025 · 1 comment
Open

Geom::Point2d.offset does NOT accept zero offset #1029

Fredosixx opened this issue Jan 11, 2025 · 1 comment

Comments

@Fredosixx
Copy link

I can't believe it....! Geom::Point2d#offset does not accept an offset of zero.

Try this code in the Ruby console:

origin = Geom::Point2d.new 0, 0
=> Point2d(0, 0)
vec = Geom::Vector2d.new 1, 0
=> Vector2d(1, 0)
pt = origin.offset(vec, 1)
=> Point2d(1, 0)
pt = origin.offset(vec, 0)
Error: #<ArgumentError: Zero distance is not allowed>
(eval):1:in `offset'
(eval):1:in `<main>'
SketchUp:in `eval'
=> nil
@sketchup
Copy link

sketchup bot commented Jan 20, 2025

Logged as: SKEXT-4488

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

3 participants