# HatchByGeometry kit

**URL:** <https://forum.dynamobim.com/t/hatchbygeometry-kit/56987>\
**Category:** Civil 3D\
**Created:** [November 6, 2020, 2:33pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987 "2020-11-06T14:33:59Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerome.raby](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jerome.raby](https://forum.dynamobim.com/u/jerome.raby)\
**Post date:** [November 6, 2020, 2:33pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/1 "2020-11-06T14:33:59Z")

</div>

Hi, i want to hatch certain geometry that i got in my drawing. I made my geometry with polyline but all i can do with my code is to hatch.bygeometry and it doesnt work with polyline.Is there a solution? Normally i draw my roads, sidewalks and all my geometry in polyline and hatch it manually but i want to make it more quicker with dynamo.

---

<div class="post-metadata">

**Author:** ![shahid.shaikh\_C3D](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@shahid.shaikh\_C3D](https://forum.dynamobim.com/u/shahid.shaikh_C3D)\
**Post date:** [November 6, 2020, 3:19pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/2 "2020-11-06T15:19:05Z")

</div>

Hi Jerome,

you can convert polyline to polycurves and join this curves. this closed polycurve can be used to create hatch back to civil 3d again.

---

<div class="post-metadata">

**Author:** ![jerome.raby](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jerome.raby](https://forum.dynamobim.com/u/jerome.raby)\
**Post date:** [November 6, 2020, 3:23pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/3 "2020-11-06T15:23:26Z")

</div>

Ok, i will look for this solution. In the future i wish that polyline will be recognise and save some code.

---

<div class="post-metadata">

**Author:** ![jerome.raby](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jerome.raby](https://forum.dynamobim.com/u/jerome.raby)\
**Post date:** [November 6, 2020, 3:46pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/4 "2020-11-06T15:46:09Z")

</div>

Can you explain to me how to convert it?

---

<div class="post-metadata">

**Author:** ![shahid.shaikh\_C3D](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@shahid.shaikh\_C3D](https://forum.dynamobim.com/u/shahid.shaikh_C3D)\
**Post date:** [November 6, 2020, 3:49pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/5 "2020-11-06T15:49:33Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e05ba3d728f36bfbaa34256735b54d620d4fbebf.png)

not an expert but hope you are asking for this only

---

<div class="post-metadata">

**Author:** ![jerome.raby](https://avatars.discourse-cdn.com/v4/letter/j/77aa72/32.png) [@jerome.raby](https://forum.dynamobim.com/u/jerome.raby)\
**Post date:** [November 6, 2020, 4:01pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/6 "2020-11-06T16:01:04Z")

</div>

Thanks, but my code works with polycurves, but all my cad drawing are made with polylines. If i understand dynamo is note able to hatch a form made by a polyline.

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [November 6, 2020, 7:12pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/7 "2020-11-06T19:12:43Z")

</div>

Hi @jerome.raby,

Welcome to the forum. The process that @shahid.shaikh_C3D outlined is what you should do.

> [@jerome.raby](#):
>
> If i understand dynamo is note able to hatch a form made by a polyline.

Perhaps a discussion about object types would be helpful here. Dynamo has it’s own set of object types that are independent from AutoCAD or Civil 3D object types. Polylines are great examples - a Polyline is an AutoCAD object, and the corresponding Dynamo object is a Curve, of which a PolyCurve is a subset. You can read more about that here:  
[https://primer.dynamobim.org/05\_Geometry-for-Computational-Design/5-4\_curves.html](https://primer.dynamobim.org/05_Geometry-for-Computational-Design/5-4_curves.html)

If you hover over the “boundaries” input port on the _Hatch.ByGeometry_ node, you will see that it requires a PolyCurve input, which is why @shahid.shaikh_C3D said that you need to “convert” the Polyline to a PolyCurve using _Object.Geometry_. This aligns with the general approach to constructing a Dynamo graph:

1. Select objects/elements in host application (Civil 3D)
2. Convert objects to Dynamo objects (Polyline → PolyCurve)
3. Perform Dynamo operations (not applicable here, but very common in more complex graphs)
4. Output result back to host application or dump to external file (Civil 3D, Excel, etc.)

---

<div class="post-metadata">

**Author:** ![genossealex](https://avatars.discourse-cdn.com/v4/letter/g/97f17d/32.png) [@genossealex](https://forum.dynamobim.com/u/genossealex)\
**Post date:** [July 26, 2022, 2:50pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/8 "2022-07-26T14:50:48Z")

</div>

Is it possible to create a hatch which is associative with the boundary object?

---

<div class="post-metadata">

**Author:** ![wardhanraj](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@wardhanraj](https://forum.dynamobim.com/u/wardhanraj)\
**Post date:** [November 9, 2022, 10:09pm UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/9 "2022-11-09T22:09:10Z")

</div>

Hi @shahid.shaikh_C3D

Can we put different hatch patterns for different objects ,in the thing which you have shown above.

---

<div class="post-metadata">

**Author:** ![shahid.shaikh\_C3D](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@shahid.shaikh\_C3D](https://forum.dynamobim.com/u/shahid.shaikh_C3D)\
**Post date:** [November 10, 2022, 4:36am UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/10 "2022-11-10T04:36:56Z")

</div>

Hi @wardhanraj if you look closely, the second input is hatch pattern and so is there the other inputs about hatch.

if you are wondering about input this might help you.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/f/afeb91401230e481a0ec8be445953ef156806747.png)

---

<div class="post-metadata">

**Author:** ![wardhanraj](https://avatars.discourse-cdn.com/v4/letter/w/47e85d/32.png) [@wardhanraj](https://forum.dynamobim.com/u/wardhanraj)\
**Post date:** [November 10, 2022, 7:44am UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/11 "2022-11-10T07:44:39Z")

</div>

Yes.Thanks for reply.

Can we have different hatch patterns,if there are many objects?

---

<div class="post-metadata">

**Author:** ![shahid.shaikh\_C3D](https://avatars.discourse-cdn.com/v4/letter/s/77aa72/32.png) [@shahid.shaikh\_C3D](https://forum.dynamobim.com/u/shahid.shaikh_C3D)\
**Post date:** [November 11, 2022, 6:56am UTC](https://forum.dynamobim.com/t/hatchbygeometry-kit/56987/12 "2022-11-11T06:56:09Z")

</div>

Yes, you have to play with list levels. you can have a list of objects and list of hatch patterns.
