preparation for 2.0.6, any blocker?

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

preparation for 2.0.6, any blocker?

dxli
Is there any specific bug we should fix? before releasing 2.0.6
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

LordOfBikes
Administrator
I've made a pootle update today, so I have no further doubts about releasing 2.0.6.

Armin
investing less than half an hour into Search function can save hours or days of waiting for a solution
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

pavel
In reply to this post by dxli
I am not aware of any.
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

Quenzo
In reply to this post by dxli
Hi. In advance, some of these issues can be my mistakes, in this case I 'm sorry.

Modify--> Trim / Extend two option

1 The cut between two figures curves (circle, ellipse, or arc) is made according to where on each figure is selected. It can cut two, cut one (especially if it's between the ellipse and the circle cutting the ellipse like with the normal cutting option), and may also extend a figure (especially arcs) when you expected to be cut.
It seems that the application sometimes isn't sure lengthen or trim the curves, and if it has to cut one or two.
However, with the straight lines have no problem.

2 When you try to cut a circle or ellipse intersecting a closed polyline or a freehand line if you select these first, the application breaks and closes.



Draw--> Circle--> tangential 2points option

This option does not work as I expected. I wanted to draw a circle (green) tangential to the small white circle and then going through two points, the left upper and lower corners on the square, but the application draws the red circle. Indeed the two circles meet the two conditions (being tangential and passing through two points), but the application always draws the red circle. I don't know if this is a bug or can be configured differently to make the green circle.

Best regards

Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

dxli
Hi Quenzo,

could you supply test case dxf files? with some specific and simple steps to demonstrate the issues.

For  your item 1: I don't quite understand the problem you described.

For your item 2: I tested:
a. draw a circle;
b, draw a free hand line, which intersects with the circle drawn in step a.
c, Main menu: Modify -> divide
d, select the circle as entity to divide
e, enable snap to intersection only
f, select an intersection generated in step b.

results: the circle is cut at the point selected at step f. No crash.

tan1_2p.dxf

Quenzo wrote
Hi. In advance, some of these issues can be my mistakes, in this case I 'm sorry.

Modify--> Trim / Extend two option

1 The cut between two figures curves (circle, ellipse, or arc) is made according to where on each figure is selected. It can cut two, cut one (especially if it's between the ellipse and the circle cutting the ellipse like with the normal cutting option), and may also extend a figure (especially arcs) when you expected to be cut.
It seems that the application sometimes isn't sure lengthen or trim the curves, and if it has to cut one or two.
However, with the straight lines have no problem.

2 When you try to cut a circle or ellipse intersecting a closed polyline or a freehand line if you select these first, the application breaks and closes.

For your item 3:  we have serious trouble with our equation solver. We will see whether we can improve it.

Have a look at this dxf file, with the red and green circles has similar meaning, and the intersections of those two circles are the two points to pass, and the white circles are the base circles.

a, start tangential circle 1_2p;
b, choose any white circle to draw tangential circles of it;
c, choose the two intersection points between the red and green circles.

ideally, the algorithm should be able to generate both red and green.

tan1_2p.dxf

Draw--> Circle--> tangential 2points option

This option does not work as I expected. I wanted to draw a circle (green) tangential to the small white circle and then going through two points, the left upper and lower corners on the square, but the application draws the red circle. Indeed the two circles meet the two conditions (being tangential and passing through two points), but the application always draws the red circle. I don't know if this is a bug or can be configured differently to make the green circle.

Best regards

Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

Quenzo
Hi Dxli

For item 1
steps:
a I draw a circle
b Draw an ellipse intersecting the circle
c Main menu -> Move / Copy
d I make four copies Figs. A, B, C, D and E)
d sign with arrows the exact points where I will select each figure.
e Main menu -> Modify -> Trim / Extend two

In the fig A
First entity to cut: ellipse
Second entity to cut: circle

In the fig B
First entity to cut: ellipse
Second entity to cut: circle

In the fig C
First entity to cut: circle
Second entity to cut: ellipse

In the fig D
First entity to cut: circle
Second entity to cut: ellipse

In the fig E
First entity to cut: ellipse
Second entity to cut: circle

I don't understand why the final results are differents
Trim_two.dxf



For item 2
I did the tests with the option Main Menu -> Modify -> Trim / Extend two, I didn't with the option Main Menu -> Modify -> Divide

steps:
a I draw a circle
b Draw a freehand line intersecting the circle
c Main menu -> Modify -> Trim / Extend two
d First entity to cut: freehand line
e Second entity to cut: circle
f The application closes
(Repeated several times)



For circle tangential and two points
a I draw a square
b Enable snap to middle only
c Main Menu -> circle
d Drawing a circle of radius 10 at the midpoint of the right edge on the square
e Enable snap on endpoints
f Main Menu -> circle -> circle tangential 2 points
g When it asks "Specify the line/arc/circle", I select the circle above
h When it asks "Specify the first point on the circle tangent", I select the lower left corner on the square
i When it asks "Specify the second point on the circle tangent", I select the upper left corner on the square

Result:
Tangential_2points.dxf

Best regards

Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

dxli
This post was updated on .
Thanks for the detailed information.

For trim2 logic, the ideal algorithm should figure out the which portion to trim/keep based on clicking positions. More work is needed, espacially for closed shapes (circles/ellipses).

The crashing by free hand line is due to polyline handling. Polyline is currently handled by its own class of operations, not the generic ones. I disabled polyline for trim2, and hide the the crash:

https://github.com/LibreCAD/LibreCAD/commit/ed332c45ee53263adbb4b36458b03997f140f624

More work is needed to see whether we can enable polyline trim2.

Finally, we will need a better equation solver to handle the tangential 2 point bug.

We need high precision and robust, but it requires a new library most likely. For example:

http://eigen.tuxfamily.org/index.php?title=Main_Page
Quenzo wrote
Hi Dxli

For item 1
steps:
a I draw a circle
b Draw an ellipse intersecting the circle
c Main menu -> Move / Copy
d I make four copies Figs. A, B, C, D and E)
d sign with arrows the exact points where I will select each figure.
e Main menu -> Modify -> Trim / Extend two

