Offset feature LibreCAD

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

Offset feature LibreCAD

tonny
This post was updated on .
Is there feature in LibreCAD to make offset like this? Or should I make a feature request?

[img]http://www.upl.co/uploads/librecadoffset.png[/img]

With current offset feature i must lenghten and trim entities after offset.

What I need is feature I select multiple entities, apply offset for them and offset like on screen is created.
I hope that my screen shows good functionality I need.

FreeCAD seems to have this feature. http://sourceforge.net/apps/mediawiki/free-cad/index.php?title=Draft_Offset I haven't tested it hovewer it seems to be ok. I will test and report here whether it works or not.

I've just noticed that for polyline this feature work as I want. But I want to do it for shapes not treated as polyline also.
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

Rallaz
To create offset simmilar of attached image use
Draw->Polyline->Create Equidistant Polyline

But if entities are lines, first use
Draw->Polyline->Create Polyline from Existing Segments
to convert lines to polylines
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

tonny
This post was updated on .
[img]http://www.upl.co/uploads/libreoffset2.png[/img]
[img]http://www.upl.co/uploads/libreoffset3.png[/img]

I've just checked it and it seems it's still plenty of work on this functionality?

There is also some bug in trim functionality
[img]http://www.upl.co/uploads/libretrimm.png[/img]

It does not work in this case on screen. Red entities should be trimmed. I've tried to lenghten line but no result line is trimmed, arc is trimmed but the result is circle.
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

Rallaz
I made some test with current master brach (same code as alpha4), and this is the result:


As you can see it's not perfect, but there are improvements over the images you have attached

I added a patch in master branch code, and the result is:


All are polylines. Red are original drawn from left to right
Yellow are original drawn from right to left.
And white resulting polylines from offset
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

tonny
[img]http://www.upl.co/uploads/libreoffset.png[/img]

Still some problems with closed polylines.
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

Rallaz
To draw polyline:
start point> 0,0
next point> 10,0
next point> 10,10
next point> 0,10
next point> close (or click in "close" button)
With this command sequence are created a CLOSED "squared" polyliline

and:
start point> 0,0
next point> 10,0
next point> 10,10
next point> 0,10
next point>  0,0
With this command sequence are created a OPEN "squared" polyliline

The result with both methods is the same visually, but the first creates a closed polyline and the second an open polyline with the coordinates of the first point equal to the last point.


In this image left polyline are closed, and right are open, with "Edit->Modify Properties" you can check if polyline are open or closed (and change the status)
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

tonny
This post was updated on .
Thanks for patience. It works good for me. However found another bug I think.

This red polyline is closed and ends with arc. The result is wrong. When the same red entity is not closed the result is ok.
[img]http://www.upl.co/uploads/libreoffset4.png[/img]

http://pastebin.com/5Xqzvxfi
I think that I've figured it out. When polyline is closed bulge should not be set I think. See the comment in code above. I haven't tested it much, but solved all my test cases.
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

Rallaz
Another patch added, please test it.

If patch do not work or you found another bug open a bug report in:
http://sourceforge.net/tracker/?group_id=342582&atid=1433844
so will be more organized and easier to find in the future
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

krzych
This post was updated on .
I've found another issue with offset feature.

[img]http://www.upl.co/uploads/issue.jpg[/img]

Here when using polyline equidistant and the length of polyline segment is too small offset is not generated correctly.

I'm using LibreCAD 2.0 beta1
Reply | Threaded
Open this post in threaded view
|

Re: Offset feature LibreCAD

martinst
In order to create bug reports it is only necessary to register in sourceforge:
https://sourceforge.net/user/registration