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.

surface connct and surface patch

Started by samdavo, April 29, 2013, 02:13:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

samdavo

the subject of saddle shapes came up on another thread - hyperbolic para-thingos,  eqn z = x^2 - y^2.
thought I'd give it a go.
Hence the enclosed dcd.
coordinates are calculated over a grid from (-2,-2) to (+2,+2)

More importantly it gives you the chance of doing the shape with either

(the purple one) Surface Connect - stretching a shape over three curved lines (parabolas) in three parallel panes;

(blue) or Surface Patch - joining four lines around the perimeter of a box in "plan"

No question which is the best / better :)  - on this occasion anyway

samdavo


samdavo

#2
So I decided to try to simulate "parallel undulating planes" with 3mm between them - basically a 3mm thick x 80mm diam.  I got there in the end, but I notice that the thickness is only 2.5mm on one check.

Firstly I try Surface Patch. (pretty difficult imho, but I liked the final result above better, therefore persevered) ...
I scale out the original saddle to be 80x80x70 deep 
Hard to explain all the steps - basically I use a small cut of the surface at many points around the perimeter, - compare dx x dy x dz - and basically subtract a tall square prism, and look at the slope of the intersection - then draw a line 3mm long normal to this small surface.

Then modify the parabolas on each side of the square just as before (this time the parabolas are themselves very slightly curved, but Surface Patch still accepts that. This gives a slightly "taller" saddle surface that the original.    Each of these is used to Surface Cut a cylinder (two cylinders each 72mm diam to ensure that the curved 80x80 surfaces fully intersect all edges of the cylinder - then the shorter cylinder is subtracted from the taller.

(more to follow) 

samdavo

herewith the result of that subtraction

samdavo

#4
Finally the Paperspace, and the check of thickness, which (sadly lol) got down to 2.36mm - probably because of the shortcut of not doing more perimeter points of that double curvature.   (PS Now that I think of it, where that measurement is taken is exactly where I "approximated" the direction of the small 3mm vector to give me the thickness - and sure, it would be a bit thinner there as a result).

Maybe it would have been a fraction easier with Surface Connect (?)  but I doubt the result would be as good, or  that the result would have been any more accurate. (probably less so). cheers

samdavo

#5
If you're interested, herewith the two basic sets of parabolas (4 sides of a "square" each) used to draw the bottom and then the top of that pringle saddle).


PPS Maybe I should finally ask the question ( because I have a habit of doing these things the complicated way lol ) - is there an easy way to draw a line perpendicular to a surface?  That would have simplified things a considerable amount. :)

samdavo

ok this isn't just about drawing Pringles flaming potato chips 

You'll see there is a need there to draw an inclined vector say 3mm normal to surface. 

Hopefully someone will tell me an easier way that what I did -  personally, based on replies elsewhere (the thin skinned briefcase thread), I'm assuming that there's no imminent "parallel plane" capability in the offing from the DCAD programmers -

And I don;t know if there's an easy way even to draw lines perpendicular to a plane...

BUT, as per usual,  (and trying to exploit the great strength of DCAD that you - well some of us/you lol - can relatively easily write macros) I don't believe it should be such a difficult macro to draw that 3mm vector (?) normal to that plane.

Suppose the plane is selected, and you pick a point in that plane - call it (xo,yo,zo), then surely the program could check the z coordinate for points  at
1. (xo-deltax, yo-deltay, z1)
2. (xo+deltax, yo+deltay, z2)

3. (xo-deltax, yo+deltay, z3) , and finally
4. (xo+deltax, yo-deltay, z4) 

Points 1 and 2 are diagonally opposite, and give you the local tangent slope ni that direction;

Points 3 and 4 are also diagonally opposite, and give you the local tangent slope in that direction;

Between them, (and between us),  you we should be able to insert a point normal to the plane formed by these two slopes at that point. - maybe two such points, one 3mm on the "normal line", and one -3mm for the "flipped" option.

and if this was a simple macro (which just asked for the length of that line) then it would be real handy - not just for undulating planes, but also for inclined ones, or ellipsoids etc   
Appreciate any assist on this.  cheers sam


JJG

Quote from: samdavo on April 30, 2013, 06:30:10 AM
... - is there an easy way to draw a line perpendicular to a surface?[/u]  That would have simplified things a considerable amount. :)
Why don't you try using the working plane ? this can be automated via macro, and it seems to me that the macros do not put off you ...

prl

Quote from: samdavo on April 30, 2013, 06:30:10 AM
is there an easy way to draw a line perpendicular to a surface?