In the fig A
First entity to cut: ellipse
Second entity to cut: circle

In the fig B
First entity to cut: ellipse
Second entity to cut: circle

In the fig C
First entity to cut: circle
Second entity to cut: ellipse

In the fig D
First entity to cut: circle
Second entity to cut: ellipse

In the fig E
First entity to cut: ellipse
Second entity to cut: circle

I don't understand why the final results are differents
Trim_two.dxf



For item 2
I did the tests with the option Main Menu -> Modify -> Trim / Extend two, I didn't with the option Main Menu -> Modify -> Divide

steps:
a I draw a circle
b Draw a freehand line intersecting the circle
c Main menu -> Modify -> Trim / Extend two
d First entity to cut: freehand line
e Second entity to cut: circle
f The application closes
(Repeated several times)



For circle tangential and two points
a I draw a square
b Enable snap to middle only
c Main Menu -> circle
d Drawing a circle of radius 10 at the midpoint of the right edge on the square
e Enable snap on endpoints
f Main Menu -> circle -> circle tangential 2 points
g When it asks "Specify the line/arc/circle", I select the circle above
h When it asks "Specify the first point on the circle tangent", I select the lower left corner on the square
i When it asks "Specify the second point on the circle tangent", I select the upper left corner on the square

Result:
Tangential_2points.dxf

Best regards

Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

Quenzo
Thank you very much for your effort, and for all people who dedicate their time to this project. Whenever I can, I will test the application as a user (I'm not a code programmer, but I'm an experienced user of CAD and CAM) and I'm going to communicate any error I seeing, is the only way I can help.

Best regards
Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

dxli
It's not trivial to improve the current equation solver. I think it's straight forward to implement a geometrical algorithm here for the "tangential and 2 points" feature.

The current algorithm is based on hyperbola:

for a given circle C, tangential circle of circle C passing a given point P will have its center on a hyperbola, with foci at center of C and P, and the radius of C is twice of the semi-major axis, or r=2a. For simplicity, denote this hyperbola as H(C, P)

therefore, given C, and two points (P1 and P2), the possible solutions are circles centered at intersections of two hyperbolas:  H(C, P1) against H(C, P2)

This algorithm is fine, but our equation solver fails to find all possible intersections of the two hyperbolas: H(C, P1), H(C, P2)

I will implement a geometry algorithm to avoid relying on high performance equation solving.

Quenzo wrote
Thank you very much for your effort, and for all people who dedicate their time to this project. Whenever I can, I will test the application as a user (I'm not a code programmer, but I'm an experienced user of CAD and CAM) and I'm going to communicate any error I seeing, is the only way I can help.

Best regards
Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

dxli
This post was updated on .
It works well here for me, after the commit in master branch:

https://github.com/LibreCAD/LibreCAD/commit/9c7f68ff1ccb3901b677bc9a7473ca43e6703289

The basic idea is to avoid using intersections from two hyperbola.

The new algorithm takes one hyperbola, say H(C, P1), and the perpendicular bisector line of P1 and P2, since any circle passing P1 and P2 must center on this bisector line.

Therefore, instead of using two hyperbolas, a hyperbola and a straight line are used. Reducing the original (quadratic quadratic) equation system to (quadratic, linear) system.

(Quadratic, linear) can be reduced to a single quadratic equation. while the (quadratic quadratic) equation system is reduced to a quartic equation in general.

A minor addition, I also draw centers of possible tangential circles in preview, and you can simply move mouse pointer to be close to one of them to select.
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

Quenzo
Hello Dongxu

Perfect!!
Seeing it in a practical way, you simply found the best solution. Thanks.

Now, another issue: When I draw a polyline arc, the tool options bar have two checkboxes for which the arc will be drawn in the clockwise or the counterclockwise direction. Why has it no effect?

Regards
Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

dxli
HI Manel,

The "Clockwise"/"counterclockwise" direction options are only used for the "Angle" mode, not in "Line", "tangential", or "Radius"

This should be more intuitive with commit:

https://github.com/LibreCAD/LibreCAD/commit/1822dd905bcfe385dae3efbb09ffcbcf3c37623c

which only shows relevant options according to the current mode.


Quenzo wrote
Hello Dongxu

Perfect!!
Seeing it in a practical way, you simply found the best solution. Thanks.

Now, another issue: When I draw a polyline arc, the tool options bar have two checkboxes for which the arc will be drawn in the clockwise or the counterclockwise direction. Why has it no effect?

Regards
Manel
Reply | Threaded
Open this post in threaded view
|

Re: preparation for 2.0.6, any blocker?

Quenzo
Hi Dongxu

Yes, I think what's better that the mouse options are hidden when they don't take action, due to:

1 Often they cause confusion (especially to beginners).
2 When there are mouse options what don't take action on the User Interface, this isn't clear.

Regards
Manel