News:

Please note new Forum URL: forum.designcad.com

Main Menu
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.

Plane Snap

Started by Dr PR, February 03, 2014, 11:08:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

Quote from: Dr PR on February 04, 2014, 03:58:46 PM
... Who knows what "normal" means in this case, but the program does come up with something "perpendicular" to the grid surface.
well as far as I'm concerned Australians are normal, and everyone else is perpendicular (2 cents)

Dr PR

How can Aussies be "normal" if they are upside down all the time? After all it is hot at Christmas and freezing in the middle of summer. You call that "normal?"

Phil
DesignCAD user since 1987

samdavo

as I say to my son,
"yonder belond Ethiopia are the Antipodes (of the Antipodes) - men who have feet against our feet"
(or maybe that was Plato, I forget)

I do like Plato's comment that, when referring to a sphere, it is nonsensical to refer to someone being (vertically) above someone else :)

minstrel

Quote from: prl on February 04, 2014, 04:36:20 PM
...here is a trick you can do with grids...Once you know which way the diagonals go, you can use the perpplane.d3m routine on the original intact grid.

How sweet is that!  Makes for quick work of the 'challenge' [in fact, it's a little too easy! :)]
Another nice macro, prl...thanks!

prl

Quote from: minstrel on February 05, 2014, 01:23:10 AM
Makes for quick work of the 'challenge' [in fact, it's a little too easy! :)]

Minstrel, you are at the head of the class.  (All the others are napping, guess that is to be expected with the youthful group we are.) 

As Bob Ross would say, and your voice and style remind me so very much of him (I mean that as praise),
QuoteAny time ya learn, ya gain.

prl

#20
Quote from: Dr PR on February 04, 2014, 03:58:46 PM
. . . "improper" curved polygon.

I would suggest that DesignCAD mathematically always treats the improper polygon grid as a series of folded proper 3 point planes.  It is only the DC visual rendering routines that smooth it to show a curved surface.  A useful illusion.

My basis being if you were to slice any solid with the grid surface, or make the grid part of a solid and do some sort of solid add/subtract to that solid, you'll see what I mean. Your grid will decompose into its real form.

As with all magic, I may be wrong.  The original coders would know but I fear they may all be legend at this point.

prl

#21
Quote from: prl on February 04, 2014, 12:25:24 PM
A 3d graphical approach is to draw a sphere using the pointmark as the center.  . . . . If you get it just right, the sphere will kiss the grid.

Playing around (with DesignCAD's IDX rendering).


Dr PR

prl,

I think you are right about grid facets always being two triangles. When you use "Surface Intersection" with a polygon and a grid you often get three points for each grid facet - two on the facet boundaries and one where the intersection crosses the hypotenuse of the triangles.

This extra point at the hypotenuse is a real PITA when all you really want is a curve that intersects the edges of the grid facets. I do this frequently when I use an original grid surface to create a new set of template lines for a new grid. I have to get rid of all the hypotenuse points.

It is interesting that when you explode a complex curved grid you get four-sided non-planar polygon facets, and not two triangles per facet. DesignCAD won't let you draw non-planar polygons with the "Plane" function, but it violates it's own rules for polygons created from an exploded grid! And these non-planar polygons can cause you a lot of grief if you use them in construction and when you try to render the drawing.

In the attached picture the grid on the left is intact. The magenta line is the intersection of the green polygon with the light blue grid. You can see the intermediate "hypotenuse" points inside the grid facets.

The grid on the right has been exploded. Then I created all of the intersections of the green polygon with individual exploded grid facets. Notice that the hypotenuse points aren't there. Apparently the facets become individual four-sided polygons, and they are not planar.

****

If you use "Solid Subtract" on a complex curved grid the program will explode part or all of the grid into individual triangles.

****

Is that IDX renderer the Sketchup product or the earlier version for DesignCAD? If it is the DesignCAD version, which version of DesignCAD are you using with it?

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on February 05, 2014, 11:26:40 AM
Is that IDX renderer the Sketchup product or the earlier version for DesignCAD? If it is the DesignCAD version, which version of DesignCAD are you using with it?

IMSI's DesignCAD IDX (beta) on DC 18.3.

prl

#24
Pencils down.  Fortunately Minstrel participated in this challenge otherwise I would have to divide the class grade by zero.  So Minstrel, you get an A for attaboy.


Solution steps.

1.  Key is to find the rectangular grid panel that is closest to the pointmark.  You can do this many ways.  One way is to simply draw a sphere of increasing radius until you just pierce the grid.

2.  Once  you know the proper rectangular grid (4th from the top, and 4th from the right), you need to determine which way the hidden diagonal is positioned in the rectangular grid panel.  That tip is given in a previous post above.

3.  With those two pieces of information, use the perpplane.d3m program BobP refers to earlier.  3 points on the blue triangle, 4th point on the pointmark.

4.  To verify the blue line from the grid surface to the pointmark is indeed perpendicular to the blue plane, create a temporary workplane using the 3 points of the blue plane.   Switch to isometric view in 3d and then measure the angle and distance of the line from the plane to the point mark.  Answers are shown in the graphics below.  DC file attached also.

Dr PR

I think it is a lot easier and faster to just gravity snap to a corner of the facet, then drive the cursor around with the arrow keys until it is over the desired facet. Then use F7.  Just be sure that the line does not snap to an edge of the facet, but that it ends within the surface of the facet.

Phil
DesignCAD user since 1987

prl

#26
Quote from: Dr PR on February 07, 2014, 09:22:48 AM
I think it is a lot easier and faster to just gravity snap to a corner of the facet, then drive the cursor around with the arrow keys until it is over the desired facet. Then use F7.  Just be sure that the line does not snap to an edge of the facet, but that it ends within the surface of the facet.

The point of this exercise was to demonstrate that F7 is incorrect.  If you use the built-in plane snap, you will get the yellow line in the graphic.  It is neither the proper length nor is it perpendicular to the surface.

And for comparison, in the second graphic, the blue line is correct, the yellow line is the plane snap line.

Dr PR

Well, I was thinking your method was incorrect. It finds a perpendicular to a triangle, and not the actual four-sided curved surface.

With a curved surface you can have multiple perpendiculars from a single point, and none of them will be the perpendicular to the triangle you are using. Also, none of them will be the length of the perpendicular to your triangle. So your solution fails in two ways.

What is really needed is to find the tangent to the curve that has the tangent point closest to the point above the surface where the cursor is. Then the perpendicular from the cursor position to the tangent is the best (shortest) perpendicular to the surface. I recall doing this as a geometry exercise some time in the distant past. You can probably find it on one of the math tutorial pages on the Internet.

In any case, how do you know that DesignCAD's solution is not the correct one?

Phil
DesignCAD user since 1987

prl

#28
Quote from: Dr PR on February 07, 2014, 09:41:57 AM
With a curved surface you can have multiple perpendiculars from a single point,

As mentioned above, there is no curved surface only a folded pair of triangular planes, in my opinion.  DesignCAD approximates anything and everything curved using mathematical planar regions.  Again my opinion.

Dr PR

prl,

Yes and no. DesignCAD certainly treats rectangular grid facets as two triangles for some things, like the "Surface Intersection" example. However, it renders them as curved surfaces, so the program does have a way to calculate normals to the virtual curved surface in order to display the proper shading.

So what do you want to do? Find a perpendicular/tangent to the virtual surface the grid represents or to a triangle that represents the imperfect grid?

What does "Plane Snap" actually do? Who knows?

****

This shows the problem I have with the result of the "Surface Intersection" function. It produces a multi-segment vector line that represents the surface of the imperfect grid broken into triangles. I often want a representation of the virtual curved surface. To get this I trace over the surface intersection vector using the "Curve" function and gravity snapping to the intersect points of the edges of the facets only (skipping the triangle hypotenuse points).

The grid is just an imperfect representation of the complex curved surface we want to model. Unfortunately, the real surface has an infinite number of points, and infinities are very inconvenient in calculations. So the program uses a finite grid to represent the infinite surface.

Phil
DesignCAD user since 1987