Posts: 4
Registered: ‎07-23-2012
Message 1 of 3 (187 Views)

Error when slicing a Solid3D

187 Views, 2 Replies
07-23-2012 01:32 AM

Hello all,


i am quite new to AutoCAD 2010 .net development using C# and got a problem i can´t understand.

After cutting some Solid3Ds AutoCAD suddenly crashes. Sometimes the "Send Error Report" Dialog opens, sometimes AutoCAD just disappears, sometimes it asks me if i want to save my changes.
Checked everything for memory leaks, looked at the debug output and there are no leaks at all.


Currently i cut along a PlaneSurface that is defined as follows:

            Polyline acPolyline;
            acPolyline = new Polyline();
            acPolyline.AddVertexAt(0, new Point2d(0, 0), 0, 0, 0);
            acPolyline.AddVertexAt(1, new Point2d(-profile.Width, 0), 0, 0, 0);
            acPolyline.AddVertexAt(2, new Point2d(-profile.Width, profile.Height), 0, 0, 0);
            acPolyline.AddVertexAt(3, new Point2d(0, profile.Height), 0, 0, 0);
            acPolyline.Closed = true;
            acPolyline.Normal = profile.Axis.Direction;
            TransformPolyline(ref acPolyline, profile);

            Region acPlaneRegion = GetRegionFromPolyline(acPolyline);
            acPolyline = null;
            acPlaneRegion.TransformBy(Matrix3d.Rotation(Utilities.Math.DegreeToRadian(90), new Vector3d(1, 0, 0), new Point3d(0, 0, 0)));
            //acPlaneRegion.TransformBy(Matrix3d.Rotation(Utilities.Math.DegreeToRadian(-cuttingAngle), new Vector3d(0, 0, 1), new Point3d(0, 0, 0)))

            PlaneSurface acPlaneSurface = new PlaneSurface();


When transmitting the PlaneSurface via the Transaction it looks fine too.

And here is how i cut with the PlaneSurface:

miterCuttingPlanes = GetMiterCuttingPlanes(profile); 

                        acSolidPart1 = acSolid.Slice(miterCuttingPlanes.PlaneCut1Out, true);

                        if (acSolidPart1 != null)
                            if (profile.Cut1Out >= 90)
                                acSlicedSolid = acSolidPart1;
                                acSlicedSolid = acSolid;


 The acSolid is created by simply extruding a region along a path.

As is said before AutoCAD sometimes simply crashes/disappears when executing this. Anyone has any ideas on why this is happening? 


ADN Support Specialist
Posts: 701
Registered: ‎03-21-2011
Message 2 of 3 (110 Views)

Re: Error when slicing a Solid3D

07-30-2012 05:26 AM in reply to: OrgadataPST



It is quite hard to say what might be causing the crash. Can you please share a minimal buildable sample project that I can use to reproduce the error ?


Thank you.

Developer Technical Services
Autodesk Developer Network

ADN Support Specialist
Posts: 352
Registered: ‎07-24-2007
Message 3 of 3 (101 Views)

Re: Error when slicing a Solid3D

07-30-2012 04:34 PM in reply to: OrgadataPST

Please see my post here http://forums.autodesk.com/t5/NET/Crash-when-Transaction-takes-too-long/m-p/3558582/highlight/false#...

Fenton Webb

Developer Technical Services

Autodesk Developer Network

Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.