Author Topic: 3D Rotation issue  (Read 416 times)

kchoekstra

  • Full Member
  • ***
  • Posts: 170
  • Recent 6.0 convert since 1985
3D Rotation issue
« on: January 25, 2019, 06:26:35 AM »
Hey folks, I am trying to rotate the left part 180 on the Y axis to have a matching pair. It will not rotate for me. Does anyone else see the same issue? Running V25.0. Thanks in advance for your help. So glad the forum is back running normally.

    KC.

adriank

  • Hero Member
  • *****
  • Posts: 539
Re: 3D Rotation issue
« Reply #1 on: January 25, 2019, 07:49:31 AM »
This appears to be an issue because it is a solid surface, not a solid.
I've never used solid surfaces, but if I explode your solid surface and then re-select the pieces and re-define them as a solid it rotates ok.
Another observation is that the left object is duplicated, but the right one is not and that won't rotate either.
When it is exploded the faces fragment into hundreds of facets because of the holes that wee subtracted, but you can cleanup the resultant solid by using PR's favourite trick of creating a solid cube away from the solid you wish to tidy up and perform a solid-subtract of the cube on the fragmented solid.

Adrian


bdeck

  • Hero Member
  • *****
  • Posts: 925
Re: 3D Rotation issue
« Reply #2 on: January 25, 2019, 12:12:26 PM »
I'm not a 3d guy at all. But either the "m" macro or the "m" command will rotate it about the y axis  as a 4-point move in the top view, so long as the 4 points all have the same y value.

I'll defer to the experts on why the rotate command does not work.  Doesn't appear to have anything to do with the old 180 deg rotation bug (which was fixed in v 18.2)

bd

kchoekstra

  • Full Member
  • ***
  • Posts: 170
  • Recent 6.0 convert since 1985
Re: 3D Rotation issue
« Reply #3 on: January 26, 2019, 03:01:21 PM »
Thanks, guys, I will try those suggestions. FYI the objects were create by extruding a plane. Then i made cylinders that were subtracted to form the holes. Everything was done using planes and solids so I am not sure why it would be a solid surface and not all solid?

  KC

Dr PR

  • Hero Member
  • *****
  • Posts: 5653
Re: 3D Rotation issue
« Reply #4 on: January 26, 2019, 10:01:45 PM »
KC,

Onr of the options in "Options/Options/General" is ""Use surface representation for solid operations" to make objects resulting from Solid Boolean operations be solid surfaces. This was added a couple of version back. I don;t recall what the default is.

It is a good idea to use solid surfaces if you plan to export the drawing for 3D printing, or to export to most other CAD programs. However, other operations that create solids may not create solid surfaces (like "Solids/Solid Define" for assembling a bunch of objects together as a solid).

For solids that are not solid surfaces you can bless them with "Edit/Selection Edit/Convert/Solid to Surface" and they will become solid surfaces.

CAUTION: All of these ideas are supposed to work but I have not tested them exhaustively myself.

****

So what is the difference between a "regular" (old style) solid and a solid surface?

The original DesignCAD solid definition dates back to the mid 90s when 3D was first introduced in the program. At that time RAM was scarce - a few megabytes was a lot of RAM. Furthermore, hard drive capacities were only a few tens of megabytes. The largest file size DesignCAD could handle was less than 60 megabytes. The classic solid definition creates a very compact (bit wise) object definition. To do this solids must be regular arrays- they cannot have holes, etc.

Where possible, regularly repetitive elements (like the sides of cylinders) were formed as grids, which are also regular arrays. These are represented as "fishnet" surfaces made of rectangles, bit in fact some time after V15 these rectangles were reworked to be made of right triangles with common hypotenuses. They were still displayed as rectangles, but the triangles made it possible to represent curved surfaces more accurately. But it could be very difficult to align the points in one grid with points in another grid that formed parts of the same solid. This resulted in tiny gaps between the surfaces - "leaks" from the outside to the inside. This didn't matter initially because there was no way to export these 3D files to other programs.

