Author Topic: Periodic flag in a spline doesn't match periodic value shown in properties?  (Read 167 times)

0 Members and 1 Guest are viewing this topic.

V@no

  • Newt
  • Posts: 25
  • AutoCAD 2023
I've been playing around with group 70 of a spline and noticed that "periodic" bit (bit 2) could be set, but spline's properties panel shows it as not set:

Code - Auto/Visual Lisp: [Select]
  1. (logand (cdr (assoc 70 (entget (SSNAME (ssget ":S" '((0 . "SPLINE"))) 0)))) 2)


Why is that?

Thanks.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8755
  • AKA Daniel
PyRx shows False

Code - Python: [Select]
  1. import traceback
  2. from pyrx_imp import Rx, Ge, Gi, Db, Ap, Ed, Gs
  3.  
  4. def PyRxCmd_doit() -> None:
  5.     try:
  6.         db = Db.curDb()
  7.         es = Ed.Editor.entSel("\nPick it: ", Db.Spline.desc())
  8.         if es[0] != Ed.PromptStatus.eOk:
  9.             raise Exception("Oops {}: ".format(es[0]))
  10.         sp = Db.Spline(es[1])
  11.         print("isPeriodic= ",sp.isPeriodic())
  12.     except Exception as err:
  13.         traceback.print_exception(err)
  14.  

Quote
Command: DOIT
Pick it: isPeriodic=  False