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.

Another Lovely DC3 idiosyncrasy...

Started by BlankMan, May 08, 2019, 07:44:57 PM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

BlankMan

Here's another nice little DesignCAD 3D MAX idiosyncrasy that happens on occasion.

I'm drawing this project box in the foreground and I want to cut another square hole in the back like the on that's already there.  So I draw a plane, an inch behind the box and want to extrude it, not a 'Box' because it's stepped,  I then PointSelect the Plane for extrusion.

Except. DC3 doesn't show the Plane selected, even thought the dot is smack dab in the center of the Plane in all 3 dimensions, no, it selects the whole project box as you can see in the attached screenshot. Very interesting results if you extrude that.

I provided examples of this behavior to DrollTroll when he was still there. He wasn't really surprised and made the offhand comment yeah sometimes there's no explaining the selection it makes...
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Dr PR

I have seen this happen occasionally for a long time.

DesignCAD seems to select the last object in the drawing list first. Objects apparently change position to the end of the list when they are edited, etc. I'm not certain how this works. Where multiple objects overlap, as in your drawing, it is difficult to predict which will be chosen.

I'm not sure what you mean by "PointSelect the plane." There is no "PointSelect" function in DesignCAD.

What happens if you use "Select Next" ("Enter" key)? Pressing "Enter" should cycle through all possible selections of objects in the vicinity of the handle.

Phil
DesignCAD user since 1987

Lar


By Point Select I think he means "click on some thing with the mouse to select it". PointSelect is a BasicCAD command and it's used to select something with one click (as opposed to DragSelect which means to set 2 point to form a box and select what's in the box).


As for the strange selection, this happens to me many times when I'm selecting Plane entities. Basically, dcad would just ignore any Planes being selected unless you snap at a point or hold the Control key (Ctrl) and drag across it's edges. Even if I go to select a Solid and I click near a Plane in the Solid then the Solid would not be selected. This happens sporadically so it's hard to investigate. Sometimes it seems like it's where you click, some edges (or parts of) giving no response and some edges do.


If other entities share edges and/or points then dcad selects the one that was created first. It's like there's a list of entities and dcad goes down the list until it finds the first eligible item. I think you can enable 'Display Drawing Backwards' in Options\View tab to reverse the searching order. Once something gets selected you can press Enter to select the next eligible item down the list. If you edit an entity.


Lar

BlankMan

Yes, Lar is correct, PoiintSelect uses PointXYZ so that is how I know I selected the exact center of the plane I just drew.

As I mentioned the plane is one inch behind (on the -Z axis) the project box, it does not over lap anything in any way shape or form.

Nothing overlaps anything in this drawing. Shapes/solids are not added, it starts out as one big block and shapes are subtracted to get the end result. This video shows the process.

I experimented with the distance that plane is from the box, at 2, 3, 4 inches the results are the same, selecting the plane actually select the box. At 5 inches behind the box PointSelect'n the plane actually selects the plane.
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Dr PR

#4
This thread is becoming confusing. Are you trying to select the rectangle manually or with a macro using PointSelect?????

If manually, are you using 2D select or 3D select?

2D select is the default, and it ignores depth. Both the plane and the solid overlap with the 2D select, so the last thing in the drawing list is elected first. However, if you gravity snap to the square it should be selected.

If you are using 3D select you can first set the depth to the same as the square and then left click or right click to select it.

Phil
DesignCAD user since 1987

Lar

#5

Quote from: Lar on May 09, 2019, 01:37:34 PM
By Point Select I think he means "click on some thing with the mouse to select it". PointSelect is a BasicCAD command and it's used to select something with
I guess I should have said "... PointSelect is a BasicCAD command and it's used to select something with and I think he is using the terminology to describe a manual action."


But like Phil said, a Point Select while in 2D Select Mode uses what amounts to visual clues (ie, screen pixel distance) to determine what to select (manually or in a macro). If the top-left window was active when the selection was made then the circle being selected is normal, in any other window the square should have been selected (and it looks like the big window on the right was active).


For everything else to be selected then everything else must be a group, solid, block or symbol and the top-left window was active. Or, the whole drawing was previously selected (including the square) then, without pressing Esc to deselecting anything, you clicked on the square to selected it (and it successfully got selected) then you Select-Previous (which would re-select everything except the square).