When a grid is exploded the single compact array definition explodes into many individual triangles. One compact array definition can become thousands of triangle definitions. When you punched holes in these basic solids (boxes, cylinders, pyramids, etc.) they were broken up into their respective planes and grids and the resulting pieces were defined to be "solids" just as "Solid Define" does it. But the object size in RAM expanded greatly because the solids were no longer regular arrays. If a solid contained complex curved grid surfaces, exploding the grid caused the object size in RAM to expand more than 10 times in many cases - real memory hogs.

Today our computers have many gigabytes of RAM and terabytes of hard disk storage, and few CAD files ever exceed a few hundred megabytes. I'm not sure what the largest file the latest versions of DesignCAD will work with, but I have created 730 megabyte files.

Solid surfaces are defined from the beginning as collections of triangles. They may still be displayed are rectangular facets,  but they are all triangles, and they do not have to be right triangles (for example, "Buckyballs" or geodesic domes are formed of equilateral and isosceles triangles, with no right triangles). This is how most other CAD programs represent surfaces, and it the basis of many 3D CAD file formats. More important, they do not contain "leaks" or places where facets do not align properly. This allows a far more accurate surface representation. Furthermore, they can be exported directly to other programs without loss of accuracy. Older solids with "leaks" can cause 3D printer drivers to reject the files. These have to be patched to plug the leaks.

Most important - 3D printer (STL) files use triangles for surfaces. Solid surfaces can export directly to STL files.

Phil
DesignCAD user since 1987

adriank

  • Hero Member
  • *****
  • Posts: 539
Re: 3D Rotation issue
« Reply #5 on: January 27, 2019, 12:16:19 AM »
Phil, thank you for taking the time to post that very detailed description of what a solid surface is.
I had been vaguely aware of it's introduction but never experimented or tried working with solid surfce.

The Designcad online help reference is no use at all - topics of 'Solid Surface' or 'Solid-to-surface' get no results so nobody seems to be keeping that resource updated...

A brief experiment by both creating a solid surface object and converting a solid to a solid surface did not result in any problems in rotating the object, so it's possible that KC's issue may not be relating to solid surface, but possibly some other bug in the solid?

Adrian

bdeck

  • Hero Member
  • *****
  • Posts: 925
Re: 3D Rotation issue
« Reply #6 on: January 27, 2019, 08:27:54 PM »
An Observation:

1) In the downloaded drawing, the figure on the left appears actually to be 3 ungrouped copies ot the figure on the right.  (2 of those might possibly have been created by performing rotate/make copy without first performing a group define)

2) If any one (or more) of the figures is selected, and the Group Define command is executed, then the Rotate command will work.

3) After a number of  GroupDefine, GroupExplode, and Rotate commands have been executed, Rotate begins to fail on these initial figures, even though rotate might still work on a simple solid added to one of the groups.

This is all too deep for me.

Perhaps this method fell through the cracks?

bd

Dr PR

  • Hero Member
  • *****
  • Posts: 5653
Re: 3D Rotation issue
« Reply #7 on: January 28, 2019, 02:17:12 AM »
Sorry for the delay.

I initially tried opening the file on DesignCAD V24 on my laptop and the program shut down immediately after loading the file. I don't remember, but solid surfaces may have been introduced after V24.

I opened the file in V27 on my work station and I see the problem! The left part appears to rotate (R) normally with the drag mode rotation as the mouse is moved, but when I release the mouse button it snaps back to the original orientation.

Also, there are three objects on the left as bd said, and the original right object also "refuses" to rotate.

****

"Mirror" (/) also fails. A mirrored copy of the right object does appear as I drag the mouse, but when I left click again the mirrored copy disappears and a new copy appear superimposed on the original right copy. This is the same if I mirror on the X, Y and Z axes.

****

The rotated and mirrored copies all return to the position of the original object, as if there is something special about the original location. However, "Move" (M) and "Duplicate" (N) seem to work OK and you can freely move or duplicate any of the original or copy objects.

****

There is something else that is very peculiar about this object. The Color tool bar shows only shades of gray instead of the normal selection of colors. Aha! The layer has an assigned color. Nevermind!

The material is "Aluminum." Perhaps this is intentional, but I have discovered that the Solid Boolean operations occasionally corrupt the material and layers, and all or part of the new object becomes "Aluminum." Usually some bits and pieces (grid facet planes, etc.) are transported into never never land - often to layer "0" but there is nothing on layer "0" in this file. All objects seem to be on layer 1.

