# Rectangle offset creates round corners

**URL:** <https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [December 20, 2018, 8:32am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942 "2018-12-20T08:32:40Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 8:32am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/1 "2018-12-20T08:32:40Z")

</div>

Hi

I an trying to offset a simple rectangle [EDIT: not a rectangle just 4 straight edges] polycurve, but the offset produces round corners.  
How can i get sharp corners?

 ![20181220%2001](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/9/69c26e9557726760b3d5aab807ec94b4bd5d5c44.png)

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 8:33am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/2 "2018-12-20T08:33:54Z")

</div>

this is the graph

 ![20181220%2003](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/a/ca7e42a88a1a9048fe9eaaf8fc9b78819b32e1c2.jpeg)

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [December 20, 2018, 8:53am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/4 "2018-12-20T08:53:42Z")

</div>

Do you get the same result if you extract the 4 corner points (Polycurve curves, Curve Start and End Points, combine and flatten list, Prune duplicates, sort order to perimeter non-branching) and build a Rectangle object and offset that instead?

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 9:03am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/5 "2018-12-20T09:03:58Z")

</div>

> [@Ewan\_Opie](#):
>
> sort order to perimeter non-branching

how would you do that? manually?

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 9:08am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/6 "2018-12-20T09:08:27Z")

</div>

oops, sorry. The curves aren’t rectangular [Edited at post 1]

its just a closed curve with 4 straight edges.

 ![20181220%2005](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/a/5a027a94d6e3b8e45f7c804c50306047861191cd.jpeg)

 ![20181220%2006](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/c/8c20c0afbd51a9ccd06009358a6e2eb9a9decf32.jpeg)

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 9:15am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/7 "2018-12-20T09:15:31Z")

</div>

For a moment I thought that i had it fixed. But some other ‘strangeness’ appears.

At offset value 5000 the offset looks straight edged

At offset value 7000 there are round corners again!

 ![20181220%2007](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/e/6ebe5614317ca172da816ce1b403f365b2bbffc2.jpeg)

 ![20181220%2008](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/e/1e700cfdcf0f15410a24be877c4e44e34cb25a68.jpeg)

---

<div class="post-metadata">

**Author:** ![Ewan\_Opie](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ewan_opie/32/77070_2.png) [@Ewan\_Opie](https://forum.dynamobim.com/u/Ewan_Opie)\
**Post date:** [December 20, 2018, 9:18am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/8 "2018-12-20T09:18:03Z")

</div>

The node **❄\_Sort Points as Perimeter** from the _Sastrugi_ package can sort the points.

But as it is not a rectangular shape, have you looked at this post?

> [@Offset or scale closed polycurve to target area](https://forum.dynamobim.com/t/offset-or-scale-closed-polycurve-to-target-area/9377/3):
>
> Ok, @Tchunoo_Kahng, I’m gonna go forward and view your challenge as a nail, though it probably isn’t… And then I’m gonne use the biggest hammer of them all. It’s not efficient, it’s very slow, it’s quite complicated, but it’s very cool anyways. Consider this response as digression and an attempt to lure you into the realm of multiobjective genetic algorithms. slight_smile The hammer I’m talking about is the Optimo package. You can read a little bit about it [here](https://github.com/mrahmaniasl/Optimo/wiki/0_-Home), but in effect Optimo is a mu…

Or this one, as the shape displayed as working is consistent with yours.

> [@Offset curve not consistent](https://forum.dynamobim.com/t/offset-curve-not-consistent/3198/2):
>
> I didn’t have a problem in offsetting the selected curves. The offset direction issue has been discussed a few times on this forum.

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 11:16am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/9 "2018-12-20T11:16:34Z")

</div>

I do not see immediately how these topics relate to mine.

However, in the meantime I built a ‘manual offset’ method. Quite ridiculously devious but i think it works.

 ![20181220%2009](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/3/d308b06740f41ce3e10e8495abe3e87de7e679e8.jpeg)

 ![20181220%2010](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/6/662edac39be7632cd4cdf07ced438f88d8f6fbf2.jpeg)

Still, if anyone has an immediate answer to my original question (Why are the offset corners round???) then please.

@Ewan_Opie thanks anyhow!

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 11:29am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/10 "2018-12-20T11:29:51Z")

</div>

I just realise that the method above will only work for basic shapes.  
Any irregular shape and it will probably fail…  
Still need a clean way to get a simple offset fixed.

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 11:47am UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/11 "2018-12-20T11:47:52Z")

</div>

Tried from scratch in a new file. Still the same behaviour 😡

 ![20181220%2010](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/4/740eb75ad900c00914aab8c76e10360d07bbe957.png)

 ![20181220%2013](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1beebcf07671a763fcd7ad5e3be551802232edf4.png)

 ![20181220%2011](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/e/bee4b176d0f92c6a9cc9986e79364c1f54fd42a3.png)

 ![20181220%2012](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/e/4e573fd427087ad65b550b55c7a7d106fc570bd2.png)

Using Dynamo 2.0.2…

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 12:10pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/12 "2018-12-20T12:10:15Z")

</div>

For a second I thought that maybe PolyCurve.Offset instead of Curve.Offset would help, since it has the ‘extendCircular’ parameter.

Sill no result though.

 ![20181220%2015](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/c/cca133cb16f7af862fbd6a82de5ad49a5b5678cc.jpeg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [December 20, 2018, 12:17pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/13 "2018-12-20T12:17:08Z")

</div>

Can you share the dyn and the content required to reproduce this?

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 12:25pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/14 "2018-12-20T12:25:58Z")

</div>

@jacob.small Sure. (thanks for your help. much appreciated.)

here is a download link

> **[big graph.dyn and 2 more files](https://wetransfer.com/downloads/265319b68acb93eee6b917435bdb324620181220122528/37908d)**
>
> 3 files sent via WeTransfer, the simplest way to send your files around the world

---

<div class="post-metadata">

**Author:** ![GinoKoolman](https://avatars.discourse-cdn.com/v4/letter/g/e47774/32.png) [@GinoKoolman](https://forum.dynamobim.com/u/GinoKoolman)\
**Post date:** [December 20, 2018, 1:53pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/15 "2018-12-20T13:53:55Z")

</div>

Hi, are you working in Geometry Scaling Large or XL? Based on the coordinates Geometry Scaling ‘Medium’ will transform your geometries.

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 2:19pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/16 "2018-12-20T14:19:24Z")

</div>

@GinoKoolman U the man! Thanks a lot.

 ![20181220%2025](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/c/bc426f81188bd5b9b16e1620e75589623753944a.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [December 20, 2018, 2:21pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/17 "2018-12-20T14:21:27Z")

</div>

Hi @jnoordzij

Is your issue solved?

---

<div class="post-metadata">

**Author:** ![jnoordzij](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jnoordzij/32/32419_2.png) [@jnoordzij](https://forum.dynamobim.com/u/jnoordzij)\
**Post date:** [December 20, 2018, 2:22pm UTC](https://forum.dynamobim.com/t/rectangle-offset-creates-round-corners/29942/18 "2018-12-20T14:22:36Z")

</div>

I believe so, yes. Thank you.

EDIT: make that a definitive yes. Thank you all.
