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.

Cross section tool still doesn't work

Started by MarkX, July 25, 2012, 09:16:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MarkX

Try using the cross section tool on the following. Only the top part gets included in the cross section.

Also used the contour tool and that sort of worked, except that the resulting countour had DEPTH! I guess I would need a macro to flatten it so that it could be hatched.

Finally, while making the bolt I subtracted the spiral from the extruded cylinder. This created "jaggies" on the bottom of the piece. It also "liberated" the bottom cap (grid) of the bolt which I deleted, not realizing what had happened since a subtract shouldn't chop the resulting object into pieces.

Mark

Dr PR

#1
Mark,

Interesting results, and definitely not what I would have expected. I used to see this sort of thing maybe 10-15 years ago right after solids were introduced to the program, but I haven't seen anything like it lately. Maybe the reason I haven't seen the problem is that I learned "defensive" drawing practices when the program was less reliable.

The "scalloped" thread surfaces are odd. They are the result of having a large number of facets in the original cylinder and a very small number of facets in the spiral thread. You will get much better results if the facets are equal. For this you need to create the spiral thread with the same number of iterations in 360 degrees of sweep as the number of facets in the cylinder.

If you think about it the helilcal surfaces are extremely complex - they are constantly varying in three axes simultaneously. In theory the number of "surfaces" is infinite. They cannot be modeled perfectly using DesignCAD's grids (or by any process that creates a finite number of iterations). Then, when you intersect the helical surface with another surface the calculations are nasty - especially if the second surface is not planar (cone or sphere). I am amazed that the program accomplishes as much as it does. Making the number of facets the same in both objects greatly simplilfies the calculations (improves chances of success).

I suspect the ragged end "jaggies" are a result of the same disparity between the numbers of facets. I have occasionally seen cases like this where the end facets are screwed up. In some cases the total number of facets remaining is correct, but some that should have been retained are missing and an equal number of facets that should have been deleted are left in the drawing. This sometimes happens when cutting grids.

I don't know why the end of the cylinder disappeared. My guess is that the end of the cylinder is still there, but the polygon was stretched between the wrong points after the subtraction screwed up the end of the bolt.

A possible problem is that by extending the spiral groove solid beyond the end of the bolt cylinder you are causing the program to try to subtract the groove from nothing. For part of the length of the spiral the program is subtracting the groove from the cylinder, and suddenly it is trying to subtract it from nothing. This leaves some facets hanging and the program can't resolve it (bug). One thing to try is to make the initial cylinder much longer than you want for the end product. Then after the spiral groove is cut you can chop off the end of the bolt with solid Subtract. Newer versions of DesignCAD do a really good job of cleaning up unnecessary facets during a Solid Subtract.

In most cases you can get by with 36 facets in the cylinder (one every 10 degrees around the axis). Then you create the sweep with 36xN number of copies where N is the number of rotations about the axis. The span angle will be 360xN.

For cylinders that will be viewed closely, and for cylinders that will be used with Boolean operations, it is often better to use more facets - 72 or 144.

Phil
DesignCAD user since 1987

MarkX

Thanks Phil,

I applied "Phil's Law of 36" and then trimmed the bottom. It came out much nicer -- see attachment.  Great! (Also beveled the bottom after the trim just like the top).

I realize that the reason my cylinder had so many facets was that I used the "Makeplane" command to convert the circle to a plane. The makeplane command doesn't offer you any options to specify number of sides. I just accepted the result, which obviously was the wrong thing.

The cross section still doesn't work. It generated a couple pieces of the x-section, and that was it. The contour tool worked better, but the resulting contour does have some slight depth. Its made up of little pieces, so I imagine I would have to spend a fair amount of time getting the pieces to join together before I could run a hash.

The cross section tools I've seen in other apps -- no more expensive than DC -- are amazing. They do the "cut" right the first time, and sometimes do the cross-hatch as well.  Also, the cross-cut or contour command should generate the contour or section on the same layer from which you initiate the command. Currently there is no way to pick out the pieces of the cross section/contour except to delete the rest of the model!

The cross-section tool is a heart breaker and should be removed from the menu until it is fixed.

Over all, the process was much lengthier than it should have been.

How long would you estimate that it would take you to make an object like this?

Thanks!
Mark

(model done in v22)

Dr PR

#3
Mark,

26 minutes to make the bolt in the attached files. I don't create threads very often, so I have to experiment quite a bit to get the right pitch, etc. If I did this often I imagine I could have done it in half the time. But if I did this often I would have a file with all standard nut and bolt sizes in it so I wouldn't have to do this repeatedly.

