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.

Extrude along a curve - handles

Started by samdavo, July 15, 2014, 01:43:23 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

samdavo

I'll post this and move on
Here's what I did last night in a couple of minutes.  (just for info) 
Firstly I drew a very coarse curve based on your curve.

Let's call the guide-line a spiral, with a tight end and an open end.   

The subsequent extruded shape has a change of y value of 1.24 (tight) and 1.10 at these two ends.  (positive superelevation in each case - i.e. higher on the outside of the curve).

weird - I can't (easily) repeat this "almost flat".  Hence I will immediately move on.

samdavo

#16
prl
This time I used your cross section, (with its horizontal base) - including a set of xyzhere axes.

And chose the three handles as you did  (OZY).

And extruded it (forward) along a coarse line similar to yours
a)  firstly with the first point at the open end (1a)
b)  secondly with the line reversed so that the first point is at the tight end (1b)

and the result is a "vee-shaped channel" , where the angle between the wings of the vee seem to be pretty constant at about 148 degrees  (2 cents) 

PS Not expecting anyone to analyse this in detail - in fact I'm just sitting in front of a TV - listening with one ear, but looking at the laptop :)

But still,
I find it interesting that a horizontal cross-section, when extruded along a curve - forward or reversed -  isn't horizontal at either end of the curve - anywhere! 

As Help Notes said,  DCAD decides which way is up :)

 

prl

Quote from: samdavo on July 17, 2014, 02:59:57 AM
forward or reversed -  isn't horizontal at either end of the curve - anywhere! 
As Help Notes said,  DCAD decides which way is up :)

Exactly the issue.  If the follow-me line or curve isn't in one plane, DesignCAD will warp- it-at-will.  But I tamed the beast using some tricks we learned in the topic from 2012.

Dr PR

One thing I find frustrating about "Extrude Along A Curve" is that "up" for the extrusion is not constant - relative to the drawing as a whole.

Apparently "up" is calculated based upon the changes in X, Y and Z directions. So at each iteration of the extrusion up is recalculated. Consequently, if the curve does not lie in a plane, but has changes in all three dimensions, the extrusion rotates around the curve. I have posted about this somewhere else. Attached is an example.

This makes it impossible to create an object that always has a constant "up" direction, like extruding a sidewalk with a horizontal surface up and over a hill.

Phil
DesignCAD user since 1987

prl

#19
Quote from: Dr PR on July 17, 2014, 10:31:15 AM
This makes it impossible to create an object that always has a constant "up" direction, like extruding a sidewalk with a horizontal surface up and over a hill.

But DesignCAD Can! with a little help from me.  I automated that "level wing theory" we discussed a couple years back.  (ref: http://forum.designcad.com/index.php?topic=4580.msg27911#msg27911  Winter of 2013 project)


Reply 10 has a picture and file that demonstrates the difference. Both ramps are extruded along the same path.  The red ramp is native DesignCAD (all warped).  The blue is leveled.

samdavo

Anyway at least it proves that YOU aren't over the hill. :)
Quotelike extruding a sidewalk with a horizontal surface up and over a hill.

prl


samdavo

Brilliant

hey Phil, we ought to give this bloke more challenges ! :)
Throw him a curve ball and he smacks it over the hill and far away.

Is there nothing/anything  he can't do?  if he bends his mind to it ?!
A simple twist (untwist?) of genius.

Lar

#23
Isn't basiccad wonderful.

So, Prl, what method does your macro use to align the profile to the helix? My movie (reply #27 here: http://forum.designcad.com/index.php?topic=4580.msg27911#msg27911) was inspired by demonstrating how to use three strategically place handles to align things to curved lines (that I mentioned and you queried in that thread). Then I cranked up the difficulty by wanting 4 different colors, for the sake clarity while orbiting.

There are other built in ways that can achieve this. Two I can think of are Sweeping and Circular Array, both using a vertical offset and for the span angle multiplying the number of turns by 360.

The attached image shows a set up for a Circular Array. The profile was arrayed then I repeated the c-array command to show the parameters, but with the helix selected to show how, by setting the 'number of copies' to the number of points in the line, each copy lands exactly on a point.

Of course... in the absence of your macro, manually clicking on 101 profiles (to surface connect) is quite a task (times four, for my 4 color profile... and factor in the high chance of clicking on the wrong thing and having to repeat), which is why in my vid I surface connected a small section then duplicated the grids around the helix.

Lar

prl

#24
 ::)
Quote from: Lar on July 17, 2014, 03:46:52 PM
Isn't basiccad wonderful.
So, Prl, what method does your macro use to align the profile to the helix?

It's the trick using the >PerpendicularPlane command at each curve point. My reply #21 in that thread you have referenced.   In reply #22, Phil has a nice graphic.  It applies to any curve but keep in mind the PerpendicularPlane command does fail on certain DesignCAD curves.  So this method always needs to be checked to see if you have one of the problem curves.

A movie - This is the manual way of doing this level wings approach.

And I guess you recognize the rest.  Once you have all the profiles positioned, use SurfaceConnect.

prl

#25
So in case you're interested in what type of curves DesignCAD's PerpendicularPlane command does wrong, an example is attached.  A programming bug that goes back to version 15 at least.  Probably always has been like this.

A movie - A sample curve that the PerpendicularPlane command can't handle

In case it isn't obvious in the movie, the movie ends with a direct front view.  All three planes are NOT perpendicular to the curve.

samdavo

prl
Sorry I couldn't emulate the problem (?)
the "perpendicular planes" appear to be more-or-less perpendicular (?)
(even if I go forward and back along the curve)

prl

Quote from: samdavo on July 18, 2014, 02:40:43 AM
Sorry I couldn't emulate the problem (?)

Put the planes at the curve control points, gravity snap to them. 

samdavo

#28
ok - I see what you mean :)

But the first efforts (between points) appear to be true normal ( 2 cents)
(Note xyzhere drawn after choosing the plane as temp working plane - and z axis appears to be tangential to curve)

prl

#29
Quote from: samdavo on July 18, 2014, 02:59:20 AM
between points

Yes, what you are doing manually with a linesnap or between control points snap is hard to find programmatically since the equation for the curve isn't known.

By using one of the control points, DesignCAD has confused itself.  In some ways I can understand the dilemma.  If you convert that curve to a line keeping the original control points you will have straight lines between control points.  So if you invoke the perpendicular plane command and follow the straight segmented lines everything makes sense, except what is considered perpendicular at the control points (where it changes)?