Author Topic: >pointselect observation  (Read 5057 times)

samdavo

  • Hero Member
  • *****
  • Posts: 2587
  • the trick is knowin...^ > v < - which way's up?
Re: >pointselect observation
« Reply #15 on: August 24, 2013, 06:40:59 PM »
well , lol if you leave bentonite long enough, I'm sure the clay eventually settles, and it gets clearer lol.

Like the old Council report in the local paper :- "there's a pothole in the road at the corner of Smith and Jones Streets, and the Council are looking into it".

But I'm certainly getting the picture, and the explanations are brilliant and illuminating.

Don't know if you remember, but I once wanted to set 2 or optionally 3 handles (eg the normal to a plane plus maybe the diameter) and import a symbol (2 or 3 handles) of a male thread (i.e. short length of allthread), so that I could end up with a female tapped hole (all done by macro - at least that was the plan). 

But to be honest I didn't try too hard, because
a. I didn't know where to start,
b. I suspected it would require naming the two solids to carry it out, and finally
c. I think you suggested just import the symbol and subtract, and don't be so lazy lol.

Cheers
and thanks to both you and lar for the discussion here
and to Phil and magic for discussion elsewhere
and minstrel for help here AS WELL AS his youtubes,
and dcadRob and Dempsey and MarkX
and DT of course
and so many others :)
great chatroom gents - and thanks for being so tolerant of dumb questions.

As AJCronin says in "The Keys to The Kingdom",  "tolerance is the highest virtue, grasshopper".

Reply #6 (and 7) on this thread refers (excuse the pun).
http://forum.designcadcommunity.com/index.php?topic=5015.0
« Last Edit: August 26, 2013, 02:30:05 PM by samdavo »

Lar

  • Hero Member
  • *****
  • Posts: 2540
Re: >pointselect observation
« Reply #16 on: August 24, 2013, 07:53:24 PM »
I tried the pointmark thing and that is why I advised against using non-solid entities to combine with the solids.

This is some off-the-wall trickery
I think they call it tweaking now'a days (or is it twerking? ;D ?)

Genius idea with the improper plane Prl. Gets rid of the loose ends. You're a real dcad gangsta. Or do I call you The Dcad Prestige ("The Prestige" is showing on SyFy right now and your trickery reminds me of how they create an entity, use it for some  trickery, then the trickery itself disposes of the entity).

I'm doing the "telling" with the Y coordinate.
Remember it's important to not snap to a point that shares a screen coordinate with another point so if you use the Y then your viewing angle should be front or side, depending on which side you put the improper planes on.

My purpose for using such a macro would be to emulate non-destructive booles. My solid operations normally consist of any number of solid adds and subtracts that have to be carried out in a specific order to end up with the proper result. What I do now is create the original solids on a dedicated layer then duplicate them to the layer where I want the resultant solid, turn off the dedicated layer and perform the boole on the resultant layer. If I later have to rework the resultant solid I go back to the originals but by then I have forgotten the order of the operations and what gets added and what gets subtracted. I have a macro that runs the proper sequence but it suffered from the 'setpoint in 2d selection mode' issue. Prl's idea about switching to 3d mode should be enough but this method of placing outta-space improper planes would add more ammo to my arsenal.

Lar

dcadRob

  • Hero Member
  • *****
  • Posts: 688
Re: >pointselect observation
« Reply #17 on: August 25, 2013, 05:38:56 AM »
If QUERY ENT_POINT returned the location of a point on the solid then it could be selected with <UsePresetPoints and the operations should work.
Alternatively, the solid operators could be programmed work with solid number:
>SolidAdd
{
<SolidSelect [Number1]
<SolidSelect [Number2]
}

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: >pointselect observation
« Reply #18 on: August 25, 2013, 08:44:19 AM »
If QUERY ENT_POINT returned the location of a point on the solid then it could be selected with <UsePresetPoints and the operations should work.

This approach is unreliable when solids share edges and points with other solids or other entities, hence all the twerking with solid ids.

Hey Lar, had to look up what twerking means. Must be from your DJ work, watching all those youthful dancers. 

Lar

  • Hero Member
  • *****
  • Posts: 2540