Image 1:
1. I created the bolt head.
 a. Made a hexagon.
 b. Extruded it.
 c. Created a circle and experimented with the radius to get the curvature for the top edges.
 d. Created a sphere with the desired radius and a bunch of facets (72x72?).
 e. Created a cylinder.
 f. Subtracted sphere from cylinder.
 g. Subtracted cylinder from hexagonal bolt head.
2. I added the red cylinder with 36 facets.
3. Then I created the thread cross section plane.
4. I Swept the thread cross section with 360 copies through 360 degrees with a vertical offset of -6.
5. I repeated steps 3 and 4 until it looked OK.

Image 2 and 3:
6. I created the blue cylinder and positioned at the top of the second loop of the thread spiral.
7. I subtracted the blue cylinder from the thread spiral to chop off the top of the spiral so it was flat.

Image 4:
8. I subtracted the thread spiral from the red cylinder.

Image 5:
9. I created the green cylinder.

Image 6:
10. I subtracted the green cylinder from the bolt shaft to get a flat bottom.

Note: It is a bit crude, more like a wooden threaded shaft than a machined metal one. And most machine screws are tapered at the bottom. I could have created a conical solid and subtracted it from the green cylinder before subtracting that from the bolt shaft.

Note: I forgot to select the bolt shaft and head and combine them with Solid Add. They are two solids in the file.

****

I can't take credit for the "Rule of 36." The program used to default to 36 facets for cylinders. It worked, so I kept doing it.

Phil
DesignCAD user since 1987

Dr PR

#4
Mark,

I combined the head and shaft of the bolt created in the previous post with Solid Add.

Then I moved the bolt to a new layer (2) and hid the rest of the drawing.

Then I moved to another layer (3) and used the "Draw/Lines/Contour Line" function to create the contour lines (XY plane) shown in the attached image. I copied (N) the line segments and grouped them. The info mox says the countour lines are on layer 3 and they have zero depth in the Z axis.

So the line is planar, BUT this is a special case where the facets are aligned with edges in the XY plane.

I rotated the bolt 1.3 degrees around the Y axis to be sure no facet edges aligned in the XY plane and repeated the contour line. Again, it was planar with no depth in the Z axis.

So it appears the contour line does work correctly in this case. However, we have seen a few instances where DesignCAD has problems with contour lines and complex solids, where some segments of the line are not created.

In the case of the bolt drawing you posted earlier, the program was obviously having trouble deciding what was solid and what wasn't, so maybe the contour line failure wasn't a surprise.

Phil
DesignCAD user since 1987

Dr PR

Mark,

Finally, I copied the rotated bolt from the post above and moved the copy to a new layer.

Then I used "Solids/Slice" to cut it in the XY plane and remove the near side. It worked OK.

My guess is that all the problems you were seeing resulted from the corrupt solid.

I just had an idea. Maybe the failure of the operations that you saw in your original post had something to do with the number of facets that were generated. If you try to create a surface gris with "Surface Connect" you are limited to a fairly small number of total facets in the grid - there is a post somewhere on the Forum about this.

Maybe the screwed up solid happened when the subtraction of your thread solid from the cylinder with a lot of facets just created a grid with too many facets, and DesignCAD stopped before finishing the job. Just a guess.

If this is the case the program should issue a warning.

Phil
DesignCAD user since 1987

MarkX

Hi Phil,

I think I can take 26 minutes as a good base line for comparison then.

In mine, I used a conical solid top and bottom to taper.

How are you using the little red lines I see in your bolt images?

I understand that the first bolt I showed might have problems with contours, but the final one also had a slight depth and it looks gread. Unfortunately, a tiny depth is enough to make it much more complicated.

Thanks,
Mark

MarkX

I just tried the cross-section tool with your bolt. It fails completely with yours as well, generating just a few little pieces of the cross-section.

Not sure why there's both a contour tool and a cross-section tool, but the cross-section tool seems to fail in virtually all but the simplest cases.

Mark

Dr PR

Mark,

I used the "Solids/Cross Section" function (XY plane) on the slightly rotated bolt from my earlier post. It worked. The Info Box says the cross section is planar with no depth in the Z axis. See attached image.

So why does it work with V22.0 on my machine (XP SP3) and not on yours? I repeated it on my Vista 64 machine and it worked correctly. I wonder if it is a difference in the program settings we use?

****

The Contour tool produces a bunch of line segments. The Cross Section tool produces a plane. Otherwise they are about the same function. I have used the Contour Line function many times to create topographic maps of solids. I don't recall ever using the Cross Section tool - but I have occasionally combined the line segments from a contour line into a plane!

****

