Jump to content

Recommended Posts

Posted

With this lis I get extrange point at the attached dwg . 

Please clear me what it could be happen .

Of course variable are global, and no error, no nothing 

Just crude lisp

 

;;*//*/*/*/*/*/*/*/*/*/*/*/*/**/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*/*
(DEFUN GROUP-BY-NUM/LST-NUM  (LST NUM / LS RET)

  (SETQ RET NIL)
  (IF (= (REM (LENGTH LST) NUM) 0)
    (PROGN
      (SETQ LS NIL)
      (REPEAT (/ (LENGTH LST) NUM)
        (REPEAT NUM
          (SETQ LS
                    (CONS (CAR LST) LS)
                LST (CDR LST)))
        (SETQ RET
                  (APPEND RET (LIST (REVERSE LS)))
              LS  NIL)))
    )
  RET
  )
;;-*******************************************************************************************************************************



(DEFUN cut-fill-area  (/ )




  (VL-LOAD-COM)
  (SETQ ACAD-OBJ (VLAX-GET-ACAD-OBJECT)) ;_ el programa ACAD 
  (SETQ ADOC (VLA-GET-ACTIVEDOCUMENT ACAD-OBJ)) ;_ el DWG que esta abierto-
  (SETQ MODEL (VLA-GET-MODELSPACE ADOC))

(Prompt "\n pique sobre surface Polyline  ")

  (SETQ POLY-surface (ssget   "_+.:E:S:L"  '((0 . "LWPOLYLINE")(8 . "F-SC-SURFACE"))))
  (SETQ POLY-surface-ob   (VLAX-ENAME->VLA-OBJECT (ssname POLY-surface 0)))

(Prompt "\n pique sobre projecto  Polyline  ")
  
(SETQ POLY-PROJECTO (ssget "_+.:E:S:L"  '((0 . "LWPOLYLINE") (8 . "F-SC-PROJECT"))))
(SETQ POLY-PROJECTO-OB (VLAX-ENAME->VLA-OBJECT (ssname POLY-PROJECTO 0)))

(SETQ intersection-LST  (VLAX-INVOKE poly-surface-ob 'INTERSECTWITH POLY-PROJECTO-OB ACEXTENDNONE))



  
(setq intersection-LST (GROUP-BY-NUM/LST-NUM (SETQ INTPOINT (VLAX-SAFEARRAY->LIST

                   (VLAX-VARIANT-VALUE
                     (VLA-INTERSECTWITH
                       POLY-PROJECTO-OB
                      poly-surface-ob 
                       ACEXTENDNONE 
                       ) ;_end intersectwith
                     ) ;_end vlax-variant-value
                   ) ;_end vlax-safe->array
        )  3))


(SETVAR "pdmode" 34)
  (SETVAR "pdsize" -1)


(foreach intersection intersection-LST 

  (VLA-ADDPOINT MODEL (VLAX-3D-POINT  intersection ))
)


  
  )

 

rare intersection.dwg cut-fill.LSP

Posted

The issue does not occur in BricsCAD. It is probably caused by the huge coordinates.

Select point to identify coordinates: end
Snap to endpoint of: 
 X=352414.7630  Y=7446950.7476  Z=0.0000

 

  • Like 1
Posted

It seem to be about coordinates position , I move all to 0 0 0 , and it work ok . 

thanks for your tip 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...