# Error when using the generate-new command

**URL:** <https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264>\
**Category:** 3DEC\
**Created:** [December 6, 2023, 10:05am UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264 "2023-12-06T10:05:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [December 6, 2023, 10:05am UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/1 "2023-12-06T10:05:24Z")

</div>

Hi there!

I am having troubles when using the [generate-new](https://docs.itascacg.com/flac3d700/3dec/block/doc/manual/block_manual/block_commands/block.zone/cmd_block.zone.generate-new.html?highlight=generate%20new) command in 3DEC 7.00. I provide my script below.

Here is the thing: I have two planes, and I would like to refine the mesh around some points.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/7df3a330b0d61946c118bc09af652ceb8944284e.png)

Refining around first and third points just work ok:

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/c0655eb798bf8c9247686e6b394199b121545ac1.png)

However, refining around the second point raises the following error `[CM2_ERROR] Two nodes are too close to each other (same position or almost)` even if I try to refine around this point only.

Testing the `gradation-surface` and `gradation-volume` did not solve the error.

Am I doing something wrong?

Thanks in advance for your help and suggestions!

Regards

Théophile

PS : the script

```auto
model new

block create brick 0,1000

block cut joint-set origin (500.0, 500.0, 500.0) dip 40.0 dip-direction 270.0
block cut joint-set origin (400.0, 500.0, 400.0) dip 60.0 dip-direction 90.0

data scalar add (100.0, 500.0, 919.6152422706631) group "pt=1"
data scalar add (187.42671061339095, 500.0, 237.71986815982717) group "pt=2"
data scalar add (549.0581942390521, 500.0, 141.82363429349132) group "pt=3"

block zone size isolated-point (100.0, 500.0, 919.6152422706631) edgelength 20
block zone size isolated-point (187.42671061339095, 500.0, 237.71986815982717) edgelength 20
block zone size isolated-point (549.0581942390521, 500.0, 141.82363429349132) edgelength 20

block zone generate-new gradation-surface 0.5 gradation-volume 0.5 maximum-edge 200 minimum-edge 20

```

---

<div class="post-metadata">

**Author:** ![jhazzard](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@jhazzard](https://forum.itascainternational.com/u/jhazzard)\
**Post date:** [December 7, 2023, 2:27pm UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/2 "2023-12-07T14:27:32Z")

</div>

@Huy can you help with this?

---

<div class="post-metadata">

**Author:** ![Huy](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@Huy](https://forum.itascainternational.com/u/Huy)\
**Post date:** [December 8, 2023, 4:09pm UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/3 "2023-12-08T16:09:57Z")

</div>

Hello,  
The idea of the isolated-point is to specify a zone size near a point inside a blocks. This command has been improved in 3DEC9.0.  
However, in 3DEC7.0, what you can do is to to reduce the edge length near the second point as following.

```auto
block zone size isolated-point (187.42671061339095, 500.0, 237.71986815982717) edgelength 10

```

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/1a7e8059d9c67daf755ca1cdaba94d1167ae24db.png)

---

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [December 12, 2023, 4:06pm UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/4 "2023-12-12T16:06:39Z")

</div>

Hi @Huy !

Your suggestion did work, thanks a lot!

Also, I tested the same script with 3DEC9.0 (with a refining of 20 around all three points).  
No vertex was inserted at point 2 but at least the process did not crash.

 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/f09408fc2752f7c6d86867ff93b60f4ab82a854b.png)

I used the `isolated-point` command since it was a suggestion from an Itasca presentation of [3DEC meshing solutions](https://www.youtube.com/watch?v=5LsUz_KB7MQ&t=815s). Would you advise using another one?

Théophile

---

<div class="post-metadata">

**Author:** ![Huy](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@Huy](https://forum.itascainternational.com/u/Huy)\
**Post date:** [December 13, 2023, 8:04am UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/5 "2023-12-13T08:04:25Z")

</div>

Hi, you can try to specify the zone size on these faces to get a fine mesh.  
You can test a new option number-control-point in the command “BLOCK ZONE GEN-NEW”. By default, this number is 5.

Huy

---

<div class="post-metadata">

**Author:** ![Theophile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.itascainternational.com/theophile/32/299_2.png) [@Theophile](https://forum.itascainternational.com/u/Theophile)\
**Post date:** [December 13, 2023, 11:02am UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/6 "2023-12-13T11:02:20Z")

</div>

Hi!

Thanks for the hint. I did test modifying `number-control-point` but point 2 is still missing.  
Anyway, with all the information you gave me, I should be ok for now, thanks again.

Théophile

PS : it seems like today is your birthday, so I hope you don’t mind if I wish you a happy one!

---

<div class="post-metadata">

**Author:** ![Huy](https://avatars.discourse-cdn.com/v4/letter/h/c5a1d2/32.png) [@Huy](https://forum.itascainternational.com/u/Huy)\
**Post date:** [December 17, 2023, 8:16pm UTC](https://forum.itascainternational.com/t/error-when-using-the-generate-new-command/1264/7 "2023-12-17T20:16:08Z")

</div>

Thank you @Theophile
