DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

Line snap to circle failure

Started by Dempsey, December 02, 2013, 04:53:33 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

thanks Rob S.  I'm on your side on this one, lol.

prl,  When DT says it is a limitation that constraints on line direction mean that the line doesn't meet the circle, he is not saying it is a shortcoming, he is simply explaining the modus operandi of that command / combination of commands.

And talk of errors is misrepresenting what is happening here.  The only error here is in the interpretation of those commands, lol :) 

Quote from: DrollTroll on December 03, 2013, 07:33:02 AM
Using angle constraints is much like using OrthoLine. In your case, with Angle Contraint on and you LineSnap to the circle, first it processes the LineSnap (finds some point on the circle, probably not exactly on your line). Then from that snapped point it finds the closest perpendicular point on your line at the constrained angle. Of course, if you don't have angle constraint (or ortho mode) on, the line ends up exactly on the circle because the line can go exactly to the snapped point.
This has been a limitation of Angle Constraint mode and Ortho mode as long as I can remember.
cheers

prl

Quote from: Rob S on December 10, 2013, 08:29:55 AM
Prl, your post gives the impression that Designcad is terminating these lines imprecisely. 

Actually only responding to finding the proper intersections of the lines with the circle (not really caring how the user got there)  but good to hear the other commands are finding the proper coordinates.  Trust but verify.

samdavo

Actually I trimmed lines B and C to the circle ( letting DCAD do the maths :) )
and infobox gives OB as 75.000 000 000 000 014  i.e. only in the 16th digit does it deviate from 75.00.

and btw, OC gives simply "75",  meaning presumably that this is 75.000000000000000  ( I have set Q\Precision  at 15 decimal points ).
So I think we are agreed that trimming works - and that DCAD is "pretty close" :)
cheers

prl

#18
Quote from: samdavo on December 10, 2013, 09:56:14 AM
So I think we are agreed that trimming works - and that DCAD is "pretty close" :)

For point B when you used trim, that's as close as you are going to get.  Ignore the visual distortion, that's a graphics display error, the point should be on the circle, or the circle should pass through the point (whichever way you wish to look at it).

-21.940432659500 -11.125566084081 0.000000000000  (using Sam's trim drawing)
-21.940432659500 -11.125566084081 0.000000000000 (Actual intersection using math)

Looks like IMSI has the code doing the right math. 


Dr PR

#19
I have had a lot of issues with snaps and intersections with circles in the past. In particular, the "Intersect 2" function ("I2") has been pretty unpredictable but it looks like they have fixed it so it works pretty good now.

However, intersections with "circular" polygons and planes created with the "Circle" (O) function seem to find the intersection with the actual circle the polygon/plane is inscribed in, and not with the linear edges of the plane/polygon. I noticed this several times the other day.

In order to get an intersection with the edge of the polygon I had to draw lines (V) along the edges and find the intersection ("I2") with the lines.

Of course, intersections with polygons with many edges can be squirrily because the "I2" function can find intersections with all of the edges near where you want the intersection, and the end point may not be on the edge section you want it on. You have to be careful to place the cursor very close to the desired edge.

****

One other thing - there will always be digitation errors for any calculations that produce irrational results. These errors can accumulate. There is nothing you can do about it.

This is also true with the purely mathematical approach. 1/3 = 0.3333333333 ... to infinity. Any attempt to express this in a finite number of digits will produce an error, and computers are limited to a finite number of digits.

Phil
DesignCAD user since 1987

Lar

Quote from: Dr PR on December 10, 2013, 01:08:54 PM
However, intersections with "circular" polygons and planes created with the "Circle" (O) function seem to find the intersection with the actual circle the polygon/plane is inscribed in, and not with the linear edges of the plane/polygon. I noticed this several times the other day.
I think what happens is that the user clicks on a segment of the vectorized circle other that the one the line intersects with and dcad trims to that segment (ie, if you extend that segment the line would intersect with it).

Lar

Dr PR

Lar,

That's what I thought. But I was very careful to select a specific side of the polygon, and the snap was to the circumscribing circle. I was able to repeat that over and over again.

Phil
DesignCAD user since 1987

longjohn

Hi there everyone.
I just dropped in and I see that you are talking about intersection of lines and circles but I often notice that the K key often misses to extend one line exactly to another. It seems much easier than the line/circle probleme.
I've read all the strings here but can't see that anyone talked about it.
Am I wrong?

prl

Quote from: longjohn on December 18, 2013, 07:11:38 AM
K key often misses to extend one line exactly to another. It seems much easier than the line/circle probleme.

The K key isn't meant for this.  To extend or shorten a line to another line, use the trim or extend commands.  The K key is a snap for setting the next point and means "snap the next point to the nearest line relative to the cursor".

longjohn

#24
Thanks prl but then I dont quite understand the use of K. This is what the command reference says about K

"Menu:      POINT
Menu Command:   LINE SNAP
Shortcut Key:   K

This command moves the cursor to the nearest line and sets a point there. It can be very useful in conjunction with drawing commands. For example, if you are drawing a line and want one of the endpoints to lie exactly on another line, you can use Line Snap to accomplish this without having to "zero in" on the line.

Using the Command

Choose the Line Snap command and set a point near the line to which you want to snap. The cursor snaps to the nearest point on the line and sets a point there.

Example: Set a point exactly on a line in your drawing.

Choose the LINE command again and then, before setting a point, choose the LINE SNAP command. Move the cursor close to the line and click the left mouse button. The cursor snaps to the line and sets the starting point of your second line."

I'm kind of lost here :-\




DrollTroll

Hi longjohn,

Generally speaking, if you're just in a drawing command, and you have NO additional constraints active (like Ortho Mode or Angle Constraint Mode), then yes, LineSnap (K) will set a point on the line, circle, arc, or curve nearest to where you click.

That said, if you DO have a constraint on (Ortho Mode or Angle Constraint Mode), then LineSnap will first locate the nearest point on the nearest line near which you clicked, then work its way backward from that point to the nearest point on the constrained segment being drawn; this point may no longer actually touch the line you selected with LineSnap.
25 years with DesignCAD

Dr PR

Longjohn,

The "Line Snap" (K) comand doesn't extend the end of a line along the axis of the line - the trim commands do this ("E" and "CTRL E").

"Line Snap" moves the cursor to the closest line to the cursor position when the "K" key is pressed. It can move in any direction (if the movement constraints are not on). So selecting the end point of a line in "Point Select" mode and pressing "K" can change the direction of the line.

"Line Snap" is a quick way to set a point somewhere on a line.

Phil
DesignCAD user since 1987

longjohn