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.

Creating Curved Solids

Started by Don A, August 29, 2012, 05:44:55 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Don A

     For the last week I've been trying to create a solid of plumbing parts. Elbow's, Traps, 90's ect... For the life of me
I just can't seem to figure it out. I read an older post here (Dr PR link=topic=3055.msg16332#msg16332 date=1281311965)
Which tell you how to do it using the Sweep and Extrude commands but it seems as if I must be doing something wrong.
When using the Extrude command I can get the form but when shaded it appears to shade very light. When using the
sweep command the shading is fine and I think this is the command I would like to use but I can't seem to form an 90
degree elbow or an Trap at all. Could you tell me the correct way to do this using the sweep command. I would evently
like to add threads but that's down the line. I am attaching a sample which I downloaded from the web.

MarkX

With shading, the easiest fix is to change the line color so that it renders differently. There's more complicated stuff you can do with setting lights.

What I would do is start in 2D and draw the curve line I want the pipe to follow. Then I would draw a point marker to remember the center and then draw 2 circles AS PLANES out from the point -- one for the inner diameter, and the other as the outer diameter.

Then I would switch to 3D mode. Select one of the circles and then set its handle at its center using Ctl-H (that's why I draw them out from a point marker -- so I can find the center easily again).  Then use Ctl-Shift-X to extrude along a curve. Select the curve you drew. Repeat the process with the second circle.  Then use solid subtract to subtract the inner drain from the outer drain.

Mark
attachment

Dr PR

#2
Don,

There are several ways to skin this cat.

For constant radius curves, like you find in the trap, you can use the sweep function (Draw/Sweep). Unlike Mark, I would work entirely in 3D mode since you are trying to make a 3D object.

To get smooth surfaces I use circular planes with 36 segments along the edges (one every 10 degrees). This usually creates nice looking surfaces. If you have too many points around the circle the resulting solids will make the file size very large and that will slow everything down.

1. Mark created a solid (red) with the outside dimensions by sweeping a circular plane. Next he created another solid (green) with the dimensions of the opening through the pipe. Then he subtracted (Solids/Solid Subtract) the hole from the pipe. See the top example in the picture below.

There is a potential problem with this method. If the ends of the pipe (red) and the hole (green) are in the same plane the program may not make an opening in the end of the pipe after the Solid Subtract. There is some ambiguity about what you are trying to do when you subtract two solids that share a common plane. I solved this problem by extending the green hole solid beyond the end of the red pipe solid. That way there is no ambiguity.

2. You can get the same result by first creating two circular planes as shown in the lower example. The red (pipe) and green (hole) planes are in the same geometrical plane - DesignCAD tries to render both at the same time and the results are a mixture of red and green. Then I subtracted (Edit/Polygon Edit/Polygon Subtract) the green circle from the red circle to create the red ring. Next I swept the ring to create the hollow curved pipe.

This is a bit messy, because the "Polygon Subtract" function splits the ring into two pieces. I selected both and grouped them to make them behave as a single object.

3. In the lower picture I have done essentially the same trick of subtracting the hole from the pipe. However, in this case the pipe follows an irregular curve - like a radiator hose on a car. I created the red outer and green inner solids with the "Draw/Extrude Along A Curve" function.

First I created the black curve. Next I created the red and green circular polygons. Then I extruded each along the black curve. After that I subtracted the green hole solid from the red pipe solid.

This extrude function is a bit tricky, but it is easy to use once you get used to it. I used "Perpendicular" extrude with a "Degree of Fitness" of 3. There are several different extrude options - play with them to see the different results. For things like pipes perpendicular is the best.

The "Degree of Fitness" is a control of how many segments will be created along the extrusion. Actually, it defines how many segments will be placed between points on the curve. It is important to have lots of points on the curve. If you do not the extrusion will be drawn directly between points, and not necessarily along the curve, and it will have kinks. On the other hand, don't place too many points along the curve or the extrusion will have bazillions of facets and make the file size very large.

Be careful that you do not use a very large "Degree of Fitness." DesignCAD defaults to 100, which is far too large a number. Again, a large number creates more facets, larger file sizes, slower redraws, etc.

Of course I could have created the ring as in step 2 above, and then extruded it along the curve.

4. A few more comments:

You can use the "Sweep" function to produce helices (springs), either with a constant radius or an increasing/decreasing radius. You can even change the pitch of the sweep along the length of the sweep. It is a very complex function and very versatile.

You can use the "Extrude Along A Curve" function with varying scale along the extrusion. Instead of a constant diameter along the length of the extrusion the diameter can be larger or smaller at places. This is another very complex function that definitely takes a lot of practice to get used to it.

Phil
DesignCAD user since 1987

JJG

I'll recall too, as Lar explained it us one time, that in the use of "Extrude Along A Curve", one of the most important tips and tricks is to set 3 handles to the selection (ie hotkey "Ctrl H"), to indicate Designcad how the selection should follow the curve which serves as a guide for the extrusion : the result may vary a lot, depending on how these 3 selection handles are defined.

minstrel

Dr PR,

This one still has me perplexed.

Could you please explain your setup procedure used in your 'extrude along a curve.jpg' example.  You so often advise having the subtracted solid extend beyond the final shape yet my setup attempts always yield both green and red extrudes [as in your drawing] at equal lengths.

I've tried setting point marks along the curve to snap to as well as 'scaling'...  Perhaps you are using two different curves [one longer/shorter] or even the 'extend' function, but how?

Thanks you!
Minstrel

MarkX

#5
Quote from: minstrel on August 30, 2012, 01:17:11 AM
Could you please explain your setup procedure used in your 'extrude along a curve.jpg' example.  You so often advise having the subtracted solid extend beyond the final shape yet my setup attempts always yield both green and red extrudes [as in your drawing] at equal lengths.
This is a "sometimes" problem. It worked fine the first time on  my example, so I just went with it.

Quote
I've tried setting point marks along the curve to snap to as well as 'scaling'...  Perhaps you are using two different curves [one longer/shorter] or even the 'extend' function, but how?
I don't think your snap point makes any difference for this particular function. You just select the line to follow.

I don't know how Dr did it, but I would do the outer tube first. Then extend the line a little. Then do it again with the inner circle.

Mark

Edit: Fixed tube order

Dr PR

Well, I did leave out one minor step - to be completed by the student, as they say.

After I drew the curve for the extrusion I set an additional point near each end of the curve.

In Point Select mode (CTRL 1 toggles this mode) if you select the curve and move the cursor near it, a "+" appears in the cursor. This means if you point and click a new point will be added to the curve. To be sure the new point is on the existing curve I used the Line Snap function (CTRL K) to snap to the curve and set the points.

After I extruded the longer inner "hole" I again selected the curve. Then, still in Point Select mode, I pressed CTRL+SHIFT while moving the cursor near the ends of the curve. A "-" appears in the cursor indication that a point can be removed from the curve. I clicked on the ends of the curve and those points were removed, making the curve shorter.

Then I extruded the outer "pipe" solid.

****

In this case I set the handle of each circular plane at the center of the circle, and positioned the handle on one of the points in the curve. As Mark said, the position of the plane along the curve doesn't matter - it will be extruded from one end of the curve to the other.

The position of the handle does matter, and this is one of the trickiest parts of getting the function to work correctly. In this case, with the handle at the center of the planes, and using the "Perpendicular" extrusion, the solids are created symmetrically around the curve.

****

One other tip. If the extrusion comes out upside down or backwards (this sometimes happens), select the object being extruded, open the Info Box, and click the button with the horizontal red and blue arrows. This reverses the point order in the selected object. You may have to reverse the point order of the curve, or both the curve and the extruded object. t can be totally unpredictable.

Phil
DesignCAD user since 1987

Don A

Quote from: Dr PR on August 29, 2012, 10:37:38 PM
Don,

There are several ways to skin this cat.

For constant radius curves, like you find in the trap, you can use the sweep function (Draw/Sweep). Unlike Mark, I would work entirely in 3D mode since you are trying to make a 3D object.

To get smooth surfaces I use circular planes with 36 segments along the edges (one every 10 degrees). This usually creates nice looking surfaces. If you have too many points around the circle the resulting solids will make the file size very large and that will slow everything down.

1. Mark created a solid (red) with the outside dimensions by sweeping a circular plane. Next he created another solid (green) with the dimensions of the opening through the pipe. Then he subtracted (Solids/Solid Subtract) the hole from the pipe. See the top example in the picture below.

There is a potential problem with this method. If the ends of the pipe (red) and the hole (green) are in the same plane the program may not make an opening in the end of the pipe after the Solid Subtract. There is some ambiguity about what you are trying to do when you subtract two solids that share a common plane. I solved this problem by extending the green hole solid beyond the end of the red pipe solid. That way there is no ambiguity.

2. You can get the same result by first creating two circular planes as shown in the lower example. The red (pipe) and green (hole) planes are in the same geometrical plane - DesignCAD tries to render both at the same time and the results are a mixture of red and green. Then I subtracted (Edit/Polygon Edit/Polygon Subtract) the green circle from the red circle to create the red ring. Next I swept the ring to create the hollow curved pipe.

This is a bit messy, because the "Polygon Subtract" function splits the ring into two pieces. I selected both and grouped them to make them behave as a single object.

Okay, I tried this and it seems to work but my pipe seems to be cut off at the bottom, and there's a noticeable split in the center. What did I do wrong here. Also you stated that you swept the ring and grouped them to create the hollow curved pipe. How did you group them and, did you use the sweep command (W), when I tried using this command I got things that did not look close to a pipe. I used the Extrude Along A Curve command (control, shift, X).

MarkX

#8
Quote from: Don A on August 30, 2012, 06:54:00 PM
Okay, I tried this and it seems to work but my pipe seems to be cut off at the bottom, and there's a noticeable split in the center. What did I do wrong here. Also you stated that you swept the ring and grouped them to create the hollow curved pipe. How did you group them and, did you use the sweep command (W), when I tried using this command I got things that did not look close to a pipe. I used the Extrude Along A Curve command (control, shift, X).
I think you forgot to set the orientation to "Perpendicular". Probably you used "original".

I don't think you want Sweep. You want Extrude along a curve (Ctl-shift-x). Dr. PR was just letting you know about other possibilities for other situations. You might want sweep in order to make threads on the pipes. I think I might prefer to imagine them as PVC glued together  ;)

You could use Solid Add to add the 2 halves together once you have them right (ctl-j).

However, I would skip that approach and go with the 2 planar circles extruded separately along a line. This is a situation where it would great if DC had a shell tool. Then you could just extrude your pipe and shell it to the desired thickness.

Mark

Dr PR

#9
Mark is right - on two counts.

It looks like you didn't use the "Perpendicular" extrude option.

You have several extrude options: Perpendicular, Original, Forward, Backward, Left and Right. Don't expect me to explain them. I have been using the program 24 years and I still can't predict what some of them will do. It all depends upon where the extrude object's handle is and where the object is relative to the curve.

However, for some of these options the orientation of the extruded object (to the XYZ axes) doesn't change as it is extruded along the curve. That is what happened in your example. The "Perpendicular" option makes the plane of the extruded polygon perpendicular to the curve at every point - actually perpendicular to the tangent to the curve at every point. For pipes and such this is what you want to use.

Mark is also right that not all options (and there are a lot of them) are optimal. The example I gave of using polygon subtract to make a hole in the plane before extruding it isn't the best option for making the pipe. It does have the advantage that you don't have to worry about making one extrusion longer than the other - you have only one extrusion.

The "Polygon Subtract" split the ring into pieces because of a peculiarity common to many CAD programs. They have to have a continuous outline around every polygon, and they can't do this for a polygon with a hole in it (actually, they can, but that is a different subject). So the ring is split into two independent pieces. I selected them both and used "Tools/Groups/Group Define" (or the Group icon on the "Main Toolbox") to group them so they behave as a single object.

Phil
DesignCAD user since 1987

JJG

Quote from: Dr PR on August 30, 2012, 08:32:04 PM
... I have been using the program 24 years and I still can't predict what some of them will do. It all depends upon where the extrude object's handle is and where the object is relative to the curve.
...
Phil

Phil,

like you, for more than 15 years, I have use this command "Extrude Along A Curve" with one setted object's handle only , and yes, like you, I still could not predict what the result will do.

But now, since we have discuss about that in another topic, where Lar explained that it is better to set 3 handles instead of just only one, to indicate Designcad how to follow the curve, even in "perpendicular" mode, I have no more difficulties to predict or guess what the résult will be, or, in other word, I obtain almost always the desired result on the first try.
(Indeed, with one setted object's handle only , and depending on the shape of the extruded section, sometimes, without knowing or being able to understand why, this section is extruded from the wrong side of the curve ; 3 setted object's handles will solve this kind of problem)

That's what I was remembered in my post above.
;)

