Sunday, April 27, 2025

FREELISP : Align circles in x or y axis

               


            If user want to make group of circles  align with reference one in X-axis or Y-axis.  Pls download LISP source code and run in your PTCAD.  Video below show how to use command (axy).

    Here is Video

            


Here is LISP source code  

(defun c:Axy( / refEnt refData refCenter selSet idx entData mode moveVec srcCenter )
  
  ;; Select reference circle
  (setq refEnt (car (entsel "\nSelect reference circle: ")))
  (if (and refEnt (eq (cdr (assoc 0 (entget refEnt))) "CIRCLE"))
    (progn
      (setq refData (entget refEnt))
      (setq refCenter (cdr (assoc 10 refData)))
      ;; Ask user alignment axis
      (initget "X Y")
      (setq mode (getkword "\nAlign by [X/Y]: "))
      ;; Select circles to align
      (setq selSet (ssget '((0 . "CIRCLE"))))
      (if selSet
        (progn
          (setq idx 0)
          (while (< idx (sslength selSet))
            (setq ent (ssname selSet idx))
            (setq entData (entget ent))
            (setq srcCenter (cdr (assoc 10 entData)))
            
            (cond
              ;; Align X axis only
              ((= mode "X")
               (setq moveVec (list (- (car refCenter) (car srcCenter)) 0.0 0.0))
              )
              ;; Align Y axis only
              ((= mode "Y")
               (setq moveVec (list 0.0 (- (cadr refCenter) (cadr srcCenter)) 0.0))
              )
            )
            ;; Move the circle
            (command "MOVE" ent "" '(0 0 0) moveVec)
            (setq idx (1+ idx))
          )
          (princ "\n✅ Circles aligned successfully.")
        )
        (princ "\nNo circles selected.")
      )
    )
    (princ "\n❌ Please select a valid circle as reference.")
  )
  (princ)
)

Sunday, April 20, 2025

PTCAD 2025

 




        ​PTCAD is a computer-aided design (CAD) software developed by Rabbit Prototype Co., Ltd., a company based in Bangkok, Thailand. It offers a cost-effective and efficient solution for professionals in architecture, engineering, construction, and manufacturing. PTCAD is designed to be natively compatible with the industry-standard DWG file format, ensuring seamless collaboration with other CAD software like AutoCAD. 



Key Features of PTCAD:

  • Comprehensive 2D and 3D Tools: PTCAD provides a full range of drafting tools, enabling users to create accurate and detailed designs, from basic sketches to complex models. 

  • LISP Support: The software supports AutoLISP, allowing users to automate tasks and streamline workflows. It's highly compatible with AutoCAD's AutoLISP format, so existing scripts can be used without modification.

  • Network Licensing: PTCAD offers network licenses, reducing costs for organizations by allowing multiple users to access the software simultaneously without the need for individual licenses. 

  • Familiar Interface: The user interface and command structure are designed to be intuitive for those familiar with other CAD software, minimizing the learning curve.

  • Affordable Pricing: PTCAD is available in different editions to suit various needs and budgets:

    • PTCAD LITE: $99 per year, offering 2D DWG CAD optimized for speed.

    • PTCAD Standard: $199 per year, providing comprehensive 2D/3D DWG CAD tools with full AutoLISP support

    • PTCAD Plus: $299 per year, including advanced features like dedicated toolsets for AEC (Architecture, Engineering, and Construction) and early access to new features.

For more information or to download a free trial, you can visit their official website.

www.pt-cad.com

Update cookies preferences

Draw mechanical details with PTCAD Plus - MEC

     Draw mechanical details with PTCAD Plus - MEC               PTCAD Plus edition contains many plug-ins  AECplus, MEC, Assetlink which ca...