The red lines in my earlier drawing are "reference lines" I used for making the geometric constructions. Mostly they are just lines with one end on the central axis of the bolt. I used them for the starting points for drawing the cylinders and the center of the Sweep. Normally I would delete them, or at least move them to a separate layer if I think I might need them again.

Phil
DesignCAD user since 1987

MarkX

Quote from: Dr PR on July 26, 2012, 11:51:12 AM

I used the "Solids/Cross Section" function (XY plane) on the slightly rotated bolt from my earlier post. It worked. The Info Box says the cross section is planar with no depth in the Z axis. See attached image.


Does it work before you rotate it?

I was able to slice the bolt successfully. However, I've found that whenever you slice, there are often 3 or four plane polygons created at the slice point.

Mark

JJG

Hi guys!

interesting this thread!
Just a question for Phil: First, congratulations for explanations very pedagogical and very clear, but why choose a "left" screw thread, and not a "right" one, as the vast majority of "normal" screws ?
Well, a X-miror  and voila!

Dr PR

Mark,

It does work with the non-rotated solid.

I did discover how to make it fail. You need to set two points - the first is the location of the slice plane and the second is the side to remove. If you don't set the second point and just press "Enter" it does strange things.

Have you been seting the second point?

JJG

I made a left-hand thread because I used a positive angle value and a negative vertical offset value. I didn't exactly plan it - that is just the way it happened. I was working in wire frame mode so I couldn't tell left hand from right hand until I had shaded it. I entered all positive values at first, but then the thread spiraled upward through the bolt head, so I changed it to a negative vertical offset.

That's another of the trial and error steps I would have used if I was trying to model a real bolt, so maybe Mark should add another minute to the timing. Or maybe I should just remember that right hand spirals are made with negative angles.

I have been using the program for decades and I still can't predict sweep directions, rotation angles, etc. in 3D - especially if the sweep/rotation axis is at an odd angle. I just try something and if it isn't correct I try the negative values. Fortunately, DesignCAD remembers the settings for the "Sweep" function so it is simple to change the sign of a parameter.

Phil
DesignCAD user since 1987

MarkX

Quote from: Dr PR on July 26, 2012, 02:25:58 PM
It does work with the non-rotated solid.

I did discover how to make it fail. You need to set two points - the first is the location of the slice plane and the second is the side to remove. If you don't set the second point and just press "Enter" it does strange things.

Have you been seting the second point?
Hi Phil,

I've been using the XY plane and picking a single start point. Does that make any difference? Basically, it should work. For me. For you. For everyone. There's nothing there to mess up.

I thought about the direction of the threads, but I would probably have to run out to the garage and remind myself which way real bolts work. Well, I believe the wheel bolts on the driver side of most large vehicles are reverse-threaded, so maybe its for one of them.

Mark

Dr PR

Mark,

The "Solids/Slice" function removes a part of the solid on one side of the plane or the other.

You need to set two to four points for the "Slice" function.

If you pick one of the standard planes (XY, XZ or YZ) you need to set one point for the location of the plane relative to the solid to be cut. Then you must set a point to tell the program which side to remove.

If you choose the "Custom Plane" option you can set three points to define the plane, and then the fourth point to tell which side to remove.


****

However, if you do not set the last point and just press "Enter" the function is supposed to cut the solid into two parts with both parts remaining. I get mixed results on my two machines.

The attached "sliced bolt 2.jpg" image is from my XP machine - it is looking at the solids from the end of the threaded part. It almost worked right, but the bottom surface of the bolt head on the left hand part remained with the right hand part (bug).* The surface cut by the plane was filled in on both pieces to generate a fully enclosed solid.

The "sliced bolt 3.jpg" was created on my Vista 64 machine. As you can see the bolt was cut correctly and all the parts ended up where they should be, but it failed to fill in the cut surface (bug).

I have also noticed that occasionally after the slice some edges of the solid are hidden - not visible in wireframe view (bug). But when you shade the objects all surfaces are there. Looks like the program was trying to hide some edge in a cut surface and accidentally hid the wrong edge.

****

* This isn't a new bug. The program has had this problem in some form since 3D and solids were first introduced back in the dark ages. The solution is to explode the two solids, move the errant polygon to where it belongs, and then redefine both parts to be solid with the "Solid Define" function. A better solution would be to fix the bug.

Phil


DesignCAD user since 1987

MarkX

Here's Phil's bolt #6 after the cross-section tool has been applied. Used the XY plane and the top of the central guide line. Move the bolt components to see the effect. Notice that the bolt head is not sectioned at all and that the lower part with the threads just has little bits.

Mark