Author Topic: Copy and translate regions.  (Read 1432 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Copy and translate regions.
« on: June 22, 2005, 08:10:53 PM »
Brain picking time guys.
Programmatically ...
I'm selecting objects, copying <vla-copy .. > them, changing the normal,  translating co-ordinates, then moving them into outer space < well not quite literally >

Works fine for the majority of object types that I need.

... The problem comes with regions. the Normal is read only so it cant <?> be changed programmatically that I know of.

I thought perhaps to change the UCS, make a block of the region, change the UCS to the insertion plane, insert the block and explode it.

.. another option may be to set a DB trap, explode the region, collect the remains, move and translate them, then make a new region. This may be difficult to achieve due to dealing with possible subtractions etc. I'm not bothered with retaining handles or ObjectID's.

Before I start hacking code, does anyone have any better ideas or comments ??? Have I missed the obvious 'cause I'm too close to the issue.

I'd prefer to {if possible} use ActiveX methods .. but only 'cause I may translate this to C# later.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Copy and translate regions.
« Reply #1 on: June 22, 2005, 08:38:11 PM »
I could also consider the vla-Rotate3D too I suppose , with a bit of vector math to determine the rotation ..
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jürg Menzi

  • Swamp Rat
  • Posts: 599
  • Oberegg, Switzerland
Copy and translate regions.
« Reply #2 on: June 25, 2005, 07:00:38 AM »
Hi Kerry

How about vla-TransformBy method?

Cheers
A computer's human touch is its unscrupulousness!
MENZI ENGINEERING GmbH
Current A2k16... A2k24 - Start R2.18