How to join lines to get a shape

That fiddle is by @prisoner849

1 Like

Why are you still referencing to that fiddle? Seems it’s totally different from what you try to achieve.

Could you provide at least explanatory pictures of the desired result? As it’s hard to understand what you mean with your description.

ok still any best way that you have for this issue

Didn’t you ask for this exact thing before, and get a bunch of helpful answers from me and @prisoner849? Just read through the thread again to see if you get some ideas. I am sure, with the added experience since then, you will get more value out of the previous suggestions.

ok @EliasHasle and @prisoner849 i am close to solution guzs but i have a question let say
i have a polygon with the points (2,0,5), (3,0,2),(5,0,5) i am getting a polygon (triangle) while using raycasting i am unable to pick the line on with i clicked it gives me all the lines i need a perfection in line picking any solution ?

fixed already thanks for attention guzs :slight_smile:

@EliasHasle and @prisoner849 i need your help guys , now i want to export this polygon in json format you already aware about how we are creating polygons and than does the import is available and also i have custom geometries so i want there export and import too

What’s the difficulty? You’ve got an object of a polygon with all its info, so you can export it in any format you want.

ok now my question if i export it so while importing i think we need our own mechanism to re create it because i think three js dont have such options for custom geometry and i am now storing it in DB its points but it take time in recreation i want to reduce that time like if a user reload so example it take it from session some thing like this or from a temp file

The more information about an object and its parts you export, the more precise you can re-create it on import.

How do those things relate to Three.js?

1 Like

@prisoner849 in our polygon if i need a inside or outside offset than is there any way possible like if i give 1 unit so it create an offet at one unit

Are you looking for something like this?

yes i checked that fiddle but do you think it fits our polygon tool ?

I can think many things and have no idea what fits to your polygon and what does not. You have to know better the requirements of your project.

Thanks for attention @prisoner849 here i need a way to make offset inside and outside let say if i give 1 unit so at 1 unit distance i need a offset both inside and outside

Is there any difficulty to create two polygons with offset of -0.5 and 0.5?

my tool simply create the polygon than how i can create other with offset i am asking you about the best way to do this even i only need a border (offset) not whole polygon
@EliasHasle do you have any idea about this

Get points (points only!) of your polygon/contour, apply that OffsetContour function, thus you’ll get a set of points with desired offset.

@prisoner849 this is an awesome help i really appreciate your help , only this i want to know let say if i pass 1 unit as offset so i need a offset around 1 unit like small triangle and than an offset (border) with 1 unit gap here i am able to achieve the border and if i give -1 than an offset inside it if -1 unit gap