LibreCAD for 3D design - problem with hatching

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

LibreCAD for 3D design - problem with hatching

jluscher
I am a retired electrical engineer and have spent a few days learning LibreCAD.

My goal is to design an object for my 3D printer by creating a 2D form
and extruding it for 3D printing.

I have a rather complex (hexagonal like) form composed of many
arcs and lines but find I can't "hatch" it because LibreCAD says
it isn't a "closed contour".

I understand that this means that (somewhere?) the end of one of
the 'arcs' doesn't match the end of its adjacent line.

In examining the entities (modify) the line has an ending X,Y value
but the arc has an ending ANGLE !

How can I identify the locations where there is a 'gap' (I can't see any)
and how can I match up the ends of arcs and lines?

I haven't been able to find the relevant tool for checking/fixing
"closed contours" - is there one or is that still on the "to do" list?

Thanks,  James
Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

dxli
we know the current hatching algorithm is not robust, and we would like to create a robust and efficient hatching algorithm in Version 3 of LibreCAD, which is still in early stage of development leading by Ries.

In your case, you can repeat trimming to create a close contour. Please note that “trimming both" is a little buggy.

trim
Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

jluscher
Thanks for the reply!
I look forward to version 3.
Right now I'm stuck because I can't tell how to find any spot
which is NOT "closed" - so that I can "trim" it (or whatever).

I'm attaching the .dxf I am struggling with and would
appreciate it if you could point out how to identify where
I need to make a change to "close" the design.

James

 ----  www.jluscher.com  ----


"Ultimately, our policies in economics are somewhat intuitive and
 our models are not accurate enough to tell us what the right policy is..."

-- Robert Shiller, Yale economist, Nobel Prize winner



On Tue, Apr 29, 2014 at 7:39 PM, dxli [via LibreCAD] <[hidden email]> wrote:
we know the current hatching algorithm is not robust, and we would like to create a robust and efficient hatching algorithm in Version 3 of LibreCAD, which is still in early stage of development leading by Ries.

In your case, you can repeat trimming to create a close contour. Please note that “trimming both" is a little buggy.

trim


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/LibreCAD-for-3D-design-problem-with-hatching-tp5709872p5709873.html
To unsubscribe from LibreCAD for 3D design - problem with hatching, click here.
NAML


hexcell_libreCAD_closed.dxf (32K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

dxli
It looks like a bug to me:

hatching doesn't work for combination of simple entities (line/arc/ellipse) and polylines.

I will fix this bug as soon as possible.

jluscher wrote
Thanks for the reply!
I look forward to version 3.
Right now I'm stuck because I can't tell how to find any spot
which is NOT "closed" - so that I can "trim" it (or whatever).

I'm attaching the .dxf I am struggling with and would
appreciate it if you could point out how to identify where
I need to make a change to "close" the design.

James
Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

jluscher
Thanks again for your time in looking at this and your hard work in developing LibreCAD !

James

 ----  www.jluscher.com  ----


"Ultimately, our policies in economics are somewhat intuitive and
 our models are not accurate enough to tell us what the right policy is..."

-- Robert Shiller, Yale economist, Nobel Prize winner



On Wed, Apr 30, 2014 at 7:28 AM, dxli [via LibreCAD] <[hidden email]> wrote:
It looks like a bug to me:

hatching doesn't work for combination of simple entities (line/arc/ellipse) and polylines.

I will fix this bug as soon as possible.

jluscher wrote
Thanks for the reply!
I look forward to version 3.
Right now I'm stuck because I can't tell how to find any spot
which is NOT "closed" - so that I can "trim" it (or whatever).

I'm attaching the .dxf I am struggling with and would
appreciate it if you could point out how to identify where
I need to make a change to "close" the design.

James



If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/LibreCAD-for-3D-design-problem-with-hatching-tp5709872p5709876.html
To unsubscribe from LibreCAD for 3D design - problem with hatching, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

dxli
some troubleshooting shows it's a contour connection issue instead of a bug of LibreCAD.

Basically, there are many gaps  at 0.001 or 0.0001 level in your contour. I took some time to modify your drawing to create a continuous contour, and hatching works after that. Please test the contour on the right side (on layer 2)

It's not trivial for most users to notice this gype of gaps, without enabling the debugging code for hatching. Since your connections are mostly tangential, a very tricky case for "trimming". Trimming tries to modify the entities to be only within one side of the limiting border, but a tangential line doesn't cut entities into halves.

I didn't spend time to check whether these gaps are from polyline creation (if so, it's a bug of polyline). I explode the polylines, and move entities away:

1, move first entity away by some offset;
2, move the subsequent entities by moving its startpoint to the end point of the previous moved entities, by snap to end points only. This is an efficient way to remove gaps. I have to zoom in to make sure I'm using the right end points.
3, continue until I moved away exact one sixth of the contour;
4, given a partial contour of one sixth of the whole contour, still need to define a rotation center from which the one sixth of contour spans 60 degrees.
To find the rotation center. you may draw construction circles centered at each end point of this partial, with a radius of the distance between those two end points. one of the intersections between the two construction circles is the rotation center.



hatch1.dxf
Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

jluscher
WOW !

The technique of moving the entities, offset, to find / eliminate gaps is a great idea.

It would be a great "user feature" if the code which detects the gap originally
had a way of highlighting it - even if it stopped at the first (if there were several)
 - just before it showed the ERROR message about the contour error.

It would have saved me reporting a problem as I examined the countour, by zooming
in a LOT, and slowly crawling along the lines - but I just couldn't see any gaps.
In general it is a great help to point out the specific location of a problem to
naive users (like me ;-) if nothing else as a teaching tool, immediate feedback
is usually a great help in figuring out what I've done wrong.

Thank you AGAIN for your time and patience in looking so carefully into what
was in the end MY mistake !   I'm sorry about distracting you from other
work.

Sincerely,
James

 ----  www.jluscher.com  ----


  r > g = :-(  

-- Thomas Piketty, "Capital in the Twenty-First Century"



On Thu, May 1, 2014 at 2:45 PM, dxli [via LibreCAD] <[hidden email]> wrote:
some troubleshooting shows it's a contour connection issue instead of a bug of LibreCAD.

Basically, there are many gaps  at 0.001 or 0.0001 level in your contour. I took some time to modify your drawing to create a continuous contour, and hatching works after that. Please test the contour on the right side (on layer 2)

It's not trivial for most users to notice this gype of gaps, without enabling the debugging code for hatching. Since your connections are mostly tangential, a very tricky case for "trimming". Trimming tries to modify the entities to be only within one side of the limiting border, but tangential lines doesn't cut entities into halves.

I didn't spend time to check whether these gaps are from polyline creation (if so, it's a bug of polyline). I explode the polylines, and move entities away:

1, move first entity away by some offset;
2, move the subsequent entities by moving it's startpoint to the end point of the previous moved entities, by snap to end points only. This is an efficient way to remove gaps. I have to zoom in to make sure I'm using the right end points.
3, continue until I moved away exact one sixth of the contour;
4, given a partial contour of one sixth of the whole contour, still need to define a rotation center from which the one sixth of contour spans 60 degrees.
To find the rotation center. you may draw construction circles centered at each end point of this partial, with a radius of the distance between those two end points. one of the intersections between the two construction circles is the rotation center.



hatch1.dxf


If you reply to this email, your message will be added to the discussion below:
http://forum.librecad.org/LibreCAD-for-3D-design-problem-with-hatching-tp5709872p5709880.html
To unsubscribe from LibreCAD for 3D design - problem with hatching, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: LibreCAD for 3D design - problem with hatching

Ferdi
This post was updated on .
I'll reread your comments. Perhaps I'll understand how to convert connected lines into a polygon.