divide a region into several regions

divide a region into several regions

Anonymous
Not applicable
7,122 Views
10 Replies
Message 1 of 11

divide a region into several regions

Anonymous
Not applicable
hi,

as i know there is not a method to divide a region into several regions,

there is a SliceSolid to solids,but not to region objects,

any hints ,thanks a lot
0 Likes
7,123 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
maybe ,i have to made a solid using the region ,then slice it

into several solids,then explode the solids to region ,ect,......

boring sub, better avoid this,



"youngman" wrote in message
news:5449405@discussion.autodesk.com...
hi,

as i know there is not a method to divide a region into several regions,

there is a SliceSolid to solids,but not to region objects,

any hints ,thanks a lot
0 Likes
Message 3 of 11

Anonymous
Not applicable
It's even worse than that. Unless it is a recent addition, there isn't an "Explode" method for 3dSolids. A "SectionSolid" call is required, with the appropriate set of points describing a plane.

I was able to pull the various elements together to achieve a slice region routine but, as you guessed, it was long and tedious.
0 Likes
Message 4 of 11

Anonymous
Not applicable
THANKS A LOT.

would you please give me the long and tedious subs and funs

thank you in advance

wrote in message news:5449555@discussion.autodesk.com...
It's even worse than that. Unless it is a recent addition, there isn't an
"Explode" method for 3dSolids. A "SectionSolid" call is required, with the
appropriate set of points describing a plane.

I was able to pull the various elements together to achieve a slice region
routine but, as you guessed, it was long and tedious.
0 Likes
Message 5 of 11

Anonymous
Not applicable
I had to collect subs from various modules so bare with me if something is amiss. I'll be away for the rest of the day but will address any problems when I return.

As additional background, this procedure mimicks the 2PTSlice of 2007 for earlier versions. It will slice many of Autocad's 2d elements as well i.e., Region, Circle, LWPolyline, etc.

The 2d elements don't neccessarily need to be coplanar to the UCS.

I welcome all feedback
0 Likes
Message 6 of 11

Anonymous
Not applicable
Thanks a lot.
i havent tried your subs, but, first of all,

thanks for your kindness,SEANT




wrote in message news:5449563@discussion.autodesk.com...
I had to collect subs from various modules so bare with me if something is
amiss. I'll be away for the rest of the day but will address any problems
when I return.

As additional background, this procedure mimicks the 2PTSlice of 2007 for
earlier versions. It will slice many of Autocad's 2d elements as well i.e.,
Region, Circle, LWPolyline, etc.

The 2d elements don't neccessarily need to be coplanar to the UCS.

I welcome all feedback
0 Likes
Message 7 of 11

QuillHyde
Explorer
Explorer

When I try and implement this, it works great, once.  Then when I run the macro again, Autocad crashes.

 

Any tips?

 

thanks!

 

Quill

0 Likes
Message 8 of 11

QuillHyde
Explorer
Explorer

Selection sets! 

 

I copied some code from one of your other examples - the hiding/unhiding code - where you had used a different method for clearing the selection set.  Or something.  I'm a noob at this, but it worked.


Then it got hung up on the delete the original regions code, so I messed around with that.  It gave a code 13 error on the 'if IsObject (varRegs(0)) Then' line - I got it to work by commenting out all the 'if' stuff and just having it run ent2bsliced.delete - it works so far. 

 

good times, learning the hard way.  Thanks for posting the code,  It's a really useful tool for me ... it's going to save me hours and hours of tedious exploding and deleting, and I'll thank you every time.

 

Quill

0 Likes
Message 9 of 11

QuillHyde
Explorer
Explorer

Well, sort of works.  Good enough for now.  Hopefully I'll figure it out eventually

 

Quill

0 Likes
Message 10 of 11

SEANT61
Advisor
Advisor

That is performing poorly in AutoCAD 2009.  It was orignally written for AutoCAD 2004 - Selection Sets may have been handled differently back then.

 

How does the rest of the module work if this routine is replaced:

 

 

Private Sub SSClearST()
Dim colSS As AcadSelectionSet

   'ensure that selection set does not currently exist
   On Error Resume Next
   Set colSS = ThisDrawing.SelectionSets.Item("TempSSet")
   colSS.Delete
   On Error GoTo 0

End Sub

 


************************************************************
May your cursor always snap to the location intended.
0 Likes
Message 11 of 11

QuillHyde
Explorer
Explorer

Yep, that fixed it.

 

thanks x 10,000,000!

 

Quill

0 Likes