Sample line Creation

ACAD-EXAMPLE ROAD-Model.dwg (687.1 KB)

Please attach the road surface Civil 3d , not surface AutoCAD

or
you do want it from surface AutoCAD

Since the file size is too large, I have to send it as cad.

you are make a c3d project

s1

s2

s3

ckouran akhi
the secret is in the last video…
select alignment…

1 Like

Can we do this in dynamo?

Yes

But, I have a problem with the intersection node

I can not do that now

@mzjensen
Thank you for the great dynamo
rely on him
@abdullahcicek try this
spp3
sampleLines__Example.dyn (74.2 KB)

1 Like

chokran akhi hosney…
thank you…
nice work, it didn’t work for me…
I made some changes, can you review them a little bit?Processing: Yeni klasör.rar…
sampleLines__Example-1.dyn (175.9 KB)
sampleLines__Example-SON.dyn (105.8 KB)

DWG file is a little big so it can’t be uploaded here. If you have an e-mail address, I’ll send it to him.

Hello, what is the error message that appears
most likely the problem with the intersection in the dynamo
And the picture of the lines inside the dynamo, is it correct?

e-mail address
HOSNEYALAA@LIVE.COM

If you examine the dyn file I sent
I sent it to your e-mail address

welcome
The problem is when a FeatureLines is formed from the outside border
The right side is working
But the left one does not work
because the number of vertices at the ARC is large and the distance between them is very small
The dynamo can’t configure it so it gives an error
like pictures

Therefore, you need to delete the vertices that are too close together through dynamo, liSP or any language

WWWWW



Q1
Drawing3.dwg (925.9 KB)

Remove vertices from 3d Polyline

[remove-vertexes-from-3d-polyline](https://adndevblog.typepad.com/autocad/2013/10/remove-vertexes-from-3d-polyline.html)
[CommandMethod("Remove3DVertex")]

static public void RemoveVertex()

{

    Document doc = Application.DocumentManager.MdiActiveDocument;

    Database db = doc.Database;

    Editor ed = doc.Editor;

 

    using (Transaction oTr =

                        db.TransactionManager.StartTransaction())

    {

        ObjectIdCollection ids = new ObjectIdCollection();

 

        PromptEntityOptions options =

                   new PromptEntityOptions("\nPick a 3DPolyline:");

        options.SetRejectMessage("Select 3DPolyline only" + "\n");

        options.AddAllowedClass(typeof(Polyline3d), true);

        PromptEntityResult result = ed.GetEntity(options);

 

        if (result.Status != PromptStatus.OK)

            return;

 

        Polyline3d oEnt = oTr.GetObject(result.ObjectId,

                                    OpenMode.ForRead) as Polyline3d;

 

 

        foreach (ObjectId oVtId in  oEnt)

        {

            PolylineVertex3d oVt = oTr.GetObject(oVtId,

                            OpenMode.ForRead) as PolylineVertex3d;

            PromptKeywordOptions oPko =

             new PromptKeywordOptions("\nWant to remove vertex at "

                                 + oVt.Position.ToString() + "?");

 

            oPko.AllowNone = false;

            oPko.Keywords.Add("Yes");

            oPko.Keywords.Add("No");

            oPko.Keywords.Default = "No";

            PromptResult oPkr = ed.GetKeywords(oPko);

 

            if (oPkr.Status == PromptStatus.OK

                                && oPkr.StringResult == "Yes")

            {

                ids.Add(oVtId);

            }

        }

 

        foreach (ObjectId oVtId in ids)

        {

            PolylineVertex3d oVt = oTr.GetObject(oVtId,

                        OpenMode.ForWrite) as PolylineVertex3d;

            oVt.Erase();

        }

 

        if (ids.Count != 0)

        {

            oEnt.UpgradeOpen();

            oEnt.RecordGraphicsModified(true);

        }

 

        oTr.Commit();

    }

}

@abdullahcicek @hosneyalaa there are some nodes in the Camber package that may help with this.

SampleLineCreation

1 Like

Hi @mzjensen @hosneyalaa
It would be very nice if the alignment offset can be selected on the right and left.

Thank you for that tip with the node package. I am using it for the sample lines. I am using your node to create the sample Lines by station. My challenge is just to change the right and left width as mentioned above. Do you have any idea how I can manipulate the width of the sample lines with dynamo? For the Layer and the style it is no problem. Thank you for your help.

Hi @HoRo,

Yeah, that is something that I want to try to improve. I think the best way to accomplish what you’re looking for would be to use the SampleLine.ByPoints node. The way that would work would be to first get coordinate systems along the alignment at the stations where you want the sample lines. Then you would use a Point.ByCartesianCoordinates node with the left and right offset widths for the sample lines. From there, use the points to create the sample lines.

I would like to look into adding that functionality into the SampleLine.ByStation node so you could just have some inputs for the right and left widths, but I haven’t had time for it yet. I do have it on the to-do list. Here’s the issue on GitHub for tracking purposes.

4 Likes