Activity for Javascript Clipper

  • Tzvetelin Vassilev Tzvetelin Vassilev posted a comment on discussion General Discussion

    Hi, I have a question about new clipper - Clipper2. Are there any plans for JS implementation? Tzvetelin

  • cuixiping cuixiping modified a comment on ticket #30

    Screenshots:

  • cuixiping cuixiping posted a comment on ticket #30

    Screenshots:

  • cuixiping cuixiping created ticket #30

    Offsetting open shapes with self intersecting lines

  • cuixiping cuixiping modified a comment on ticket #13

    I also replicated this issue with the latest 6.4.2 My testing data is: [[0,0, 10,0, 6,4, 10,0, 6,-4, 10,0]] Offsetting delta is 1.000 Expected solution is an arrow shape, but a horizontal line actually.

  • cuixiping cuixiping posted a comment on ticket #13

    I also replicated this issue with the latest 6.4.2 My testing data is: [[0,0, 10,0, 6,4, 10,0, 6,-4, 10,0]] Offsetting delta is 1.000 Expected solution is an arrow shape, but a horizontal line actually.

  • shy shalom shy shalom posted a comment on ticket #29

    doesn't remove that point

  • shy shalom shy shalom created ticket #29

    ClipperLib.JS.Lighten can't remove the first point of a closed path.

  • Dave Stofka Dave Stofka posted a comment on discussion General Discussion

    I've been struggling trying to use Javascript Clipper to union polygons from GeoJSON data on a map. (Specifically, I have individual county polygons that I need to merge into regions.) Sample code: var CLIP = new ClipperLib.Clipper(); var polygon1 = [{"X":40.859099,"Y":-84.340531},{"X":40.860994,"Y":-84.109586},{"X":40.90473,"Y":-84.109516},{"X":40.920429,"Y":-83.880423},{"X":40.819919,"Y":-83.880063},{"X":40.64469,"Y":-83.880194},{"X":40.643069,"Y":-84.107787},{"X":40.685957,"Y":-84.222799},{"X":40.684926,"Y":-84.396778},{"X":40.815941,"Y":-84.397374},{"X":40.859099,"Y":-84.340531}];...

  • Jon Jon created ticket #28

    Union not joining adjacent rectangles

  • Jan Jan posted a comment on ticket #27

    I've found the problem. Even though the documentation says UNION operations can be performed on one set or both sets of polygons, but all other boolean operations require both sets of polygons to derive meaningful solutions. https://sourceforge.net/p/jsclipper/wiki/documentation/#clipperlibpolytype you really need both subject and clip sets. So, the fix was to add the second polygon as ptClip and then the union works correctly

  • Jan Jan posted a comment on ticket #27

    Hi Timo, thanks for responding so quickly. You're right it's something weird in the demo. However, I'm still facing the issue in my actual code. I've tried to simplify the paths. To reproduce, copy this in to starter_offset.html: var p1 = [[{"X":703,"Y":594},{"X":703,"Y":719},{"X":827,"Y":1960}]]; var p2 = [[{"X":827,"Y":2029},{"X":827,"Y":2098},{"X":1199,"Y":3015}]]; ClipperLib.JS.ScaleUpPaths(p1, 5); ClipperLib.JS.ScaleUpPaths(p2, 5); var co = new ClipperLib.ClipperOffset(2, 0.25); co.AddPaths(p1,...

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #27

    Thanks for reporting. Did you test the library itself? The demo is a bit complicated when using open paths (if I remember right, it doesn't support them or if supports you cannot change the order of operations boolean/offset). The JS libary itself supports open paths. You can try using as a base eg. http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=open_closed.html (code: http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=sources_as_text/open_closed.txt) or even simpler http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=starter_offset.html...

  • Jan Jan posted a comment on ticket #27

    On the other hand I can't reproduce it in the c# version of the library: If I replace contents of GenerateRandomPolygon with var subj = new Polygon(new IntPoint[] {new IntPoint(10000, 10000), new IntPoint(20000, 10000), new IntPoint(17000, 15000), new IntPoint(10000, 4000), new IntPoint(12000, 4000), new IntPoint(19000, 15000)}); var co = new ClipperOffset(); co.AddPath(subj, JoinType.jtRound, EndType.etOpenRound); co.Execute(ref subjects, 400); (crude, I know) It doesn't do anything strange when...

  • Jan Jan created ticket #27

    Union problem

  • Anonymous created ticket #26

    c.AddPath is not a function at Function.ClipperLib.Clipper.SimplifyPolygon

  • Bradley Gentry Bradley Gentry posted a comment on discussion General Discussion

    We have been using Javascript Clipper for a few years now to dynamically generate some graphics with offset paths in an in-browser sketch tool. It really saved a ton of work. Thank you! One thing I've always wanted is access to the version control for this project so I can see the iterative changes and better understand what changes have been made and to help me locate bug sources in our code's interaction with the clipper. Is there a reason there isn't public access to the version control?

  • Ignorant Ignorant posted a comment on discussion General Discussion

    Are you planning to copy port bundle handling code from seen.cm's version of martinez.?

  • Ignorant Ignorant modified a comment on discussion General Discussion

    The 2x factor may NOT be discernible in the new clipper which uses a output contours 2 support edges for the boolean primitives. I have even added that approach to Murtas bundle based approach(gpc for alternate parity only).

  • Ignorant Ignorant modified a comment on discussion General Discussion

    The 2x factor may NOT be discernible in the new clipper which uses a output contours 2 support edges for the boolean primitives.

  • Ignorant Ignorant posted a comment on discussion General Discussion

    How do I download the floating version? The 2x factor may NOT be discernible in the new clipper which uses a output contours 2 support edges for the boolean primitives.

  • cuixiping cuixiping created ticket #25

    Incorrect result of clip case with ExPolygons solutions (v5.0.2.3)

  • Elias Baixas Elias Baixas posted a comment on discussion General Discussion

    Hello Timo, this is an excellent library that I'm using with great pleasure, maybe I could contribute (for example, I'd like to remove the calls to alert('xyz') for a custom global logging/error reporting mechanism, that could be console.log, this is because alert() interferes a lot with the user interface, and the developer (user of the library) cannot customize how he wants to display/handle the errors) but I feel SourceForge is really unfriendly in terms of source-code version managing, issues,...

  • Anonymous created ticket #24

    Cleaning straight lines results in empty path

  • Timo Kähkönen Timo Kähkönen modified a comment on a wiki page

  • Timo Kähkönen Timo Kähkönen posted a comment on discussion General Discussion

    I have released a floating point version of Javascript Clipper. The main reasons for releasing are: the library code is smaller (no Int128), calling logic is simpler (no need for scaling coordinates) and the execution speed is faster (about 2x when using big integers), Give it a try: http://jsclipper.sourceforge.net/6.4.2.2_fpoint/main_demo.html

  • Timo Kähkönen Timo Kähkönen posted a comment on discussion General Discussion

    Hi! This is a forum for general discussion about Javascript Clipper. If you think you have find a bug, please report it in https://sourceforge.net/p/jsclipper/tickets/.

  • Javascript Clipper Javascript Clipper released /Javascript_Clipper_6.4.2.2_fpoint.zip

  • Javascript Clipper Javascript Clipper released /Javascript_Clipper_6.4.2.2.zip

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Web Workers 6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    migration5to6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Main_Demo 6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Home 6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Timo Kähkönen Timo Kähkönen modified ticket #22

    update to 6.4.2

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Web Workers 6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    migration5to6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Main_Demo 6

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    Home 6

  • Javascript Clipper Javascript Clipper released /Javascript_Clipper_6.4.2.1.zip

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #12

    This is fixed in upcoming 6.4.2.1.

  • Timo Kähkönen Timo Kähkönen modified a comment on ticket #22

    I'm now working on it. Seems promising. I have to make extensive tests first. I made also changes regarding calling IntPoint, DoublePoint and SlopesEqual -functions inside library. The average time of calling 1503 operations (offset and boolean) decreased from 2.1ms to 1.5ms.

  • Ruwan Janapriya Ruwan Janapriya posted a comment on ticket #22

    This is great news, thanks a lot!!

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #22

    I'm now working on it. Seems promising. I have to make extensive tests first.

  • Timo Kähkönen Timo Kähkönen modified ticket #3

    even/odd offsets missing

  • Timo Kähkönen Timo Kähkönen modified ticket #12

    Union of polygons with colinear edges (2)

  • Timo Kähkönen Timo Kähkönen modified ticket #13

    Offsetting open shapes with self intersecting lines

  • Timo Kähkönen Timo Kähkönen modified ticket #14

    ZFillFunction broken in 6.2.1.0

  • Timo Kähkönen Timo Kähkönen modified ticket #15

    IntPoint's Z values not preserved

  • Timo Kähkönen Timo Kähkönen modified ticket #16

    horizontal end segment of an open path gets reversed.

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #16

    Thanks. The issue is fixed in 6.4.2.1, which is coming soon.

  • Timo Kähkönen Timo Kähkönen modified ticket #21

    Working with existing svg paths

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #21

    If paths are only polygons (MLVHZ mlvhz), then you can use normalize_clipper_poly(polystr, quiet) to convert SVG-path to Clipper Path(s) and format_output(polystr, ExPolygonsOrNot) to convert from (stringified) Clipper Path(s) to SVG-path. The functions are in http://jsclipper.sourceforge.net/6.2.1.2/main_demo.html source. You probably have to edit those functions to suit your needs. If the path has curves, your option could be to convert path to cubic curves using Raphael and then polygonize them...

  • Timo Kähkönen Timo Kähkönen modified ticket #17

    ClipperLib.JS.Lighten always returns a Paths

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #17

    Thanks for reporting! Fixed in upcoming 6.4.2.1.

  • Timo Kähkönen Timo Kähkönen modified ticket #18

    TypeError: this.ParseFirstLeft is not a function

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #18

    Thanks for reporting. This will be fixed in upcoming 6.4.2.1.

  • Timo Kähkönen Timo Kähkönen modified ticket #19

    ir is not defined

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #19

    Thanks for reporting. This will be fixed in upcoming 6.4.2.1 version.

  • Timo Kähkönen Timo Kähkönen modified ticket #20

    Undesired zero width bridge when performing difference operation

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #20

    Hi, Thanks for reporting. This issue is true in 6.2.1.2. The upcoming 6.4.2.1 fixes this problem. 6.2.1.2: [[{"X":128,"Y":64},{"X":64,"Y":64},{"X":64,"Y":96},{"X":32,"Y":96},{"X":32,"Y":64},{"X":96,"Y":64},{"X":96,"Y":32},{"X":128,"Y":32}]] 6.4.2.1: [[{"X":128,"Y":32},{"X":128,"Y":64},{"X":96,"Y":64},{"X":96,"Y":32}]]

  • Timo Kähkönen Timo Kähkönen modified ticket #23

    Incorrect result from edge-case with clip type Difference

  • Arve Waltin Arve Waltin posted a comment on ticket #23

    Ok so I figured out that solution has to be converted to ExPolygons to get this information, ref https://sourceforge.net/p/jsclipper/wiki/ExPolygons%20and%20PolyTree%206/. :)

  • Arve Waltin Arve Waltin modified a comment on ticket #23

    After looking some more at the main demo, it appears to me that the result actually is a polygon with hole and main demo is illustrating this correctly when clicking at solution's points cell. As the solution consists of two polygons, how does the demo know that the second subpolygon is a hole and not an ordinar polygon next to the other one?

  • Arve Waltin Arve Waltin posted a comment on ticket #23

    After looking some more at the main demo, it appears to me that the result actually is a polygon with hole and main demo is illustrating this correctly when clicking at solution's points cell. Guess I have to interpret the solution differently.

  • Arve Waltin Arve Waltin modified a comment on ticket #23

    I hoped for a similar demo in C# Clipper where I could just put in custom samples, but it seems to only provide random-generating shapes. Guess I have to figure out how to write a demo myself then. The workaround did it by using offset -0.006 in this specific case, but Im not comfortable using this offset in all similar cases.

  • Arve Waltin Arve Waltin posted a comment on ticket #23

    I hoped for a similar demo in C# Clipper where I could just put in custom samples, but it seems to only provide random-generating shapes. Guess I have to figure out how to write a demo myself then. I was not able to fix the problem by setting the offset as suggested. Did you verify that in the main demo app?

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #23

    Thanks for contacting. Could you test, what result gives C# Clipper, from which JS Clipper is ported? Meanwhile you can use a workaround. After ctDifference operation, apply a little negative offset to the solution, eg. -0.001. See the documentation: https://sourceforge.net/p/jsclipper/wiki/documentation/#clipperlibclipperoffsetexecute or the example: http://jsclipper.sourceforge.net/6.2.1.2/index.html?p=sources_as_text/starter_offset.txt.

  • Arve Waltin Arve Waltin created ticket #23

    Incorrect result from edge-case with clip type Difference

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #22

    Thanks for interest, Javier! I assume that after summer I have time to make the update.

  • Javier González Garcés Javier González Garcés created ticket #22

    update to 6.4.2

  • Anonymous created ticket #21

    Working with existing svg paths

  • Anonymous created ticket #20

    Undesired zero width bridge when performing difference operation

  • Martin von Gagern Martin von Gagern posted a comment on ticket #19

    Oh, I hadn't been logged in. Sorry. Post is by me.

  • Anonymous created ticket #19

    ir is not defined

  • Anonymous created ticket #18

    TypeError: this.ParseFirstLeft is not a function

  • Casper Lamboo Casper Lamboo posted a comment on ticket #13

    Hi Timo, I'm sorry this issue was a mistake on my part. The npm clone of this project...

  • Anonymous created ticket #17

    ClipperLib.JS.Lighten always returns a Paths

  • Ruwan Janapriya Ruwan Janapriya posted a comment on ticket #16

    ^ Timo, I created this ticket, apparently I forgot to log in before creating it.

  • Anonymous created ticket #16

    horizontal end segment of an open path gets reversed.

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #15

    Thanks for reporting! I think it is fixed now in 6.2.1.2: https://sourceforge.net/projects/jsclipper/files/?source=navbar...

  • Javascript Clipper Javascript Clipper released /Javascript_Clipper_6.2.1.2.zip

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Timo Kähkönen Timo Kähkönen modified a wiki page

    documentation

  • Anonymous created ticket #15

    IntPoint's Z values not preserved

  • Timo Kähkönen Timo Kähkönen posted a comment on ticket #13

    I tested those paths at http://jsclipper.sourceforge.net/6.2.1.1/main_demo.html....

  • Timo Timo modified a wiki page

    documentation

  • Timo Timo posted a comment on ticket #14

    Thanks for reporting. The bug is fixed now in version 6.2.1.1. https://sourcefor...

  • Timo Timo modified a wiki page

    Web Workers 6

  • Timo Timo modified a wiki page

    ExPolygons and PolyTree 6

  • Timo Timo modified a wiki page

    Main_Demo 6

  • Timo Timo modified a wiki page

    Home 6

  • Timo Timo modified a wiki page

    Home 6

  • Timo Timo modified a wiki page

    Home 6

  • Timo Timo modified a wiki page

    documentation

  • Javascript Clipper Javascript Clipper released /Javascript_Clipper_6.2.1.1.zip

  • Anonymous created ticket #14

    ZFillFunction broken in 6.2.1.0

1 >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.