C3D - Create Solid From Selected Elements

Hi, i need some help.

I’m wondering if it’s possible to generate a solid model from elements (either by selections or by layer)
,with specified height, in the model space?

Image on top is a series of lines and the second one is a polyline.

Thanks ahead.

Regards,
joel

Hi @Joel_Buenafe ,

Sure!

  • You’ll have to start by importing your AutoCAD lines into Dynamo. I highly recommend using the Civil3DToolkit Package node PolyLineExtensions.Geometry for this.
  • Then, you’ll have to create one closed loop per shape, for this you can use the node PolyCurve.ByJoinedCurves.
  • From these polycurves you can create a Surface with the Surface.ByPatch node.
  • From this Surface you can create a solid, with the Surface.Thicken nodes (there are multiple depending on your needs).
  • Done :smiley:

1 Like

One last step to get to this part. Add an Object.ByGeometry node at the end.

2 Likes

hi Daan & mzjensen,

First of all, many thanks for the quick reply. Really appreciate it.

Can you further help me what’s wrong with what i did below.

Thanks ahead.

Regards,
joel

Hi Joel,

You are missing the AutoCAD geometry (lines) to Dynamo (curves) conversion step.

1 Like

Yehey! This works!

I’m just wondering if my selection are lines instead of polylines. I don’t want
to pedit especially if there are many like walls on the building for example.

thanks ahead.

REgards,
Joel

Hi @Joel_Buenafe ,

The script works for both :slight_smile:

Hi Daan,

Sorry i fell asleep last night.

All polylines/circles are generated while line elements are not.
Can you further help me on this please?

Very much appreciated.

Many thanks.

Regards,
Joel

Hi @Joel_Buenafe ,

Your Surface.ByPatch node is erroring since you have an input like this: (The different colors here correspond to your Lines, and a PolyLine.)

Since your lines aren’t closed curves the Surface.ByPatch node errors since it doesn’t know what to do.
To circumvent this issue you’ll have to group your curves and transform them ALL into PolyCurves, since the Surface.ByPatch node expects a closed PolyCurve (you are now feeding straight, single Curves).

I would suggest adding the Archi Lab package node Group.Curves after your PolyLineExtensions.GetGeometry node, this will group your curves, then use the PolyCurve.ByCurves node to create only PolyCurves. Use this as input for your Surface.ByPatch node.

Hi Daan,

I was about to download when i noticed that this is for Revit?

Will this work on Civil 3D as well?

Thank you.

Regards,
Joel

The blue text gives you the dependencies of the package, which in this case are Revit and IronPython2. So the answer is no, archi-lab will not work in Dynamo for Civil 3D.

2 Likes

Thanks mzjensen

as @mzjensen has stated previously, archi-lab will not work in Dynamo for Civil 3D. However, if you can open it in revit, I believe you can take the code from the nodes. the “group_curves” node’s code is fully usable in civil 3D.

I hunted down the code for it and used it my text-halo script. I have also re-shared the code in my post:

Adding Underlay Hatching to MText