<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sweeping solid along polyline path in .NET Forum</title>
    <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9228435#M20535</link>
    <description>&lt;P&gt;I'm writing a code that should sweep solid entities using 3d polylines as sweeping paths. I downloaded a function form Through the interface to use it as a base. I tried to sweep a solid using a Circle entity as sweep entity and Polylines as sweep path&amp;nbsp; but I get a GeneralModelingFailure error; either with a 2d or 3d Polyline. It works fine with Line and Spline entities as sweeping paths. The strange thing is that When I do a Sweep command on AutoCAD and select the Polyline as a path it works perfectly without any problem. Is there any explanation for why this can't be done programmatically? Any suggestions for workaround?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;A. Taha&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2020 21:29:13 GMT</pubDate>
    <dc:creator>A_Taha</dc:creator>
    <dc:date>2020-01-02T21:29:13Z</dc:date>
    <item>
      <title>Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9228435#M20535</link>
      <description>&lt;P&gt;I'm writing a code that should sweep solid entities using 3d polylines as sweeping paths. I downloaded a function form Through the interface to use it as a base. I tried to sweep a solid using a Circle entity as sweep entity and Polylines as sweep path&amp;nbsp; but I get a GeneralModelingFailure error; either with a 2d or 3d Polyline. It works fine with Line and Spline entities as sweeping paths. The strange thing is that When I do a Sweep command on AutoCAD and select the Polyline as a path it works perfectly without any problem. Is there any explanation for why this can't be done programmatically? Any suggestions for workaround?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;A. Taha&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 21:29:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9228435#M20535</guid>
      <dc:creator>A_Taha</dc:creator>
      <dc:date>2020-01-02T21:29:13Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9230861#M20536</link>
      <description>&lt;P&gt;Here is the link to the original code I'm using:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.keanw.com/2010/01/sweeping-an-autocad-solid-using-net.html" target="_blank"&gt;https://www.keanw.com/2010/01/sweeping-an-autocad-solid-using-net.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2020 13:57:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9230861#M20536</guid>
      <dc:creator>A_Taha</dc:creator>
      <dc:date>2020-01-04T13:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9231041#M20537</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should also attach the drawing with which you got the error.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jan 2020 17:37:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9231041#M20537</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-01-04T17:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9233059#M20538</link>
      <description>&lt;P&gt;I'm attaching the file here.&lt;/P&gt;&lt;P&gt;I was making random trials before it wasn't working on 2d and 3d polylines. When I was preparing this file to upload, it worked on 3d polyline, but gave same error on 2d polyline. There is still something weird!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jan 2020 13:55:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9233059#M20538</guid>
      <dc:creator>A_Taha</dc:creator>
      <dc:date>2020-01-06T13:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9233529#M20539</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;try removing the SweepOptionsBuilder.BasePoint and SweepOptionsBuilder.Bank sttings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works for me:&lt;/P&gt;
&lt;PRE&gt;        [CommandMethod("TEST")]
        public static void Test()
        {
            var doc = Application.DocumentManager.MdiActiveDocument;
            var db = doc.Database;
            var ed = doc.Editor;

            var options = new PromptEntityOptions("\nSelect circle: ");
            options.SetRejectMessage("\nInvalid selection.");
            options.AddAllowedClass(typeof(Circle), true);
            var result = ed.GetEntity(options);
            if (result.Status != PromptStatus.OK) return;
            var sweepId = result.ObjectId;

            options.Message = "\nSelect the path Curve; ";
            options.AddAllowedClass(typeof(Curve), false);
            result = ed.GetEntity(options);
            if (result.Status != PromptStatus.OK) return;
            var pathId = result.ObjectId;

            using (var tr = db.TransactionManager.StartTransaction())
            {
                var sweepEnt = (Circle)tr.GetObject(sweepId, OpenMode.ForRead);
                var pathEnt = (Curve)tr.GetObject(pathId, OpenMode.ForRead);
                using (var solid = new Solid3d())
                {
                    var sob = new SweepOptionsBuilder();
                    sob.Align = SweepOptionsAlignOption.AlignSweepEntityToPath;
                    solid.CreateSweptSolid(sweepEnt, pathEnt, sob.ToSweepOptions());
                    var curSpace = (BlockTableRecord)tr.GetObject(db.CurrentSpaceId, OpenMode.ForWrite);
                    curSpace.AppendEntity(solid);
                    tr.AddNewlyCreatedDBObject(solid, true);
                }
                tr.Commit();
            }
        }&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Jan 2020 17:17:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9233529#M20539</guid>
      <dc:creator>_gile</dc:creator>
      <dc:date>2020-01-06T17:17:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9235099#M20540</link>
      <description>&lt;P&gt;--&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 11:48:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9235099#M20540</guid>
      <dc:creator>rfoda</dc:creator>
      <dc:date>2020-01-07T11:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9235107#M20541</link>
      <description>&lt;P&gt;It worked perfectly by removing these two lines. I think they have a function in some other cases; but for me it's doing the job correctly when they're eliminated.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;A. Taha&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2020 11:49:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/9235107#M20541</guid>
      <dc:creator>A_Taha</dc:creator>
      <dc:date>2020-01-07T11:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Sweeping solid along polyline path</title>
      <link>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/10393419#M20542</link>
      <description>I also encountered these problems when I was doing sweeping, but I still did not solve them after reading what you said. Is it convenient to look at your code? Thank you</description>
      <pubDate>Wed, 16 Jun 2021 01:46:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/net-forum/sweeping-solid-along-polyline-path/m-p/10393419#M20542</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-06-16T01:46:47Z</dc:date>
    </item>
  </channel>
</rss>

