Author Topic: Gravity snap failure  (Read 5213 times)

Lar

  • Hero Member
  • *****
  • Posts: 2745
Re: Gravity snap failure
« Reply #30 on: February 01, 2016, 02:16:54 PM »
Phil, looks like your regular routines cover all the bases, yet you still have the no-selection problem. Here's a few extra tips that may help out (if you don't know them already):

a] Maybe dcad is full screen but is not the active app. This sometimes happens to me when using multiple monitors. You are looking at one screen with dcad on it but something on the other screen is active (if the other one is a touch screen maybe a paper or wire is touching it or a bug landed on it). In this case shortcut keys, right clicks, mouse rolls and anything other than a left click (in the dcad window) appear to not be working. A left click would work since that would make whatever you click in dcad active.

b] Maybe the Selection Filter is open but off screen or folded up somehow, and you just don't notice it. Since the sel-filter is so big I fold it up so only the title bar shows and move it up on the side of the main menu. I usually remember when I do this but there are times when I forgot and then try to select unfiltered things. You could also be intentionally using the filter but what you think you're filtering is actually blocked.

c] You may think all your layers are on and unlocked but maybe some are off/locked. 'Unlock All' will give you access to these off/locked layers only temporarily. Later that access will be gone. What you should do is 'Show All' first, then 'Unlock All'. This wouldn't work for me because I could have any number of layers off and/or locked at any time. I would have to run a macro to save the status of all my layers before clicking those buttons, then when done run the macro to set the layers back the way they were.

Lar
« Last Edit: February 01, 2016, 02:19:09 PM by Lar »

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #31 on: February 01, 2016, 02:32:17 PM »
Lar,

Thanks. I'll keep trying to chase this one down.

For what it is worth, "Unlock All" does unlock all layers, visible and hidden. I have used this trick innumerable times to allow selection of solids with parts scattered to the wind on hidden layers by the solid Boolean operations. Then the "A+" key in the Layers tool bar, or the Info Box, is used to round up the scattered parts and place them on a single layer.

Actually, the Info Box is better, because when the solid Boolean operations scatter parts to different layers the wayward parts are usually changed to the "Aluminum" material, regardless of what materials the original solids were. So in addition to bringing all the parts back to one layer I also change the material back to what it should be ("Same As" finger on parts of the solid that haven't been changed).

Phil
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2745
Re: Gravity snap failure
« Reply #32 on: February 01, 2016, 02:52:26 PM »
For what it is worth, "Unlock All" does unlock all layers, visible and hidden.
Sorry, what I meant is that it unlocks the layers but doesn't turn them on, and for a short time you will be able to click on multi-layered stuff (with stuff on off layers) and they will be selected. Later on you won't be able to select these things, and will have to click 'unlock all' again.

This dcad way of functioning is perfect for me, by the way. I only need it for multi-layered stuff right there and then. Later on I want the normal functioning.

Lar

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #33 on: February 01, 2016, 09:27:11 PM »
Lar,

Agreed! If they ever eliminated the ability to unlock hidden layers DesignCAD would be almost useless for 3D drawing because of the random scattering of parts of solids by the solid Boolean operations. In huge cluttered drawings it would be very difficult to select the desired object with all layers visible!

Phil
DesignCAD user since 1987

Lar

  • Hero Member
  • *****
  • Posts: 2745
Re: Gravity snap failure
« Reply #34 on: February 07, 2016, 09:01:10 AM »
DT,
Using v23  I have found a macro (at end of this post) that causes the 'right clicking invokes Select-Drag rather than selecting something, which can be cured by left clicking' phenomenon. It happens pretty consistently on my machine but after repeating the macro a few times the problem may go away. I need you guys to test it on your machines.

<<The purpose of the macro is to see the point start and direction of a number of selected entities. You can tell the order because the first 3 points will be marked with pointmarks, each one smaller than the previous, and colored red, green and blue (RGB)>>

INSTRUCTIONS:
0] turn off point select mode, if it is on...
1] Select an entity that you would want to know the point order of, like a line or plane  (note: the macro can be used for more than one entity)...
2] Run the macro...
3] Click 'Yes' at the first message box...  <<this option allows the user to examine the pointmarks by zooming in, panning, orbiting, etc >>
4] When done examining the pointmarks press Esc or click the mouse (for this test don't bother examining, just click or press Esc to move to the next step)...
5] On the next message box click 'No' to end the macro without deleting the pointmarks...
6] Now right click on something else to select it (point select mode should be off)... rather than the entity being selected you will get the 1st point of the 'drag select' command (you will see the blue selection box as you move the mouse).

