Sunday, December 7, 2025

FREELISP : Find Intersection point then draw circle or other actions

              This is free LISP source code command to find intersection points from selected lines, polylines. Then draw circle at that point with specified radius size.


Here below is source code. Command is MINT

(defun line->segments (ent / elist p1 p2)
  (setq elist (entget ent))
  (list (list (cdr (assoc 10 elist)) (cdr (assoc 11 elist))))
)
(defun lwpoly->segments (ent / elist pts segs i)
  (setq elist (entget ent))
  (setq pts '())
  (foreach d elist
    (if (= (car d) 10)
      (setq pts (append pts (list (cdr d))))
    )
  )
  (setq segs '())
  (setq i 0)
  (while (< i (1- (length pts)))
    (setq segs (append segs (list (list (nth i pts) (nth (1+ i) pts)))))
    (setq i (1+ i))
  )
  ;; segs
)
(defun get-segments (ent / type)
  (setq type (cdr (assoc 0 (entget ent))))
  (cond
    ((= type "LINE")       (line->segments ent))
    ((= type "LWPOLYLINE") (lwpoly->segments ent))
    (T '())
  )
)
(defun intersect2 (p1 p2 p3 p4 / x1 y1 x2 y2 x3 y3 x4 y4 denom ua ub)
  (setq x1 (car p1) y1 (cadr p1))
  (setq x2 (car p2) y2 (cadr p2))
  (setq x3 (car p3) y3 (cadr p3))
  (setq x4 (car p4) y4 (cadr p4))
  (setq denom (- (* (- x1 x2) (- y3 y4))
                 (* (- y1 y2) (- x3 x4))))
  (if (equal denom 0.0 1e-9)
    nil
    (progn
      (setq ua (/ (- (* (- x1 x3) (- y3 y4))
                     (* (- y1 y3) (- x3 x4)))
                  denom))
      (setq ub (/ (- (* (- x1 x3) (- y1 y2))
                     (* (- y1 y3) (- x1 x2)))
                  denom))
      (if (and (>= ua 0) (<= ua 1) (>= ub 0) (<= ub 1))
        (list (+ x1 (* ua (- x2 x1)))
              (+ y1 (* ua (- y2 y1)))
              0.0)
        nil
      )
    )
  )
)
(defun C:MINT (/ ss n i ent segs allsegs j k pA pB pC pD ip)
  (prompt "\nSelect lines/polylines: ")
  (setq ss (ssget '((0 . "LINE,LWPOLYLINE"))))
  (if (not ss)
    (progn (princ "\nNo valid selection.") (princ))
  )
  ;; Build list of segments
  (setq allsegs '())
  (setq n (sslength ss))
  (setq i 0)
  (while (< i n)
    (setq ent (ssname ss i))
    (setq segs (get-segments ent))
    (setq allsegs (append allsegs segs))
    (setq i (1+ i))
  )
  (prompt "\nIntersection points:")
  (setq j 0)
  (while (< j (length allsegs))
    (setq k (1+ j))
    (while (< k (length allsegs))
      (setq pA (nth 0 (nth j allsegs)))
      (setq pB (nth 1 (nth j allsegs)))
      (setq pC (nth 0 (nth k allsegs)))
      (setq pD (nth 1 (nth k allsegs)))
      (setq ip (intersect2 pA pB pC pD))
      (if ip
        (progn
          (princ "\n → ")
          (princ ip)
          (command "_.CIRCLE" ip "3") ; customizable 3 is radius size
        )
      )
      (setq k (1+ k))
    )
    (setq j (1+ j))
  )
  (princ)
)

https://www.tiktok.com/@ptcaduser/video/7581342636896832786?is_from_webapp=1&sender_device=pc&web_id=7486330426983859719 

Monday, December 1, 2025

Get Ready : PTCAD 2026 is Launching

 

Announcing the Next Evolution of Reliable and Affordable DWG CAD Software

We are thrilled to announce a major milestone for our community of designers, engineers, and architects: PTCAD 2026 is officially launching on January 15, 2026!

PTCAD has always been committed to providing a powerful, cost-effective, and fully DWG-compatible CAD solution. With the release of PTCAD 2026, we are delivering on that promise by introducing significant performance boosts, smarter tools, and new features designed to streamline your workflow and dramatically enhance your productivity—all without the hefty price tag of traditional CAD subscriptions.


✨ What to Expect in PTCAD 2026

The new version focuses on three core areas: Speed, Intelligence, and Collaboration. Here’s a sneak peek at some of the key enhancements you can look forward to:

1.  Worth in class

We continue to ensure PTCAD is the best alternative for interoperability in a multi-CAD environment. 

  • True DWG Compatibility: PTCAD 2026 fully supports the latest DWG file format, ensuring perfect fidelity when sharing files with users of other leading CAD software.
  • Cost-Effectiveness : PTCAD ensures you get the tools you need for less. This reduction in software costs directly contributes to a stronger bottom line and helps your firm maximize its overall profit margins."

2. Smarter Tools

  • QR Code Support 

    Use the new QRTEXT and QRLEADER commands to embed QR codes directly into drawings—ideal for linking drawings to metadata, contacts, assets, or websites.

  • Enhanced Table and MTEXT Editing  Excel-style auto-fill in tables, new stacking options in MTEXT, and improved editing tools streamline data entry and annotation tasks.
  • UI Features for Power Users Detached drawing windows and command-line transparency options enable advanced workflows across multiple monitors.

  • Asset Link function : A updated tool to manage and link non-CAD asset data (like inventory or maintenance logs) directly to objects within your DWG files.

  • Enhanced AutoLISP Support: For our power users, we've improved AutoLISP compatibility and performance to run your existing custom routines more efficiently.

3. Seamless Collaboration and Compatibility

Leverage your working process. Use new tool for collaborate your work continuously.

  • EDM:  Create professional workflow by using new tool for  drawing proposed for review and approve in secure environment.
  • Drawing Compare Pro: Compare two versions of a drawing with greater detail and efficiency, making it easier to track changes and manage revisions.


🗓️ Mark Your Calendars!

The official launch of PTCAD 2026 is scheduled for January 15, 2026!

Starting on that date, you can download the free 30-day trial or update to new version.

Exclusive Webinar Preview!

Want to see PTCAD 2026 in action before anyone else? Join our free online webinar where our product specialists will take you on a deep dive into all the new features and answer your questions live!

  • Date: January 30, 2026

  • Time: 2pm-4pm (GMT+7)

  • Registration Link:  see update information at https://www.facebook.com/ptcadthai

Wednesday, November 5, 2025

PTCADuser on TIKTOK Channel

Dear  PTCAD blog readers,

        We hope you're having a productive time using PTCAD!

We are thrilled to announce a brand-new way to connect with the team and get quick, engaging tips, tricks, and updates for your favorite design software.

The PTCAD content  is now also on TikTok!

📱 Why Follow Our TikTok?

We've launched our TikTok channel to bring you fast, fun, and highly informative content perfect for designers on the go. You can expect:

  • ⚡ Quick Tips & Tutorials: Short videos demonstrating powerful PTCAD features and hidden gems.

  • 🛠️ Workflow Hacks: Learn efficient ways to speed up your design process.

  • 🤩 Sneak Peeks: Get a first look at new updates, features, and content.

  • 🤝 Community Highlights: See how other users are maximizing PTCAD in their projects.

🔗 Follow Us Now!

Ready to level up your PTCAD skills in just 60 seconds?

Click the link below and hit 'Follow'!

(9)ptcaduser (@ptcaduser) | TikTok

We can't wait to see you there! We encourage you to like, share, and comment on our videos—let us know what quick tutorials you'd like to see next!

Sincerely yours,

PTCADuser team




Wednesday, October 15, 2025

FREELISP : Scale selected object 2 times

         This is shortcut command to scale selected object bigger 2 times refer selected reference clicked point.


        Here is LISP source code :

(defun c:SCALE2X ( / ss basept)
  (prompt "\nSelect objects to scale: ")
  (setq ss (ssget))
  (if ss
    (progn
      (prompt "\nSpecify base point: ")
      (setq basept (getpoint "\nPick base point: "))
      (if basept
        (progn
          (command "_.SCALE" ss "" basept "2")
          (prompt "\nObjects scaled by 2×.")
        )
        (prompt "\nBase point not selected.")
      )
    )
    (prompt "\nNo objects selected.")
  )
  (princ)
)

command is SCALE2x

--------------
Tip : user can adjust scale size by changing number in this line in source code

          (command "_.SCALE" ss "" basept "2")


FREELISP : Find Intersection point then draw circle or other actions

              This is free LISP source code command to find intersection points from selected lines, polylines. Then draw circle at that poi...