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.

Solid subtract leaves cut off behind

Started by Dempsey, December 14, 2013, 06:30:27 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Dempsey

V23.0.

What you see in the image are the teeth of a gear. The two marked teeth where used to subtract from not-shown teeth of the other gear. What I have never seen before is that the cut off pieces are left behind inside the teeth that were used to subtract.

I am using the macros clipzero.d3m and pastezero.d3m (from Lar???) from prl and these are my steps:

  • select the subtracting tooth
  • save it using clipzero
  • solid subtract the subtracting tooth from the to be subtracted from tooth
  • restore subtracting tooth using pastezero
  • and upon investigation I noticed the cutoff pieces left behind in the substracting tooth


'Program: clipzero.d3m (copy to clipboard using 0,0,0 as handle)

if sys(80)=0 then
  Message "Nothing selected. . . routine will end, press any key"
  END
end if

sys(36)=1
>sethandle
{
<type 0
<pointxyz [0,0,0]
}

>copy
{
}
sys(36)=0


end



'Program: pastezero.d3m (paste from clipboard using 0,0,0 as handle)

>paste
{
<pointxyz [0,0,0]
}

sys(1) = 0
sys(80) = 0
regen

end
Dempsey

samdavo

#1
dempsey
...  up close there's a blade on one face (?)  could that be relevant?

Having said that, my sketch has nothing in common with yours lol.

I suppose I should ask the question, do you normally have to extend the cutting tooth so that it leaves only a prismatic cut tooth? (without miscellaneous "non-prismatic" bits?

I also imagine that you couldn't necessarily get away with the teeth having a common plane ( i.e. z-fighting) - but that is surely irrelevant in this case - with all manner of angles with x y and z components (?)

ps when i say prismatic i mean radiating from the centre of the meeting of axes (or whatever :) ) 

ps - a very interesting drawing !! thanks for posting it.

back to your jpeg - it seems to be HLR hidden line removed - yet those lines are there(?)   sorry, i'm confused :)  It's as if you used Solid Segregate, and those slivers are "common to both solids/teeth" (?)

minstrel

#2
Ran both clipzero.d3m - pastezero.d3m and all is 'good' on my DCAD23.

See the attachments of your 'molen' gears [mini version, of course].  And I went at it from both angles [upper/lower subtracts]

All  I can think of is that there may be a difference in you .d3m's than mine.  I compare them asap.

...oh, and by the way, these macro's are a PRL creation ;)

edit - Dempsey - the macros you posted are identical to the codes I used...so there is something else going on.  Why not, if you have not already, isolate the 'gears' in questions and paste them into a new drawing. Then go thru the motions[macros] and see if it still occurs.

samdavo

Ahh - thanks minstrel I think I finally understand the problem. the cut bits of tooth are sitting there like a filling.
(and I was looking at the wrong set of teeth - the problem lies with the top teeth).
And your png shows the correct hole in the tooth (?)

Can I ask please what's the benefit of those macros over simple "copy" and "paste" ?
And the problem would seem to revolve around solid subtract yes? ( rather than the cut and paste stage of the process ?)

minstrel

Quote from: samdavo on December 15, 2013, 02:47:47 AM
Can I ask please what's the benefit of those macros over simple "copy" and "paste" ?

...well for one, it/they automatically set(s) the handles.  This makes for a 'big' smile especially when multiples spheres, cylinders, cones, etc. are involved.

A basic 'copy-paste' approach, in these cases, could become a real challenges should the initial 'focus' be lost.

There are more benefits...see if you can find any.

prl

Dempsey, can you post the drawing with the two solids before you do the subtraction?  Some of the teeth in the current drawing already have extra faces on them so hard to tell.

Lar

Quote from: Dempsey on December 14, 2013, 06:30:27 PM
I am using the macros clipzero.d3m and pastezero.d3m (from Lar???) and these are my steps:
Not my macros, looks like Prl's. Ever since Windows allowed names with spaces and more than 8 letters my macros gets named like sentences, since I have so many of them that I don't use very often and the name has to explain what it does.