Re: >pointselect observation
« Reply #19 on: August 25, 2013, 09:53:18 AM »
Hey Lar, had to look up what twerking means. Must be from your DJ work, watching all those youthful dancers.
All for the benifit of science. I was calculating the coefficient of the drag of the delta y lift squared by the integer of the delta x velocity as a product of the delta z thrust. Turns out the impact can be quite damaging if one finds himself within range of the delta product.

Lar  8)

samdavo

  • Hero Member
  • *****
  • Posts: 2587
  • the trick is knowin...^ > v < - which way's up?
Re: >pointselect observation
« Reply #20 on: August 25, 2013, 02:35:29 PM »
When Pamela A  Henderson takes to the floor, the nightclub's in need of a lawman,
Her knockers have broken three ribs and a jaw, and KO'ed three grooms and a doorman;
…..But wagging a tail when you stand side-by-paw, is real and sincere as a Mormon,
…..So puppies remind us of good times of yore, So puppies make princes of poormen.

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4152
Re: >pointselect observation
« Reply #21 on: August 26, 2013, 11:47:01 AM »
I haven't tested this (on vacation :D ) but try setting Sys(1001) to 1 or 2 and see if that helps. It sets the snap range in pixels -- not sure if it will affect PointSelect or not, but worth a try. I think the default is 10 pixels.
25 years with DesignCAD

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: >pointselect observation
« Reply #22 on: August 28, 2013, 05:02:19 AM »
Remember it's important to not snap to a point that shares a screen coordinate with another point so if you use the Y then your viewing angle should be front or side,

Lar, you're right.  I've come to the conclusion that any DesignCAD command that relies on setting a point to "select" or identify the items for the command is for some reason affected by this 2d screen selection mode and viewing angle dependency.  Not sure why any programmer would ever want this but who knows.

But putting the >3d mode {} at the beginning of your routines seems to solve this issue, or at least it does in my experiments so far.

Lar

  • Hero Member
  • *****
  • Posts: 2540
Re: >pointselect observation
« Reply #23 on: August 28, 2013, 06:30:15 AM »
The problem is not 2d selection mode. The problem is the way the commands work. The booles (that need two solids) and the surface creation commands all work by existing entities being identified by setting a point "on or near" them. And, instead of the user making the final decision as to what entities are used, it's actually up to dcad to make that final decision. The user doesn't really know what has being used until the command is completed and either the results are what he expected or something else (thank you, God, for the person who invented undo... and redo). So far this has not been a major hassle when working manually, but near impossible to predict when using basiccad in 2d select mode. Even going to 3d select mode is no 100% guarantee, since  it's possible to set a point where entities share coordinates, or you may pick the same entity more than once.

It would be better if, after issuing the command, we select the 2 solids, one at a time (giving dcad a chance to know which of the solids is passive and which is active), then we click ok.

The same thing would go for the surface commands: we select the lines one at a time, in order. The lines would remain selected so we have a visual, and we would be able to deselect (in case we select a wrong line by mistake), the way can now press esc to click on something else.

Lar

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: >pointselect observation
« Reply #24 on: August 28, 2013, 07:46:56 AM »
but near impossible to predict when using basiccad in 2d select mode

Setting aside the shared coordinate issue, I would say having basiccad running >pointxyz [x1,y1,z1] back through the 2d screening viewing angle is absurd.  But it does appear to be coded that way.

prl

  • Hero Member
  • *****
  • Posts: 3389
  • A Bézier Extrusion
Re: >pointselect observation
« Reply #25 on: August 28, 2013, 11:14:41 AM »
It would be better if, after issuing the command, we select the 2 solids, one at a time (giving dcad a chance to know which of the solids is passive and which is active), then we click ok.

For the normal interactive user/screen approach I agree.  You've probably noticed other programs will pre-highlight each solid or entity before it becomes the selected item with a click.

Lar

  • Hero Member
  • *****
  • Posts: 2540
Re: >pointselect observation
« Reply #26 on: September 10, 2013, 05:35:33 AM »
Thanks for introducing this topic, Prl. It clued me in the solution of one of dcad's "frustrations-as a-result-of-a-convenience".

What I mean is the convenience of '2d select mode' leads to frustration when trying to snap to a particular point in a mass of other points. It also happens when working in hidden-line or shaded mode and you click to snap to a visible point, not knowing that the cursor is nearer to a point you can't see (because the point is behind a surface). Also happens in any of the ortho views (front, side, top, etc) when wanting to snap, for example, to the front of a cube but dcad finds the back of the cube.

3d select mode solves all of these issues.

However, 3d mode alone is a much bigger ball of frustration (because to get to a particular point you would have to use the arrow keys and 'tack' there, the way a sail boat must tack [zig-zags] to get from point A to point B)... but when combined with 2d select mode it is magic. First, to find the coordinate plane you need to work on while in 2d select mode you use the comma key to move to a point in that plane. Then you switch to 3d select mode and now you can gravity snap in that coordinate plane in peace. The trick is to assign both modes to convenient shortcut keys . The default ctrl+2 and ctrl+3 are too taxing, for me anyway.

Funny thing is 3d select mode was around before the dinosaurs (ie, since the DOS days), before there was a 2d select mode. All those years of needless frustrations  :'(

<<note: gravity snapping in 3d select mode still finds the point nearest to the cursor, it doesn't stick hard and fast to a working plane, the way Lock-X, Y and Z works (but these don't influence the snaps). Eg, a point that is visibly nearer on the screen may be on the far side of the drawing while a point on the opposite side of the screen may be nearer to the cursor so dcad would snap to the point on the opposite side of the screen and not the one on the far side of the drawing>>

Lar

Pearlitic

  • Newbie
  • *
  • Posts: 21
SolidAdd Macro - Cannont select a plane or grid for boolean operation
« Reply #27 on: February 13, 2016, 12:29:05 PM »
I don't understand why a macro that was recorded won't work when executed because of the error "cannot select a plane or grid for boolean operation".  Is this setting that I've missed.  I trig out all of my drawings so I know exactly where the points are.  I have worked around this but this does drive me crazy.

>SetStartPoint
{
  }
>Box
{
  <Color 0,0,213
  <Layer 1
  <PointXYZ 0.000000000000000e+000,0.000000000000000e+000,0.000000000000000e+000
  <PointXYZ 1.000000000000000e+001,1.000000000000000e+001,1.000000000000000e+001
  }

>PointSelect
{
  <PointXYZ 1.517449342958613e+001,-2.673843705076351e-002,1.000000000000000e+001
  <Type 0
  }

>Box
{
  <Color 0,0,213
  <Layer 1
  <PointXYZ 2.000000000000000e+001,2.000000000000000e+001,2.000000000000000e+001
  <PointXYZ 1.000000000000000e+001,1.000000000000000e+001,1.000000000000000e+001
  }

>SetHandle
{
  <Type 4
  }

>SelectMove
{
  <PointXYZ 1.000000000000000e+001,1.000000000000000e+001,0.000000000000000e+000
  <Type 1
  <Reference 0
  }

>SolidAdd
{
  <PointXYZ 0.000000000000000e+000,1.000000000000000e+001,0.000000000000000e+000
  <PointXYZ 2.000000000000000e+001,1.000000000000000e+001,0.000000000000000e+000
  }

DrollTroll

  • Kindly Curmudgeon
  • Administrator
  • *****
  • Posts: 4152
Re: >pointselect observation
« Reply #28 on: February 13, 2016, 01:31:21 PM »
Try removing the SetStartPoint command at the beginning, and see if that helps.
25 years with DesignCAD

Pearlitic

  • Newbie
  • *
  • Posts: 21
Re: >pointselect observation
« Reply #29 on: February 13, 2016, 02:22:05 PM »
I've. of course removed, the Set Start Point command.  If ADD Solids had worked in my actual program I wouldn't have had to record a macro to check the problem.

Tried adding SYS 1001 = 1 and = 2 and I have also tried  >3d mode {} .   I get an error  >3dmode {}, but >2d mode doesn't work.

'Make sure we're in 3D mode (or our 3D data won't draw
'correctly)
If sys(344) then
>2DMode
{
}

Does anybody have a simple macro that can add two solids?  Is everyone guessing?