PDA

View Full Version : Need area of Hatched area



bullock
2004-07-05, 03:21 AM
I would like to know why a hatch patterns properties does not contain area info and is this a variable that could be pulled from hatch control data.

Thanks for any input.

RP Bullock
http://www.graphicsfx.com

mjfarrell
2004-07-05, 03:21 PM
Look into the PICKSTYLE variable and select the
associative hatch boundary to get the area, not
the hatch object itself. I'm thinking the 'reason'
behind the hatch object not displaying it's area
is due to the idea that it is a 'graphic' element
hence gradient fills option, not a 'design' element
which would display it's area.

LanceMcHatton
2004-11-19, 09:47 PM
What if the hatch doesn't have a boundary line anymore?

Mike.Perry
2004-11-19, 11:33 PM
Hi

Have a browse of the following threads -

hatch woes (http://forums.augi.com/showthread.php?t=6233)

Draw Hatch Boundary (http://forums.augi.com/showthread.php?t=9332)

+

The following from Peter Jamtgaard via an old LISP Guild post might be of some help -


; This will only work for hatches without nested islands.
; Just an outline with void islands
(defun C:HATCH_AREA (/ AREA CNT HATOBJ POLOBJ SIGN)
(setq HATOBJ (vlax-ename->vla-object
(car (entsel "\nSelect Hatch: "))
)
CNT 0
AREA 0
SIGN 1
)
(repeat (vla-get-numberofloops HATOBJ)
(setq POLOBJ (vla-getloopat HATOBJ CNT 'LOOP))
(setq AREA (+ AREA
(* SIGN
(vla-get-area
(car
(setq XX (vlax-safearray->list LOOP))
)
)
)
)
)
(setq CNT (1+ CNT))
(if (> SIGN 0)
(setq SIGN -1)
)
)
AREA
)

Have a good one, Mike