Lar


samdavo

 i need to amend diabox to give handles at midfaces of random brisks ( maybe next year ) :)

Dempsey

Thanks guys.

I also noticed that some of the teeth that are cut off are hollow rather than having the cut off face closed. Something is definitely wrong.

I will start from scratch again tonight and use a few teeth only.

Sorry have to run now.
Dempsey

Dempsey

I simplified the problem which has nothing to do with (clipzero or pastezero macros):

Cube A on layer 5 (orange)
Cube B on layer 2 (blue)

Solid subtract cube A from cube B.

The resulting cube B is one solid but the intersection surfaces belong to layer 5!!! BUG

Make layer 5 invisible and  you can look inside the remains of cube B solid.

I checked in V21 and V22 and it has the same problem. I vaguely remember that Dr PR brought this up before, but I cannot find the bug report for it.
Dempsey

Dr PR

Dempsey,

I'm not sure this is a bug (we're into semantics here) - DesignCAD has worked this way since "Solid Subtract" (add, XOR, etc.) were introduced way back when.

The resulting solid always retains the layers of the bits and pieces that result. The resulting solids are composed of surfaces from each of the original solids. When the two solids are on different layers the bits and pieces remain on the original layers.

****

Colors and materials work the same way. DesignCAD may be unique in retaining the colors/materials of the original solids in the resulting solid. This is a really valuable feature when you want to create a cutaway of a solid with the cut edges highlighted in a color different from the original solid's color/material. I use it a lot to produce red or blue cutaway surfaces.

If it didn't do this I would have to explode solids, select edges, assign the highlight color and the reassemble the solid with "Solid Define."

****

One of the major features of DesignCAD is the ability to work with objects that are not on the "current" layer. This was part of the genius of the original program designer that makes DesignCAD easier to use than many other programs.

Think of what a PITA it would be if you had to change to the layer an object is on before you could select it, move it, delete it, change layers, etc. (Photoshop works this way, and it sucks!). When you work with objects on different layers they stay on their original layers and are not moved to the current layer unless you specifically move them (except that nested groups are totally screwed up and violate this "rule").

However, a consequence of this is that when you use "Solid Subtract" it doesn't try to second guess where you want the pieces to end up - they stay on their original layers. If you want all of the pieces on a single layer you have to put them there. Either place the two original solids on the same layer before subtracting (adding, etc.) or select the object afterward and use the Info Box to put it where you want it.

****

There is a real bug that has been mentioned several times where "Solid Subtract" does move bits and pieces from their original layers and changes the materials and colors from the originals. The pieces are usually moved to layer 0 and the material is changed to Aluminum.

Phil
DesignCAD user since 1987

Dempsey

Dr PR,

Okay, you made same good points, and now that I am aware of how all this works I can live with it.

Normally when I work with multiple solids (subtract, add, etc.) I always made sure they in the same layer, that is why I have never noticed this "feature" before.
Dempsey

samdavo

#13
 That red paint evidence is proof that the handle of the hammer hit the ring - rather than the head.

By the way, another example of ALements (layer 0) after subtracting the pink cylinder  ( - the final result looking like a blacksmith making a bangle - including some Aluminium-coloured scale on the redhot metal (2 cents)

Also (just for interest) a large diameter "hammer" blow  (which just warps the ring).

prl

Quote from: Dempsey on December 15, 2013, 04:54:28 PM
Solid subtract cube A from cube B.
The resulting cube B is one solid but the intersection surfaces belong to layer 5!!! BUG

As Phil has pointed out, DesignCAD created a multilayer solid which is fine with me.  I don't consider that a bug.  But multilayer solids are often difficult to select if one of the layers is off.  For help in selecting such a multilayer solid, see the related discussions:

http://forum.designcad.com/index.php?topic=5029
http://forum.designcad.com/index.php?topic=4754.msg29955#msg29955