Jump to content

Lisp routine(s) to control section plane position/thickness and type (plane/slice)


anivegmin

Recommended Posts

Hi,

 

I'm using section planes (SPLANE) to slice up point-clouds.

 

The more keyboard based commands the better.

 

To create a section plane I might select the cloud then type -

 

SPLANE enter O enter T enter

 

This will create a section plane orthographic to the WCS looking top down on the cloud. (I'm using LayDirectorV1-9.lsp to force the section plane into layer A-section-plane regardless of what my current layer is).

 

If I then want to move the section plane up or down or swap to a slice of a certain thickness, I have to do various mouse clicks and dragging or clicking in the ribbon.

 

I'd like to be able to perform these secondary adjustments using keyboard/lisp commands.

 

I have at the moment  the aforementioned SPLANE and a system variable SECTIONSPINNERS that displays the dialog box to set the increment value for the Section Object Offset and Slice Thickness controls in the Section Plane ribbon contextual tab. The section plane is an object with xyz geometry and other properties, examples below -

 

EXAMPLE PLANE -

Command: LIST
Select objects: 1 found
Select objects:
                  SECTIONOBJECT  Layer: "A-section-plane"
                            Space: Model space
                   Handle = 1000057c
Name: Section Plane (1)
Type: Plane
Insertion:  X=   20.731,  Y=  720.556,  Z=   26.648
Rotation: 42.064513
Normal:  X=    0.000,  Y=    0.000,  Z=   -1.000
Top Plane:    16.825
Bottom Plane:    16.825
Point at:  X=   20.731,  Y=  720.556,  Z=   26.648
Point at:  X=   42.726,  Y=  740.405,  Z=   26.648

Plane-Properties.JPG.2f3c9a2be1c5f85cc48a7bedc4be076a.JPG

 

EXAMPLE SLICE -

Command: LIST
Select objects: 1 found
Select objects:
                  SECTIONOBJECT  Layer: "A-section-plane"
                            Space: Model space
                   Handle = 1000057c
Name: Section Plane (1)
Type: Slice
Insertion:  X=   20.731,  Y=  720.556,  Z=   26.648
Rotation: 42.064513
Normal:  X=    0.000,  Y=    0.000,  Z=   -1.000
Top Plane:    16.825
Bottom Plane:    16.825
Angle A: 0.000000
Angle B: 0.000000
Point at:  X=   20.731,  Y=  720.556,  Z=   26.648
Point at:  X=   42.726,  Y=  740.405,  Z=   26.648
Point at:  X=   42.726,  Y=  740.405,  Z=   25.491
Point at:  X=   20.731,  Y=  720.556,  Z=   25.491

Slice-Properties.JPG.11c6ca1fa9c239191a7ff2798546fda9.JPG

 

My goal is to be able to create a section plane and then control it's position from the keyboard with maybe a lisp routine that can move the section plane or or down by increments by repeatedly pressing a key/s, and similar control of slice thickness. But I don't know how to go about extracting this information and manipulating it within Lisp.

 

Any help/knowledge appreciated.

Thanks

Quentin.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...