Skip to content

?connect example has typos, also, it does not work #102

Closed
@JeffreySarnoff

Description

@JeffreySarnoff
help?> connect
search: connect continue countlines count_ones

  connect(points::AbstractVector{<: AbstractPoint}, P::Type{<: Polytype{N}}, skip::Int = N)

  Creates a view that connects a number of points to a Polytope P. Between each polytope, skip elements are skipped
  untill the next starts. Example: ```julia x = connect(Point[(1, 2), (3, 4), (5, 6), (7, 8)], Line, 2) x ==
  [Line(Point(1, 2), Point(3, 4)), Line(Point(5, 6), Point(7, 8))]

julia> x = connect(Point[(1, 2), (3, 4), (5, 6), (7, 8)], Line, 2)
ERROR: MethodError: no method matching Polytope(::Type{Line{Dim, T} where T where Dim}, ::Type{Point})
Closest candidates are:
  Polytope(::Type{var"#s10"} where var"#s10"<:(GeometryBasics.Ngon{Dim, T, N, P} where P where T where Dim), ::Type{var"#s9"} where var"#s9"<:AbstractPoint{NDim, T}) where {N, NDim, T} at C:\Users\jas\.julia\packages\GeometryBasics\csguK\src\basic_types.jl:89
Stacktrace:
 [1] connect(points::Vector{Point}, P::Type{Line{Dim, T} where T where Dim}, skip::Int64)
   @ GeometryBasics ~\.julia\packages\GeometryBasics\csguK\src\viewtypes.jl:77
 [2] top-level scope
   @ REPL[13]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions