Author Topic: Open and closed 2D&3D curves selection set filters  (Read 1157 times)

0 Members and 1 Guest are viewing this topic.

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Open and closed 2D&3D curves selection set filters
« on: March 26, 2018, 02:00:39 PM »
Hi all,
I am not sure are those examples correct... I don't really know can Polyface Mesh be open or closed, or it has only single DXF70 code (70 . 64)...

So for closed curves 2D&3D, I suppose this is correct...

Code - Auto/Visual Lisp: [Select]
  1. (setq ss1
  2.   (ssget
  3.     (list
  4.       '(-4 . "<OR")
  5.       '(0 . "CIRCLE")
  6.       '(-4 . "<AND")
  7.       '(0 . "ELLIPSE")
  8.       '(-4 . "<AND")
  9.       '(41 . 0.0)
  10.       (cons 42 (* 2 pi))
  11.       '(-4 . "AND>")
  12.       '(-4 . "AND>")
  13.       '(-4 . "<AND")
  14.       '(0 . "*POLYLINE,SPLINE")
  15.       '(-4 . "<AND")
  16.       '(-4 . "&=")
  17.       '(70 . 1)
  18.       '(-4 . "<NOT")
  19.       '(70 . 17)     ; Polygon Mesh open in N direction and closed in M direction
  20.       '(-4 . "NOT>")
  21.       '(-4 . "<NOT")
  22.       '(70 . 49)     ; Polygon Mesh closed in both M&N directions
  23.       '(-4 . "NOT>")
  24.       '(-4 . "AND>")
  25.       '(-4 . "AND>")
  26.       '(-4 . "OR>")
  27.     )
  28.   )
  29. )
  30.  

And for open little different, but opposite generally speaking...

Code - Auto/Visual Lisp: [Select]
  1. (setq ss2
  2.   (ssget
  3.     (list
  4.       '(-4 . "<OR")
  5.       '(0 . "ARC,LINE,HELIX")
  6.       '(-4 . "<AND")
  7.       '(0 . "ELLIPSE")
  8.       '(-4 . "<NOT")
  9.       '(-4 . "<AND")
  10.       '(41 . 0.0)
  11.       (cons 42 (* 2 pi))
  12.       '(-4 . "AND>")
  13.       '(-4 . "NOT>")
  14.       '(-4 . "AND>")
  15.       '(-4 . "<AND")
  16.       '(0 . "*POLYLINE,SPLINE")
  17.       '(-4 . "<AND")
  18.       '(-4 . "<NOT")
  19.       '(-4 . "&=")
  20.       '(70 . 1)
  21.       '(-4 . "NOT>")
  22.       '(-4 . "<NOT")
  23.       '(70 . 16)     ; Polygon Mesh open in both M&N directions
  24.       '(-4 . "NOT>")
  25.       '(-4 . "<NOT")
  26.       '(70 . 48)     ; Polygon Mesh open in M direction and closed in N direction
  27.       '(-4 . "NOT>")
  28.       '(-4 . "<NOT")
  29.       '(70 . 64)     ; Polyface Mesh
  30.       '(-4 . "NOT>")
  31.       '(-4 . "AND>")
  32.       '(-4 . "AND>")
  33.       '(-4 . "OR>")
  34.     )
  35.   )
  36. )
  37.  

Any insight will be appreciated...
M.R.
« Last Edit: March 26, 2018, 03:12:50 PM by ribarm »
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

ribarm

  • Gator
  • Posts: 3297
  • Marko Ribar, architect
Re: Open and closed 2D&3D curves selection set filters
« Reply #1 on: March 26, 2018, 03:13:32 PM »
Forgot ab HELIX... ss2 updated... Any comments?
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

roy_043

  • Water Moccasin
  • Posts: 1895
  • BricsCAD 18
Re: Open and closed 2D&3D curves selection set filters
« Reply #2 on: March 26, 2018, 04:57:59 PM »
Unimportant: Some ANDs are superfluous in the first ssget filter.
IMO it would make more sense to completely exclude polyface meshes in both filters as they are hardly curves.