You can set the 2nd point and continue right clicking to get the drag selection command (as long as point select mode is off). Left-clicking-to-select or calling up a drawing command will end the bad behavior. If point select mode is on then you will get only 1 drag select command then right-click-to-select should be working again.

I've marked the end of the test with a bunch of '*******END TEST****** so DT don't have to hurt his head more than necessary if he decides to examine the cause of the bad behavior. My guess is that 'setpoint' causes the problem somehow. After discovering this I tried with the 'set view' command when only the 1st point is set and it happened a number of times, then stopped.

Remember to test in v23. I also tried v25.2 but it doesn't happen there.

Code: [Select]
'Lar, Nassau Bahamas, 5nov12
'Macro to show the first 3 points of a selection of entities, each one smaller than the previous and colored red then green then blue (RGB), to show point order...

'16mar14: revise to fit selection to screen and use selection size to determine pointmark size (works perfectly at pointmark being 1/12th the size the average of the x, y and z bound box size...
'7feb16: added code to deal with entities with less than 3 points...

sys(36)=1  'silent mode to supress PMark dialog boxs, which could be many... turn off at end.


' ****************   Setup  *****************
precision 0

'Choose display point color, size and type
red=255
green=0
blue=255
ptt=3        'type


'check if sel when created is enabled and if so then disable, remember so to turn back on...
if sys(242)=1 then   'select when created
sel_whn_cre=1  'use this to turn back on...
sys(242)=0
end if

' ***************** end setup **************


top:

'if nothing is already selected then end macro since most likely selecting more than one entity, which is difficult while macro is running...
if sys(80)=0 then
 
sys(1027)=1  'message box style = OK,1/Cancel,2

message "Nothing is selected<<if you're sure you selected something then ~Select When Created~ may be enabled>>. Macro will end so you can select entities and restart...."
end
end if

sys9=sys(9)  'get total of entities for undoing new pointmarks at end...

'get selection----------------------------------------

sel=sys(80)

'fit selection to screen, first find min and max x, y, z, then zoom...
minX=sys(196)-((sys(198)-sys(196))/20) 'Minimum X of selection bounding box, with 50% more so not tight on screen
minY=sys(197)-((sys(199)-sys(197))/20) 'Minimum Y
minZ=sys(200)-((sys(201)-sys(200))/20) 'Minimum Z

maxX=sys(198)+((sys(198)-sys(196))/20) 'Maximum X
maxY=sys(199)+((sys(199)-sys(197))/20) 'Maximum Y
maxZ=sys(201)+((sys(201)-sys(200))/20) 'Maximum Z

>ZoomWindow
{
<pointxyz [minX, minY, minZ]
<pointxyz [maxX, maxY, maxZ]
}

'now size pmarks to 1/4 average of the 3 value above...
valX=maxX-minX
valY=maxY-minY
valZ=maxZ-minZ
'
'this should never happen but if selection size = 0 then abort macro...
if valX+valY+valZ=0 then
message "ERROR: Selection size=0, indicating somethig is wrong. aborting macro..."
End'end
end if

'...set pointmark size (see above)...
pss=(((valX+valY+valZ)/3)/4)   'pmarks sized to 1/4 average of the 3 value above (2nd will be 1/2 this, 3rd will be 1/4 this)...

'get their entity numbers into an array...
dim ent(sel)

for ee=1 to sel
getselect ee, ent(ee)
next

'----------------------------------------------------------------------get selection

'big run: select entityes one at a time, get first 3 points, place pmarks-------------

sys(80)=0   'deselect all...

