Jump to content
  • 0

A "negative" shape inside another shape?


WrightDE

Question

This is a dumb question, but can you set an object to have a negative object inside of it? This is probably worded poorly.

 

If I have a circle inside of a square and I want to fill that square, but not the circle, how can I go about that? Can I tell vectorworks, "Hey, this is one shape in totality. What you think a second shape a hole in the first shape."

 

The only way I've been able to do this in 2d is by clipping the two shapes, but this seems like a redundant extra step.

dumb example.png

Link to comment

8 answers to this question

Recommended Posts

  • 1

I think you are going to have to do a better job of explaining why you need this.

 

If you only want the visual, then just adjust the stacking order and fill of the objects to do what you need.

 

If you want to be able to get data from the objects, then the easiest would be to do what you said and Clip the surface so that there really is a hole.

Link to comment
  • 0
1 minute ago, Pat Stanford said:

I think you are going to have to do a better job of explaining why you need this.

 

If you only want the visual, then just adjust the stacking order and fill of the objects to do what you need.

 

If you want to be able to get data from the objects, then the easiest would be to do what you said and Clip the surface so that there really is a hole.

 

The clipping so there's a hole is the end result I want, but I was hoping there would be a way to just select the two objects and combine them in place rather than having to clip and then go back to select and delete the clipped item.

 

Not that that's an arduous process, but when you have to do it a hundred times, It seems inefficient and usually when I think I'm being inefficient in vectorworks, I find there's a better way or tool I'm unaware of.

Link to comment
  • 0

Or convert this script into a Menu Command and give it a keyboard shortcut.

 

Procedure ClipAndRemove;

{©2024  Pat Stanford - pat@coviana.com}
{licensed under the Boost Software License 1.0}
{https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt}
{TL/DR Use as you want, attribution for source, No warranty}

{Clips the first two selected objects and removes the clipping object.}
{Does no checking for object type of overlap.}

VAR	H1, H2	:Handle;

BEGIN
	H1:=FSActLayer;
	H2:=NextSObj(H1);
	ClipSurface(H1,H2);
	DelObject(H2);
End;

Run(ClipAndRemove);

 

Making scripts into menu commands is in the tutorial here:

 

 

  • Like 1
Link to comment
  • 0

So, whole sequence (without the fancy script):

 

  1. Draw a rectangle, (set fill color if desired)
  2. Draw a circle
  3. Select both objects
  4. Menu "Modify">"Clip Surface" (Ctrl+Shift+ALT+C)
    image.png.e7b49f46f00edab3d0fa5938e59670a6.png
     
  5. "Delete" key to remove the remaining circle

You now have a compound polyline with an area that is the rectangle minus the circle.

 

  • Like 2
Link to comment
  • 0
On 11/25/2024 at 10:41 PM, Benson Shaw said:

And, if edits to the hole(s) are desired:

 

Select the poly with a hole

Press cmd left bracket (Mac OS)

Result is a an edit window

    View shows the poly perimeter, noted as locked, and the circle.

Select the circle and move it, or delete it, or change its parameters via OIP
     And/or add more polys inside the perimeter.

     These become additional holes 


Exit the edit window (Exit button, or press cmd right bracket)

Result is same poly perimeter with new/altered hole(s).

 

Note:

Above process does NOT produce same result as dbl click the poly to engage the Reshape tool, or select with Reshape tool. Reshape tool allows edits to the perimeter poly vertices, but such edits may also stretch or compress any enclosed holes. 
 

-B

 

THANK YOU!  I wish I had known this ages ago.  i have been decomposing my polylines for no reason just to gain access to the clipped areas for  editing for far too long.

  • Like 1
Link to comment
  • 0
On 11/25/2024 at 7:41 PM, Benson Shaw said:

And, if edits to the hole(s) are desired:

 

Select the poly with a hole

Press cmd left bracket (Mac OS)

Result is a an edit window

    View shows the poly perimeter, noted as locked, and the circle.

Select the circle and move it, or delete it, or change its parameters via OIP
     And/or add more polys inside the perimeter.

     These become additional holes 


Exit the edit window (Exit button, or press cmd right bracket)

Result is same poly perimeter with new/altered hole(s).

 

Note:

Above process does NOT produce same result as dbl click the poly to engage the Reshape tool, or select with Reshape tool. Reshape tool allows edits to the perimeter poly vertices, but such edits may also stretch or compress any enclosed holes. 
 

-B

 

 

I second the WOW! I had no idea you could do that. That's very useful.

  • Like 1
Link to comment

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
Answer this question...

×   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...