As JJG mentions, the working plane method is easy.  Or if you are a moth drawn to the macro flame, see here: http://forum.designcad.com/index.php?topic=4782.msg30183;topicseen#msg30183, specifically the pl2p.d3m routine.

prl

Sam,  this is a bit off topic but your thread has reminded me of this.  For the last few years many programs can produce surfaces using a "points" cloud.  For those that aren't familiar with this term, it is simply a data file of x,y,z points (in any order) of some surface, whether a ground surface or a person's face or hand, etc.  A triangular meshed surface is calculated and fitted over the x,y,z  control points.  Maybe you've seen this sort of data collecting on TV for replicating statues or things.  Set up a rotating laser in a room, field, wherever  and the unit spins recording x,y,z data hits as it point maps the surrounding area.

Obviously in this case, the z = x^2 - y^2 equation can directly create the "points" cloud for a grid as large or tight as one wants.   Maybe later this week, I'll play with this.  I'm sure I can massage the DesignCAD surface connect program to read a "points" cloud provided I solve the random data sorting issue.

samdavo

#10
Thanks JJG
(and prl, haven't had a chance to look at your reference yet) 

I'll post this because some of you blokes are probably hitting the sack about now ...

And Don't bother too much with this detail, because I'm confident I've come up with a better way, (and JJG I'm blaming you for that extra brainstorming session as I just walked the dog, lol)
either a new way I've thought of, (called the icecream cone method) or maybe something that comes from checking out prl's reference. 

Certainly I believe you need to use a temporarily-amended working plane.
Question is, how to choose the plane?
What I did above was to intersect the bi-axially curving surface with a tall narrow square prism, (2 x delta,x  2 x delta,y in section)   and get those diagonals I mention above.  I will call these crossed swords,  or rather, a crossing sword over a cross-ee sword.   Now these need not be in the same plane, - so what I did was put the handles of the two swords together, that gives me three points to form a plane, and I set this as temp XY, and, as you say, drew that line.  But like I say, there are better ways , and I won't waste your time on that.

samdavo

#11
here's a heads up on the "icecream cone method"- (and whether or not it works or is time efficient Is still to be determined0 …
1. you have a curved surface, and point on that surface (add a point-mark to be sure).
2. suppose that is a Swiss valley scene, and you want to draw a telegraph poles,  perpendicular to the slope at that point, and 200mm ( or 10m or  whatever)  tall.
3. you draw a small sphere on that centre 
4. you copy everything to one side -  making sure you have diabox available in case you want to copy bits back to the original  incorrect in correct (sheesh, bad typo there sorry)  special orientation
5. ok , you delete the saddle from the sphere (in the copied "shape+biabox")– leaves you (roughly ) a hemisphere - - plus some stuff you have to delete ( here’s where it gets a bit tiresome)  (edit - ahh much easier would have been to find common intersect of the surfaces)
6. you then draw a circle ( 3 point) using three of the points available in the circle of intersection
7. and using that circle, you draw a cone , with a height of 200mm ( or 10m or whatever) …
8. THERE ARE SOME SUBTLETIES HERE  due to the biaxial curvature, but  you can paste that new cone on the exact point of the original “pointmark” if you wish , etc etc
PS. Having tried this, I find it pretty inefficient, due to all sorts of reasons  (2  cents)
I look forward to fully understanding prl and lar’s macro on the same (well similar) subject.

samdavo

#12
At this point I'm gonna decline to post a heap of intermediate steps, and go straight to the "cone of the hemisphere" - hence the ice cream cone analogy  - and i'm sure you can imagine this cone reversed 180 degrees - and becoming the axis of the tree normal to the surface ( as per the original mission,   3 cents) 

samdavo

#13
ahh - works like a dream if you use solid intersect (instead of subtract)
(so much neater to have little discs to work with instead of masses of left-overs from subtract).

In fact , (refer the jpegs) - and here's a trick - when you draw the little spheres, you link them with a line - all in say layer 6.  Then you select everything in layer 6, and use Solid Define, and all the spheres and the lines between become one.  Then when you do "solid intersect" you are left with little discs floating in space.  You could draw a heap of these pines trees ( and with them you obviously have the normal to the surface yes?- but I'll just draw pines because they are clearer)  in a little more time than it takes to draw these 2. 

You then draw the circles on top of the floating discs in the "duplicated workbench diabox" (carefully - zoom in to get the best fit), make the circle radius 4 to match the intended cone, (i.e. I found the ones I had drawn were about 3.96 radius, so expanded that about the centr eto 4) then paste the cone , drawn beside them , 200mm high) onto each circle on the surface.  Then using a handle as a corner of the diabox, paste it back onto the original surface. 

numero uno terrero fino!

samdavo