Author Topic: Grread Problem  (Read 1989 times)

0 Members and 1 Guest are viewing this topic.

shaymin

  • Mosquito
  • Posts: 3
Grread Problem
« on: October 17, 2023, 02:49:49 AM »
When I use Grread + grvecs to create a rectangular from point to another point. I can't snap perpendicular. Hope Someone help me solve it
« Last Edit: October 17, 2023, 05:15:27 AM by shaymin »

dexus

  • Bull Frog
  • Posts: 208
Re: Grread Problem
« Reply #1 on: October 17, 2023, 03:34:34 AM »
One of the disadvantages of grread is that it doesn't have snap at all.
It is possible to make custom snap functions inside of the grread loop and your code seems to have implemented that in some way, but apparently without implementing the perpendicular snap.

You will have to post the code for anyone to see where this goes wrong.

kozmos

  • Newt
  • Posts: 114
Re: Grread Problem
« Reply #2 on: October 17, 2023, 04:46:52 AM »
When I use Grread + grvecs to create a rectangular from point to another point. I can't snap perpendicular. Hope I help me solve it
During grread loop, add (setq pt (osnap pt "_per")) when you have point from grread.
KozMos Inc.

shaymin

  • Mosquito
  • Posts: 3
Re: Grread Problem
« Reply #3 on: October 17, 2023, 05:19:27 AM »
One of the disadvantages of grread is that it doesn't have snap at all.
It is possible to make custom snap functions inside of the grread loop and your code seems to have implemented that in some way, but apparently without implementing the perpendicular snap.

You will have to post the code for anyone to see where this goes wrong.
Thank your comment. I used Lee'grnap and it help me catch point like osnapmode but when I use grread it just return a point then it can't catch a penperdicular point so I get here to find a solution
When I use Grread + grvecs to create a rectangular from point to another point. I can't snap perpendicular. Hope I help me solve it
During grread loop, add (setq pt (osnap pt "_per")) when you have point from grread.
Thank your cmt. That my lisp draw a duct I don't know write that code where in my lisp if you have time check it for me
« Last Edit: October 17, 2023, 05:24:55 AM by shaymin »

BIGAL

  • Swamp Rat
  • Posts: 1417
  • 40 + years of using Autocad
Re: Grread Problem
« Reply #4 on: October 17, 2023, 08:19:42 PM »
Do you really need to draw the rectang ? Why not a line ? Then draw the rectang. Or even mline will draw 2 lines. Can make mlines using entmake.

Code: [Select]
(setq pt1 (getpoint "\start point "))
(setvar 'osmode 128)
(setq pt2 (getpoint pt1 "Point 2"))
A man who never made a mistake never made anything

shaymin

  • Mosquito
  • Posts: 3
Re: Grread Problem
« Reply #5 on: October 17, 2023, 08:56:08 PM »
Do you really need to draw the rectang ? Why not a line ? Then draw the rectang. Or even mline will draw 2 lines. Can make mlines using entmake.

Code: [Select]
(setq pt1 (getpoint "\start point "))
(setvar 'osmode 128)
(setq pt2 (getpoint pt1 "Point 2"))
I did that man. If u use my lisp above u will understand. I just want to up size and down size when I draw so I use grread to do that

dexus

  • Bull Frog
  • Posts: 208
Re: Grread Problem
« Reply #6 on: October 25, 2023, 06:42:06 AM »
The perpendicular snap is based on the lastpoint system variable.
So you want to do
Code - Auto/Visual Lisp: [Select]
  1. (setvar 'lastpoint pt1)
before your grread loop.