for eee=1 to sel
entity ent(eee)
if sys(1)=0 then goto nex   'if no points, just in case...
pointval x, y, z, 1
'***
if sys(1)=1 then  'if entity only has 1 poin, just in case...
x2=x1
y2=y1
z2=z1
x3=x1
y3=y1
z3=z1
goto pas_pvals
end if
'***
pointval x2, y2, z2, 2
'***
if sys(1)=2 then  'if entity only has 2 points...
x3=x2
y3=y2
z3=z2
goto pas_pvals
end if
'***
pointval x3, y3, z3, 3
pas_pvals:

'place pointmarks...
>Pointmark
{
<Color [255, 0, 0]  'red for first p-mark
<Type 3     '1=cross, 2=box-cross, 3=circle-cross, 4=box-circle-cross, 5=dot (heavy smaller circle)
<Size [pss]
<Pointxyz [x, y, z]
}

>Pointmark
{
<Size [pss/2]
<Color [0, 255, 0]  'green for 2nd p-mark
<Pointxyz [x2, y2, z2]
}


>Pointmark
{
<Size [pss/4]
<Color [0, 0, 255]  'blue for 3rd p-mark
<Pointxyz [x3, y3, z3]
}

nex:
next   'for eee=1 to sel...

'-----------------------select entityes one at a time, get first 3 points, place marks


'closing out------------------------------------------------------------

'turn back on select when created if it was turned off...
if sel_whn_cre=1 then sys(242)=1

sys(1027)=3  'message box style = Yes(6), No(7), Cancel(2)