Dr PR

JJG,

Do you know where Lar's post is?

Phil
DesignCAD user since 1987

Don A

Quote from: MarkX on August 30, 2012, 07:12:08 PM
I think you forgot to set the orientation to "Perpendicular". Probably you used "original".

I don't think you want Sweep. You want Extrude along a curve (Ctl-shift-x). Dr. PR was just letting you know about other possibilities for other situations. You might want sweep in order to make threads on the pipes. I think I might prefer to imagine them as PVC glued together  ;)

You could use Solid Add to add the 2 halves together once you have them right (ctl-j).

However, I would skip that approach and go with the 2 planar circles extruded separately along a line. This is a situation where it would great if DC had a shell tool. Then you could just extrude your pipe and shell it to the desired thickness.

Mark

You're right, I didn't set the orientation to "Perpendicular". Everything is fine now, as far as elbow's and traps go. What about "Tee's", would I create a straight pipe then add another?, or is this a question for an new post? This program is amazing and had my mind twisted. If not for all the help I received here I was about to give up. Great support in this community. I'll be trying to create pipes with threads later on. Should I continue my questions in this post or create new post for my DesignCAD 3D plumbing problems. You guys were all a big help, Thanks again and again...

Dr PR

Don,

We could continue here, but it would probably be more helpful to other new users (and us old timers too) if you started a new thread with a title more specific to that problem. It will make it easier to search for the topic.

I agree that the program will do some amazing things, but it can also twist your mind quite a bit until you suddenly have that "satori" moment when it all makes sense.

Phil
DesignCAD user since 1987

minstrel

Thanks DR for the clarification!   Student now work more in Point Select mode. 

Thanks Marc...another way to 'skin that cat'.

Minstrel

ps - I found this link to Lars comments on 3-point handles.

http://forum.designcad.com/index.php?topic=3035.msg16448#msg16448