I don't actually experience any weird behavior when making selections (understanding the first-on-the-list concept), except that every so often a version would do the 'ignore-planes' thing I describe in my post above (well, this is the second version/patch I remember doing it).



Lar

BlankMan

The 3D view is selected. I draw the plane with the macro and I select the plane with the same macro using PointSelect with the PointXYZ and the exact coordinates of the plane, in the X Y and Z axis. If you look closely at the screenshot I included, looking at the front, top and side views you can clearly see the point in the center of the plane that PointSelect using PointXYZ with the exact plane coordinates put the dot in. But the plane is not selected the box is.

I don't know what is so confusing, I'm using the exact coordinates of the center of the plane I know they are because I just drew it using those coordinates. The depth is not in error when you're giving it the exact X Y and Z coordinates.

The macro draws the plane then selects the plane with the intent of extruding it. But when the wrong then gets selected and then extruded it gets pretty weird looking.

Now if I draw that plane 20, 30 inches/units away in the Z or Y axis, no problem selecting it and extruding it and that is sometimes what I have to do. Then SelectMove it back to where I really want it.
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Dr PR

OK, you are using a macro to do the selection.

Each object in DesignCAD has a "surrounding area" in which it can be selected. This IS NOT a property of the object, but is just the way DesignCAD treats nearby objects when trying to decide which of many nearby objects the user is trying to select.

As mentioned earlier, when multiple objects are close together the program defaults to the last in the drawing list.

If I recall correctly, each object has an identifying number/code/name, and there is a way to select by number - if you know the number of the object you want to select.

I think you can assign an identity to objects, so if you give the square an identity when you create it you could select it by name.

****

Note: I do not use any of these identities, numbers, names, etc., so I am not sure they actually exist or how to use them. But I seem to recall some discussion of these things in previous Forum topics.

Any of you macro gurus familiar with this?

Phil
DesignCAD user since 1987

BlankMan

Thanks Phil. I'll look into the identifier idea. If I can assign a name, number, etc. to the plane when I create it with the plane macro command and then use that identifier to select it that just might be the ticket.

As for the area around an object, I draw in inches as my units, so if I draw that plane within 4" from the box and I select the plane the box gets selected. If I draw the plane 5" from the box the plane get selected when the plane is supposed to get selected.

4" is a pretty big area around an object to be considered close IMO. And how can both be considered to be close when I'm right on the plane and the box is 4" away... AND! Wouldn't the plane be the last object in the list since I just drew it?? Or is it then the first in the list since it was just drawn?

And it got worse. As more objects were drawn, like a cover, a base, etc. I had to move the plane away 10" in the -Z direction AND 10" in the -Y direction to be able to select it. THEN 2 others in the -10" in the Z and -15" in the Y direction. That's a really big selection area around an object IMO...

And the more  think about this while we're discussing it, the more I think this problem as I see it is pretty much exclusive to planes.
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Dr PR

The "selection area" around an object has nothing to do with actual distances in the drawing. Think of it as an invisible zone around the image in the screen - everything is at the same Z depth. This isn't quite true, because as you have seen, if the objects are actually far apart (where "far" is ambiguous) only one will be selected, perhaps the closest in the screen image. It is pretty unpredictable.

When I mentioned "3D Selection Mode" I wasn't referring to the 3D view.

The default mode is "2D Selection Mode" where the entire drawing is treated as the 2D screen image and the cursor is 2D (no depth in the image) for selection purposes. So objects that are far apart in depth are treated as if they were 2D images at the same depth. This is where the "selection zone" comes in, and if the zones for multiple objects overlap at the cursor position all bets are off as to which object will be selected first. Normally the object that is closest in two dimensions will be selected first. If there is a tie it seems the last object in the drawing list will be selected but that isn't necessarily the last object drawn. However, when the 2D image of a smaller object lies within the 2D image of a larger object the larger object may be chosen - as in the case you have shown. When you gravity snap to an object the actual cursor depth in the drawing may be ignored for selections.

The "3D Selection mode" treats the images as if it has depth, and you can assign a depth to the cursor. If you gravity snap or use a cursor positioning command to set the cursor coordinates the 3D cursor depth will be used. In this case the object that is closest in three dimensions should be selected first.

Are you using 2D or 3D selection mode?

Phil
DesignCAD user since 1987

Lar


