.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Region element fails, sample attached

1 REPLY 1
Reply
Message 1 of 2
bej
Contributor
226 Views, 1 Reply

Region element fails, sample attached

Hi All,

 

I'm having an issue when attempting to create a Region element from the Polyline3d element as seem in the vertex list below (the same polyline shape is also in the attached DWG). All the points lie in the same plane defined by the normal (see below). The attached DWG files shows the Polyline3d shape.

 

Vertices:

(0,0,0)
(-72,-291.5,0)
(-72,-291.5,-5000)
(-2246,-9190,-5000)
(-2246,-9190,0)
(-2316,-9481.5,0)
(-2316,-9481.5,-5300)
(0,0,-5300)


Normal:

(0.970813837237303,-0.239789352593776,0.00464325438036449)

 

The code below will fail on this polyline shape.

 

Code:

DBObjectCollection acDBObjColl;

Polyline3d face = new Polyline3d(Poly3dType.SimplePoly, vertices, true);

acDBObjColl.Add(face);

myRegionColl = Region.CreateFromCurves(acDBObjColl);  // this fails with eInvalidInput

 

You can also see the same issue by using the REGION command manually in AutoCAD on the shape in the attached DWG file. The REGION command also failes.

 

Do anyone see what is wrong with the shape, that is causing the Region element to fail?

 

 

Regards,

Bjørn Egil Jenssen

 

 

1 REPLY 1
Message 2 of 2
hgasty1001
in reply to: bej

Hi,

 

That shape it's not planar.

 

Gaston Nunez

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost