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.

Drawing true rounded boxes

Started by MarkX, September 27, 2012, 09:31:33 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Lar

#30
Quote from: prl on September 29, 2012, 07:32:10 AM
OK, I was experimenting with JJG's suggestion and it should work but doesn't.
Prl, your profile is the same size as your radius so dcad ignored those points in the extrude (this is what I am saying in my advice above to ministrel, but you posted ahead of me). I also had to reverse the points of the guide line.

Try this: select the profile and set a handle at the intersection of it and the guide line. Scale by .99 in the Z axis with 'selection handle' enabled (I tried .999 at first but that didn't help). Now extrude along the curve. If the extrude flips over then reverse the points of the guide line and try again. You will get the curve in the extrude.

If you read JJG's post carefully he is saying to put a small fillet in the sharp corner. This is also why I opted for the 'surface connect' command rather than 'round corner' command (sorry, I intentionally did not mention this because it would have been another long story). The round corner command creates a tight point at the smaller end but if you look at real life rounded corners there is always a small arc at the smaller end. When the curve comes to a point the roundness has the illusion of bumping out rather than flowing smoothly. If you look at my tutorial file you would see that all the curves have small radii.

Lar

minstrel

Well, I accomplished my DCAD goals for the week thanks to everyone's help!

Breaktime!

Minstrel




Dr PR

Minstrel,

Congratulations! You (and all of the rest of us) have learned a few new tricks.

Two things have come out of this that are good to remember in any case:

1. With filets, extrusions, sweeps, surface connects, etc. you cannot create a curved line or surface if any part of the result will have a smaller radius than the desired radius of curvature (negative radii are not allowed). You can have zero (point) radius with sweeps, but this can cause problems with other commands.

Do not try to extrude along a curve where the radius of curvature is smaller than the radius of the curve being extruded.

2. Point order is VERY important in DesignCAD. I don't know why, because it is a silly constraint - real world objects don't have "point order." This requirement that you be aware of the point order, even for objects you drew years ago, or maybe didn't even draw yourself, is a major cause of frustration in DesignCAD.

When you draw a line or curve the first point you set is point 1, the second point is number 2, etc.

If you draw a closed line or curve the first and last points are at the same position, but they are two individual points. You can examine individual points in a line/curve by selecting the line and opening the Info Box. The "Point" entry tells the number of points to the right of the point number box. Click the box to get a drop-down list of the points. Select any pointand the "Point Coordinates" will change to show where that point is.

Note: The Info Box will not tell you which point (if any) you have snapped to to select the object. It probably should. And selecting another point from the drop down list should probably change the position of the tempoprary selection handle, or at least highlight the point in the display.

You can reverse point order by selecting an object, opening the Info Box and clicking the button with the red and blue horizontal arrows.

If you edit lines/curves in Point Select mode apparently you can get nonsequential point orders. These can really screw up hatch pours, which seem to be very dependent upon point order.

If you cut a closed curve/line one side of the cut may become point number 1. Reverse point order once or twice to ensure that point 1 is at an end of the curve/line. You can then move one end point to the position of the other to close the loop in Point Select mode.

If you draw a curve and place two points at the same position it will create a sharp point in the curve. You can use this to generate sharp "knuckles" in smooth curved surfaces with the "Surface Connect" function, but it will only work correctly if every template curve has the same number of points, and the double points are at the same position in each curve.

Phil


****

With the "Surface Connect" function even if you do not select "Retain Original Point Order" it sometimes uses it anyway. It is a good idea to ensure that the template lines/curves used with "Surface Connect" are always drawn in the same directional sequence - start at a comon end and end at a common end.

With "Surface Connect" be sure to select the template curves at a common end/side. Otherwise the surface may twist wildly from one side of the curves to the other.

I almost always use the "Smooth" option for "Connection Type" with the "Surface Connect" function. The "Normal" option will not always create smooth surfaces.
DesignCAD user since 1987

prl

#33
Quote from: Lar on September 29, 2012, 08:13:08 AM
Prl, your profile is the same size as your radius so dcad ignored those points in the extrude (this is what I am saying in my advice above to ministrel, but you posted ahead of me). I also had to reverse the points of the guide line.

If your profile has a radius of 2" and your curve has a radius of 2", it should work as demonstrated in the manual method?  Yes all the profiles come together at the interior radius origin.  That is the point (literally). Having to do a .998 scaling on the profile or 1.02 upscaling of the curve doesn't really make sense unless there is an internal bug.  Basically I'm going by the concept if it can be assembled in the real world, DesignCAD should also be able to do it.  If it doesn't make sense in the real world, then I don't mind if DesignCAD can't make the extrusion.  Those cases seem logical.

Thanks for the heads-up.  Another quirk to add to my list of DC quirks.

JJG

#34
Quote from: Dr PR on September 29, 2012, 11:22:56 AM
...
Do not try to extrude along a curve where the radius of curvature is smaller than the radius of the curve being extruded.
...

Phil,

not agreed.

See file attached, and try it : it works.
sorry...

(in the dcd file, there are both the curve to be extrude along, and the profile, with its 3 handles of selection, as Lar's methode to extrude along the curve ; the radius on the corner is 0.01 mm only, and it works ; I tried with 0.000 000 1 mm, and it works too.)

prl

#35
JJG,

Thanks for posting that file!!!  You're doing an outside profile extrusion and I was doing an inside one.  Yours actually builds the corner, mine creates a solid to cut away the corner.  In your case, DesignCAD used the small radius points to fan out the profiles around the corner.  In my case, DesignCAD was suppose to follow the outside line and position the profiles along it thereby pivoting about the radius point (since I had the profile and radius the same).   Thank you! I learned another way of thinking about extrusions and something new about DesignCAD AGAIN.

prl

#36
Lar, I followed your advice but rather than scaling the entire profile, I just moved the radius point on the profile towards the outside curve by .01".  You are correct, DesignCAD did it correctly.  Then I zoomed into the corner and lassoed the small offset points in point select mode and dropped them all back onto the single radius point.  Gives you the same thing as the surface connnect approach which it should be doing.  I'm guessing an internal radius check rounding error, probably from the single precision days.

Also to be clear, in my drawing I'm extruding along the blue line with the segmented arc.  Not the gray arrow.  What JJG is talking about (which I just understood) is extruding along the gray arrow line with a very small radius at the 90 degree corner. The number of points or segments in this small corner will fan out the profiles. 

Since you reversed the curve points, you used a different basic setting.  I used the "Forward" and the 3 handle points described in the Array command. The profile is swept in the point order of the blue line/curve which is indicated by the arrow.


Dr PR

#37
JJG,

Sorry, I was interrupted and had to cut my post short. You did not illustrate what I was thinking about, but you did provide and example of a good way to do the job. In your case the radius of the extrusion was not a negative number because of where you placed the handle. It looks like you placed the handle at the center of the arc of the extrusion object, and placed that at the end of the extrusion curve. That resulted in what I would call a zero radius - the inside end of the extrusion object was directly above the points along the extrusion curve and it was rotated at or outside the extrusion curve.

Placement of the handle on the object to be extruded is very important. In the attached "short radius" image I used your extrusion curve with the rounded corners, and an extrusion object created from the outline of your extrusion. However, I moved the extrusion object so the center of the arc was 2 drawing units inside and below the end of the extrusion curve, with the handle at the end of the extrusion curve. You can see the result of the extrusion in the image.

By placing the object in such a manner I was asking the program to rotate the outside of the extruded object clockwise (as viewed from above) around the points in your extrusion curve, but the inside must be rotated counterclockwise. In effect, the outside of the extrusion had a positive radius, and the inside had a negative radius. Points on the extrusion object were "inside" the point on the curve when it was rotated. Obviously, you cannot generate a smooth unbroken surface this way.

Your example is a very simple one with curves of only one radius and an extrusion curve in one plane, so it was easy to set up. Where this negative radius thing has caught me by surprise in the past was where I was extruding along an irregular line/curve that varied in all three axes and had large and small radii. You must design your extrusion with the smallest radii in mind.

Now look at the "long radius" image below. It uses the same extrusion object, with the same position in relation to the curve, and same handle position. But in this case I filleted the extrusion curve with a radius greater than the radius of the extrusion object. I used the same extrusion settings, and, as you can see, the extrusion worked - more or less. It worked because the radius of the curve was great enough that no parts of the extrusion object had to be rotated in opposite directions.

Unfortunately, this example also illustrates one of DesignCAD's shortcomings - the extrusion is upside down. I tried reversing the points of the extrusion object, and then the points of the extrusion curve. Then I reveresed the points of the extrusion object again. In every case the extrusion was upside down. In this case there was a simple remedy. I rotated the extrusion object 180 drgrees around the extrusion curve, and the extrusion came out right side up. Unfortunately, this trick will not always work with extrusions along curves on three axes.

That is what I was trying to say in the earlier post.

Phil
DesignCAD user since 1987

JJG

Phil and Prl,

Now, with such explanations, I agree, and I'm OK.
Thank you : I learned something too !

prl

#39
Phil, your explanations are thorough though I have a hard time digesting the term negative radius.  Pretty sure we are all talking about the same thing; specifically when DC extrudes along a curve, depending on where the handle is on the grid line AND the radius of the follow-me curve, will DesignCAD be able to surface connect the grid lines or profiles?

For my own benefit, I rather think in terms of profiles and collisions.

My terminology:

grid line:  a line between which DesignCAD maps a face or faces.  Results in a surface or surfaces.

profile:  a 2d grid line that closes a loop.   DesignCAD maps faces between profiles just like it does grid lines since they are one in the same.  Results in a hollow extrusion or solid if the profile is a line or a plane respectively. 

General DesignCAD rules when dealing with single point corners.  (90 degrees, 45 degrees, whatever.)  DesignCAD will miter the corner provided the assembly can be made in the real world. 



Referring to the attached screen graphics: (In every case the path was along the blue line.  In every case the handle of the rectangular profile was at the beginning of the path.)

Case 1A or Case 1B:  Single point corner.  DesignCAD will miter the corner if the grid mapping is physically possible.

Case 2:  A 100% outside curve profile extrusion.  Not an issue.  Any curve radius >0 will work.  The profiles  around the curve "fan" out.  The number of profiles is determined by the number of points in the segmented corner.

Case 3:  Profile is positioned so extrusion occurs on both outside and inside of the curve.  Limiting condition for the inside portion of  extrusion is a profile sweep about an axis, specifically where the profiles pivot at the curve radius = 0.  For the limiting case, the DesignCAD Extrude-Along-Curve FAILS.  The failure is a DesignCAD bug because there is no collision of the profiles and the assembly is valid.  The DesignCAD sweep uses this approach. Workaround is to slightly decrease the profile length so that a minor arc occurs at the radius =0 point.  The attached graphic Case 3 uses this workaround.

Case 4: Collision. Profile is positioned so that inside portion of an extrusion exceeds the curve radius.  DesignCAD FAILS and failure is correct.  DesignCAD can't map the profiles without the profiles colliding.  In the real world, each subsequently placed profile destroys the previously placed profile.  Only way DesignCAD lets you know it failed is by creating something odd. (Looks like it skips all the point locations where a profile collision has occurred and picks up at the next normal position; see the Case 4 extrusion.)

DCD file that created the jpgs is attached.

My Extrude-along-curve settings:  (1) primary profile handle is on blue line and used the "Perpendicular" setting.  Blue line point order is shown by gray arrow.  Orange planes are manually placed profiles that show what is occurring as the Extrude-along-curve attempts to generate the profiles around the curve.

Comments, corrections and additions etc. are welcome.

Dr PR

prl,

Very nice explanation. I agree that my term "negative radius" is not a good one. Your example 4 is what I was trying to describe. Part of the rotation of the object (profile) is outside the axis of rotation (positive radius) and part is inside the axis (negative radius). No matter what you call it the resulting surface would be folded back within itself.

A common use of "Extrude Along A Curve" is to create pipes and cables that snake around other objects. The common way to do this is to center the profile on the end of the extrusion curve. When you do this  the minimum radius of the extrusion curve must be greater than half the diameter or greatest diagonal of the object (profile) being extruded.

I have also wondered about the problem in your example 3. It is possible to sweep an object (profile) around a point on the object, if the point is at an extreme end of the object to that all points of the sweep are at or beyond the sweep axis. In such a case the sweep radius is zero. Extrude along a curve does not do this. I suppose in a perfect program it would.

****

If you want a real mind bender, add variable extrusion scales to the problem!

****

Several people have mentioned using a segmented line for the extrusion "curve" because it gives them better control of placement of the "breaks" where the extrusion process places a cross section. If you use a true curve the program places the breaks between the points defining the curve, may make unnecessary breaks, and this can be somewhat unpredictable. The segmented line works nicely when the extrusion is along straight segments and around constant radius curves. It is also very easy to use simple straight extrusions and sweeps to create these objects. This is what I usually do.

It is much more difficult to create a segmented line for variable radius curves, especially when they bend in all three axes. To do this I first create a true curve that follows the desired path. Then I place tickmarks along this curve and draw a new segmented line by gravity snapping to the ends of the tickmarks. Then the original curve can be erased (or moved to a "junk" layer for possibe reuse). If you place a large number of tickmarks along the curve you can pick and choose which to snap to when drawing the segmented line, so you have few segments along straighter parts and many segments around tight curves. However, in most cases I don't bother and just use the original true curve.

Phil
DesignCAD user since 1987

prl

Quote from: Dr PR on September 30, 2012, 12:07:35 PM
No matter what you call it the resulting surface would be folded back within itself.

Yes, I wish DC would alert you to the collisions or folded back areas rather than just drawing a mess.  It would help us understand the assembly we are trying to create and why it may not be possible to make it. A GPS for extrusions "your tractor trailer size profile can't get around the bend ahead" warning (so to speak).


Quote from: Dr PR on September 30, 2012, 12:07:35 PM
If you want a real mind bender, add variable extrusion scales to the problem!

Its taken me 20+ years with DC to get to this point.   I've never used it and never will. I'll use surface connect with a series of scaled or manually shape altered profiles.

Lar

Quote from: Dr PR on September 30, 2012, 12:07:35 PM
If you use a true curve the program places the breaks between the points defining the curve, may make unnecessary breaks, and this can be somewhat unpredictable.
...
... I place tickmarks along this curve and draw a new segmented line by gravity snapping to the ends of the tickmarks...

When I do this there is normally an opposing curve involved (1) and I use one of the grid surface commands (that asks for number of planes) to generate a surface between the two. I then select the grid surface, vector convert it, then deselect the two new outside *grid* lines I want to keep (the ones that would run along the original curves) and delete the rest. This gives me my vectorized curve with the desired amount of points without having to draw all those points. If I want to get rid of some of the points I highlight them and use 'deletepoints' in the command bar  (actually I have it in a custom toolbox) to delete them all at once.

(1)Note: if there is only one curve I would duplicate it some convenient distance away and generate the grid surface between the two, then delete when I'm done.

Lar

prl

Phil, Lar,  regarding segmenting a true curve, circle or partial circle, looks like we all prefer to control the number of segments (meaning points around the curve).  Of course I use basiccad and have a prl version of the normal DesignCAD segment command.  The difference between the DesignCAD segment command and mine is the number of points generated per subdivided curve member.  The DesignCAD segment command converts a curve into a series of straight line vectors that may have more than two points per subdivision.  DesignCAD is enforcing the distance between segment and fits a vector line to that distance.  My routine reads the DesignCAD segmented curve or line and uses only the first and last point of each polypoint segment should it consist of more than two points.  Basically I get a simple two point line between control points.  Also do a few layer tricks to keep the original curve, etc.  Program is a bit dirty for posting but if you find you need it, let me know.  May be a good starting point for massaging at your end.

Dr PR

LAr,

That's a clever way of doing the job!

prl,

I once posted a feature request to convert curves into segmented lines with distance between points based upon curvature (few points for straighter sections, many points for sections with great curvature). Sounds like you have a macro to do that. It would be very useful.

Phil
DesignCAD user since 1987