JuliaGeometry / JuliaGeometry/Clipper.jl

support AbstractVector

Open
#41 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
33
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Rather than declaring arguments (and struct fields) as Vector{IntPoint}, it would be more generic to allow AbstractVector{IntPoint}. This can still be passed to C libraries as long as it supports a pointer conversion, and you could check that the stride(array,1) == 1 so that it is contiguous — these will throw a MethodError for array types that don't support these operations.

(It also might be convenient to use const IntPoint = SVector{2,Int64}.)

See also this discourse discussion

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the argument and struct-field declarations using Vector{IntPoint}, then trace the C-library entry points that consume them. Check how pointer conversion and stride(array, 1) are handled, and consider the related IntPoint alias proposal; done means supported AbstractVector inputs remain contiguous and pass the relevant C calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.