I moved a copy to layer 2 using the Info Box. This should bring all the bits and pieces back into a single layer if the solid Boolean operations had scattered bits and pieces. But after this the "Rotate" and "Mirror" functions still failed except for making new copies at the original position.

I changed the material to "Default" and changed the color to cyan (light blue-green). This material/color allows closer inspection of the shaded object. There are some odd out-of-plane surfaces.


****

Now this is strange! "Rotate" no longer makes a new copy in the original position! I have no idea what I did to change this. "Mirror" still makes a duplicate copy in the same position.

****

I tried copying the object to the clipboard, opening a new blank file, and pasting the object into the blank file. This often "uncorrupts" objects. But in this case, no joy. In the new file the object still won't rotate or mirror correctly.

****

Whoa! Something else bizarre! If I try to create a new object (a  3D "box" or cube) anywhere near the object after the first mouse click to position the first corner the program automatically snaps to some point on the object and completes the operation!

For some reason the program is automatically snapping to points on the original object to finish commands! That's why rotate fails - the object automatically rotates to match points with the original. Maybe that is why "Mirror" also fails - the points of the mirrored copy are rotated and moved back to their original positions?

But if I start the "Box" function some distance away from the original object I can create a new cube in the normal way.

****

As Adrian says, exploding the original solid, selecting the parts, and redefining as a solid (Solid Define) creates a new normal solid that rotates and mirrors correctly.

Subtracting a cube (Box) (positioned some distance away) from the reconstituted original solid does clean up the plethors of individual triangular facets in the original solid.

Phil
DesignCAD user since 1987

bdeck

  • Hero Member
  • *****
  • Posts: 925
Re: 3D Rotation issue
« Reply #8 on: January 28, 2019, 03:24:34 PM »

I tried copying the object to the clipboard, opening a new blank file, and pasting the object into the blank file. This often "uncorrupts" objects. But in this case, no joy. In the new file the object still won't rotate or mirror correctly.

Hi DrPR,
I had noticed that I could paste these objects into version 26, but not into version 17.

Whoa! Something else bizarre! If I try to create a new object (a  3D "box" or cube) anywhere near the object after the first mouse click to position the first corner the program automatically snaps to some point on the object and completes the operation!

I had the same problem, which now explains why I could not set the second point in a second window. Thanks

As Adrian says, exploding the original solid, selecting the parts, and redefining as a solid (Solid Define) creates a new normal solid that rotates and mirrors correctly.
When it is exploded the faces fragment into hundreds of facets because of the holes that wee subtracted, but you can cleanup the resultant solid by using PR's favourite trick of creating a solid cube away from the solid you wish to tidy up and perform a solid-subtract of the cube on the fragmented solid.

Edit/selectionedit/convert/explode  failed when I tried it.

However:

I selected one of the objects.
I identified the selection as a Solid Surface from the info box.
Then performed edit/selectionedit/convert/surfacetosolid.
I identified it as a solid. from the info box.
Rotate failed
I deselected and reselected it.
Rotate  succeeded.
Mirror worked, too.

No need to groupdefine/groupexplode.

Thanks to kchoekstra, adraink, and DrPR.
I hope all this sleuthing is helpful to our friends in Pakistan.
Happy New Year to all,
bd




Dr PR

  • Hero Member
  • *****
  • Posts: 5653
Re: 3D Rotation issue
« Reply #9 on: January 28, 2019, 10:30:36 PM »
bd,

By "exploding' I meant "Solids/Solid Explode."

I didn't think of the "Surface to Solid" option - good point!

I guess if we really want solid surface objects we should work with the original solids and then use "Edit/Selection Edit/Convert/Solid to Surface" to make them into solid surfaces.

Phil
DesignCAD user since 1987

bdeck

  • Hero Member
  • *****
  • Posts: 925
Re: 3D Rotation issue
« Reply #10 on: January 29, 2019, 08:20:57 PM »
bd, ... I didn't think of the "Surface to Solid" option - good point!

I didn't think of it either, just stumbled upon it.  I had never looked that far down the menu before.