Duplicate entities

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Duplicate entities

LittleTinyWorkshop
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate entities

dxli
I don't think there is an easy way to do that.

To efficiently detect identical entities:

1, implement hash code for all entities;
2, implement an equal() member function for all, to be used to handle hash collisions;

sounds like an interesting small project.

LittleTinyWorkshop wrote
Hi

Is there a way in LibreCAD to select and erase any duplicate entities please.

Regards

LTW
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate entities

R. van Twisk
Administrator
Sounds like a java solution :)

I guess would also consider entities that are near identical?

For example lines where start/end point's of each line are close to within a specific distance?

Ries

On Jan 8, 2016, at 5:54 PM, dxli [via LibreCAD] <[hidden email]> wrote:

I don't think there is an easy way to do that.

To efficiently detect identical entities:

1, implement hash code for all entities;
2, implement an equal() member function for all, to be used to handle hash collisions;

sounds like an interesting small project.

LittleTinyWorkshop wrote
Hi

Is there a way in LibreCAD to select and erase any duplicate entities please.

Regards

LTW



If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Duplicate-entities-tp5712800p5712801.html
To start a new topic under LibreCAD-user, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Duplicate entities

dxli
Not really, because duplicated should mean exact copies generated by copying.

It's hard to define "similar" cleanly.

say, you have tolerance of 0.5 (ridiculously large to show the idea), and the 1D points are:

0 0.25 0.5 0.75 1. 1.25 1.5

so, 0.25 is a duplicate of 0, and 0.5 is a duplicate of 0.25.

it's hard to tell which ones to remove then.

R. van Twisk wrote
Sounds like a java solution :)

I guess would also consider entities that are near identical?

For example lines where start/end point's of each line are close to within a specific distance?

Ries

> On Jan 8, 2016, at 5:54 PM, dxli [via LibreCAD] <[hidden email]> wrote:
>
> I don't think there is an easy way to do that.
>
> To efficiently detect identical entities:
>
> 1, implement hash code for all entities;
> 2, implement an equal() member function for all, to be used to handle hash collisions;
>
> sounds like an interesting small project.
>
> LittleTinyWorkshop wrote
> Hi
>
> Is there a way in LibreCAD to select and erase any duplicate entities please.
>
> Regards
>
> LTW
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.librecad.org/Duplicate-entities-tp5712800p5712801.html <http://forum.librecad.org/Duplicate-entities-tp5712800p5712801.html>
> To start a new topic under LibreCAD-user, email [hidden email] 
> To unsubscribe from LibreCAD, click here <http://forum.librecad.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4499512&code=bGlicmVjYWRAcnZ0LmRkcy5ubHw0NDk5NTEyfDMxMzE2MjUxNQ==>.
> NAML <http://forum.librecad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
Reply | Threaded
Open this post in threaded view
|

Re: Duplicate entities

R. van Twisk
Administrator
Dxli,

I see what you are saying here.
I guess both methods would be helpfull in different situations...

Ries


On Jan 9, 2016, at 2:44 AM, dxli [via LibreCAD] <[hidden email]> wrote:

Not really, because duplicated should mean exact copies generated by copying.

It's hard to define "similar" cleanly.

say, you have tolerance of 0.5 (ridiculously large to show the idea), and the 1D points are:

0 0.25 0.5 0.75 1. 1.25 1.5

so, 0.25 is a duplicate of 0, and 0.5 is a duplicate of 0.25.

it's hard to tell which ones to remove then.

R. van Twisk wrote
Sounds like a java solution :)

I guess would also consider entities that are near identical?

For example lines where start/end point's of each line are close to within a specific distance?

Ries

> On Jan 8, 2016, at 5:54 PM, dxli [via LibreCAD] <<a href="x-msg://81/user/SendEmail.jtp?type=node&amp;node=5712804&amp;i=0" target="_top" rel="nofollow" link="external" class="">[hidden email]> wrote:
>
> I don't think there is an easy way to do that.
>
> To efficiently detect identical entities:
>
> 1, implement hash code for all entities;
> 2, implement an equal() member function for all, to be used to handle hash collisions;
>
> sounds like an interesting small project.
>
> LittleTinyWorkshop wrote
> Hi
>
> Is there a way in LibreCAD to select and erase any duplicate entities please.
>
> Regards
>
> LTW
>
>
> If you reply to this email, your message will be added to the discussion below:
> http://forum.librecad.org/Duplicate-entities-tp5712800p5712801.html <http://forum.librecad.org/Duplicate-entities-tp5712800p5712801.html>
> To start a new topic under LibreCAD-user, email <a href="x-msg://81/user/SendEmail.jtp?type=node&amp;node=5712804&amp;i=1" target="_top" rel="nofollow" link="external" class="">[hidden email] 
> To unsubscribe from LibreCAD, click here <
> NAML <
http://forum.librecad.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/Duplicate-entities-tp5712800p5712804.html
To start a new topic under LibreCAD-user, email [hidden email]
To unsubscribe from LibreCAD, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Duplicate entities

TinyLittleWorkshop
Hi

Thanks Dxli and Ries for your answers.

Somehow I managed to delete my first post by mistake .... anyway AutoCAD and QCAD and most other CAD programs have this option to select and delete duplicate entities, so it is something which is very normal to have in a CAD tool set!

It would be great if this could be added to LibreCAD  also.

TLW