'reselect originally selected stuff...
for eee2=1 to sel
'''''entity ent(eee)
GETATTR ent(eee2), typee ,selectt, la, groupp, redd, greenn, bluee, solidd
selectt=1
PUTATTR ent(eee2), typee ,selectt, la, groupp, redd, greenn, bluee, solidd
next   'for eee2=1 to sel

regen


message "****CLICK YES HERE THEN LEFT CLICK ANYWHERE IN THE DRAWING******-Done--- YES=Examine PMarks (Esc when done), NO=Keep PMarks and End, CANCEL=Delete PMarks and End..."

'if yes...
if sys(1028)=6 then   '...<1st>
sys(36)=0  'silent mode off, otherwise you won't see cursor changes (eg if you orbit)...
setpoint "Examine PMarks... Esc or Click in window when done." 1
sys(36)=1  'silent mode on again...

'now ask again...
sys(1027)=4  'message box style = Yes,6/No,7
message "****CLICK NO HERE, MACRO WILL END... THEN TRY TO RIGHT-CLICK-SELECT******-Do you want to delete PMarks before ending?..."
'if No <2nd>, end...
if sys(1028)=7 then
sys(36)=0  'silent mode off for ending...
end
end if

'if No - keep pointmarks...
if sys(1028)=7 then
sys(36)=0  'silent mode off for ending...
end
end if

'**********END TEST******************************
'**********END TEST******************************
'**********END TEST******************************
'**********END TEST******************************

'if yes...
if sys(1028)=6 then   '...<2nd>
for undoo=1 to sel*3  'total number of new PMarks (3 times the number originally selected)...
>undo
{
}
next 'for undoo=1 to sel*3...
regen
sys(36)=0  'silent mode off for ending...
end
end if   'if sys(1028)=6 then   '...<2nd>

end if   'if sys(1028)=6 then   '...<1st>


'if cancel <1st> - undo...
if sys(1028)=2 then

for undoo=1 to sel*3  'total number of new pmarks (3 times the number originally selected)...
>undo
{
}
next 'for undoo=1 to sel*3

regen
sys(36)=0  'silent mode off...
end
end if   'if sys(1028)=6 then...


'------------------------------------------------------------close out




« Last Edit: February 07, 2016, 09:09:17 AM by Lar »

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #35 on: February 07, 2016, 08:40:41 PM »
Lar,

It works as you describe on V25.1 16-Oct-15.

I have seen the blue drag selection box happen in place of a gravity snap many times - DT has mentioned that he sees it occasionally. It hasn't been much of a nuisance because after pressing "Escape" everything works OK again, so I have never bothered reporting it. Your macro should help in hunting down the cause of this aberrant behavior.

But this may not be the same problem I have been seeing. Pressing "Escape" doesn't cause gravity snap selection or left click selection to start working again after they have failed.

****

You mentioned that the "Set View" function would sometimes cause right click gravity snap to fail to select something. I use the vc.d3m macro all the time, and it runs the "Set Viewer Points" function and sets only the first point, so maybe it has something to do with the problem I have been seeing.

Phil
DesignCAD user since 1987

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #36 on: February 18, 2016, 08:43:11 PM »
I am still seeing this problem (gravity snap selection failure) occasionally with V25.2x64 18-Dec-15.

So it wasn't a faulty V25.1 installation.

Phil
DesignCAD user since 1987

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #37 on: June 13, 2016, 08:49:53 PM »
Still having this problem with V25.2x64 18 Dec 2015. Win 7 Pro 64.

Gravity snap fails to select an object (it does snap the cursor to a point on the object) every time after the following sequence:

Draw a line (V) by setting one point with "Intersect 2" and then setting the second point with "Point Relative."

After this I cannot select anything with gravity snap until after I left click to select something. Then gravity snap starts working again to select things.

Phil
DesignCAD user since 1987

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4216
Re: Gravity snap failure
« Reply #38 on: June 14, 2016, 05:44:32 AM »
Hi Phil,

Sorry, I can't reproduce  your results. I can get the issue with Lar's macro, but not in the way that you describe.

Does this happen in a new drawing (draw a couple of intersecting circles, then draw the line using I2 and point relative)?
Does it happen in both 2D mode and 3D Mode?
Does it ONLY happen (for you) after copy/paste?
25 years with DesignCAD

Lar

  • Hero Member
  • *****
  • Posts: 2745
Re: Gravity snap failure
« Reply #39 on: June 14, 2016, 06:00:14 AM »
<<...DT posted just ahead of me...>>
Phil, your sequence doesn't make it happen for me in win 10.

In my previous post I uploaded a macro that causes it to happen "using v23" but it now happen in 25 and later using win 10. I can't remember if I had win10 loaded when I created that post.

Lar

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure
« Reply #40 on: June 14, 2016, 10:08:37 AM »
DT,

I'm watching this a bit more closely now. It doesn't happen all the time, only occasionally. And it seems to happen after just about any sequence. In one case I noticed that I could gravity snap select older objects in the drawing but not things that I had just drawn.

After I posted yesterday I stopped seeing the problem with the same sequence of commands I had seen it with before.

I am working on a drawing I started several years ago that is about 365 Mbytes. However, I think I have seen the same problem in newer and smaller drawings.

****

Some of the times gravity snap fails to select it is because of an "operator problem." I caught myself doing something yesterday that I have been doing since day one with Prodesign. While I am drawing lines (V) I almost always terminate the function by pressing "V" again to start a new line. I do this by habit.

But if the program is trying to draw a line and I gravity snap to an object the program sets a point and does not select the object. I noticed several times yesterday that this was the reason I couldn't select objects with gravity snap. So some of the times I am seeing gravity snap selection failures is because the program is trying to draw a new line.

However, this does not explain all occurrences of the problem. When gravity snap fails to select objects and I left click to select an object, gravity snap selection starts to work again. In this case the program is not trying to draw a new line.

Phil
DesignCAD user since 1987

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4216
Re: Gravity snap failure
« Reply #41 on: June 14, 2016, 11:18:19 AM »
OK , thanks. I've submitted it as a bug -- maybe Lar's macro will help us find the source of the problem.
25 years with DesignCAD

Dr PR

  • Hero Member
  • *****
  • Posts: 5560
Re: Gravity snap failure (solved?)
« Reply #42 on: April 10, 2018, 09:56:20 AM »
I haven't seen this problem for quite a while now, so either a bug was fixed or I stopped doing whatever was causing it.

Since no one else was seeing this happen it was probably an operator problem.

Phil
DesignCAD user since 1987