It's the object that was created first that gets selected when two or more selection candidates are equally eligible. You can test this by creating one object then duplicate it so one of each object's points are in the same place. Snap at the point to see what gets selected (the original one will). Now delete the selected object then undo. Now snap again. This time the duplicated object will be selected, because undoing an object does not bring back the original. it just re-creates an identical object. So now this is the last on the list (if you use basiccad to get the id of the objects before and after the undo you see the "original" object's id would be lower than the duplicate before the undo, then higher than the duplicate after the undo).


BlankMan. it is better to select an object by clicking near an edge or point rather than in the center, unless the center has a point or edge running through it. Since you circle is a Plane and not a true circle there is actually no data at it's center.


Since your macro just created the circle then use sys(9), which is the id of the last entity created:

GETATTR sys(9), typee, selectt, la, groupp, redd, greenn, bluee, solidd
selectt=1
PUTATTR sys(9), typee, selectt, la, groupp, redd, greenn, bluee, solid



You can also use sys(9)-1, -2, etc for not the very last object.


You can also set the value of sys(9) at the start of the macro then later, knowing how many objects were created during the macro, be able to pinpoint any of them.




'...start of macro...
e=sys(9)    'say there are 100 entities, then e=100...


'...macro creates 3 objects, you want the second one selected, which would be the 102nd ...


GETATTR e+2, typee, selectt, la, groupp, redd, greenn, bluee, solid      'e+2 = 100+2, =102...
selectt=1
PUTATTR e+2, typee, selectt, la, groupp, redd, greenn, bluee, solid



Or...

...knowing that the 3rd object the macro created is now sys(9), you say...



GETATTR sys(9)-1, typee, selectt, la, groupp, redd, greenn, bluee, solid      'sys(9) now equals 103, so sys(9)-1 = 102 (but don't concern yourself at all what sys(9) equals, just that you want the entity before it)...
selectt=1
PUTATTR sys(9)-1, typee, selectt, la, groupp, redd, greenn, bluee, solid





When selecting stuff with a macro by setting points it's best to switch 3D Selection Mode just before the selection, then back to 2D Sel Mode after the selection. Then there's no ambiguity as to what is nearest depending on the viewing angle. But the macro will have to know or be able to determine it's coordinates.





Dr PR

Lar,

Thank you for explaining! I vaguely recalled being able to get the ID of objects and use it in macros.

Phil
DesignCAD user since 1987

BlankMan

Phil, thanks for shedding some light on what might be going on.

When I'm using DC3 in the lower left hand corner it says, and I quote "2-D Select Mode". So it's in 2D Selection Mode. But I switched to 3D Selection Mode and it makes no difference, the wrong object still gets selected.

But. I never select anything with the cursor and the mouse. I do not draw using the cursor and the mouse. I draw using BasicCAD. 100% of the time. So if I give it a point in the 3 dimensions using PointXYZ it is an absolute point/location and needs no interpretation. I'm telling it the Z depth and not stuck in a 2D world.

So I thought the mode does not matter when you give it an exact point in the 3 dimensions. I'm very surprised if this is the cause that it doesn't.

I just saw Lar's post, going to read it now.
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

BlankMan

Thanks Lar, I'll take a look at sys(9). I'm interested in the e=sys(9) to get the number of objects.

I've been running into a problem where I'll be drawing along subtracting objects from the base object and all of a sudden the base object disappears. It's not a case of a screwed up subtract either.

I'm drawing 3 or 4 unique objects and if I draw each one individually everything is fine but when I try to draw them all at once it gets to a point, the exact same point, and the base object that I'm working on disappears. It I do things in different order a different operation will fail so it's not the operation it appears to be the number of operations that were executed.

I'm running out of something. This happened before. I discussed it with Kevan and he mentioned there's a 5,000 limit on something that will cause this and he said you'd be surprised how fast you hit that limit. I gotta look up the email from him regarding this.

I draw by subtraction. I used to draw by adding and subtracting objects. But adding seems to really screw things up STL wise. By only subtracting I at get STL exports that are fixable, and every STL DC3 export needs fixing. DC3 cannot put out a proper STL and Kevan had acknowledge that fact.
Newbie? Not.
Been using DesignCAD 3D since ~1990
Still have version 4 floppies from 1992...

Lar


I posted an Entity Id  macro in  User Contributions, has lots of options. Check it out...


http://forum.designcad.com/index.php?topic=7212.msg51731#msg51731


Lar