Get Region Boundary

Get Region Boundary

Ysuuny
Contributor Contributor
1,530 Views
3 Replies
Message 1 of 4

Get Region Boundary

Ysuuny
Contributor
Contributor

Ysuuny_0-1732714761457.png

Hello!! 

I'm developing it with civil3d c# and it's not solved, so I'm leaving a post.

I only want to bring the outer line (polyline) from the region with a hole in the middle

- I explode the region, but it's hard to join because it's remain to the middle line
- I've also checked if it's in the area based on the point criteria, but it's not working well

I also referred to this library(GeometryExtensionsR19, brep) and worked hard...

 

Please help me,, 😉

0 Likes
1,531 Views
3 Replies
Replies (3)
Message 2 of 4

Joe-Bouza
Mentor
Mentor

LINEWORKSHRINKWRAP ?

Joe Bouza
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 3 of 4

paullimapa
Mentor
Mentor

Manually this is how I let AutoCAD create the new inner & outer PLINEs from the REGION

Enter command: 

BPOLY

In the Boundary Creation dialog under Boundary set click New and select the Region and hit Enter:

paullimapa_0-1732735252636.png

The Boundary Creation dialog re-appears and this time click on Pick Points but this time select the space that makes up the REGION:

paullimapa_2-1732735396666.png

If successful AutoCAD will show selected the new PLINE boundaries generated:

paullimapa_3-1732735474893.png

Hit Enter to complete the command.

Now you've got the PLINEs automatically generated for you:

paullimapa_4-1732735545217.png

 

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 4

paullimapa
Mentor
Mentor

Also this is how I would do it with lisp code:

https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/how-to-use-bpoly-function/m-p/127731...

 

;;;--- aec_setmrk is used w/ (aec_getmrk) it sets pt. marker
(defun aec_setmrk ()
  (command "_.Point" "@")
  (setq aec_pt-mrk (entlast))
  (entdel aec_pt-mrk)
  (princ)
) ;defun
;;;--- aec_getmrk starts at aec_pt-mrk (aec_setmrk) retrieves to current entity
(defun aec_getmrk (/ aec_ss)
	(if aec_pt-mrk
		(progn
			(setq aec_ss (ssadd))
			(while (setq aec_pt-mrk (entnext aec_pt-mrk))
				(ssadd aec_pt-mrk aec_ss)
			)
      (setq aec_pt nil)
			aec_ss
		)
	) ;if
) ;defun
(if (setq bp (getpoint "\nSelect Internal Point: ")) ; select point in middle of REGION
 (progn
  (aec_setmrk) ; set beginning marker
  (command "._-Boundary" "_non" bp "") ; create boundaries
  (if (setq ss (aec_getmrk))(sssetfirst nil ss)) ; highlight them
 )
) ; if

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes