# Problem model.cylinder\_from\_points

**URL:** <https://openmc.discourse.group/t/problem-model-cylinder-from-points/1918>\
**Category:** User Support\
**Created:** [April 11, 2022, 6:57am UTC](https://openmc.discourse.group/t/problem-model-cylinder-from-points/1918 "2022-04-11T06:57:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![YimingZ](https://avatars.discourse-cdn.com/v4/letter/y/f19dbf/32.png) [@YimingZ](https://openmc.discourse.group/u/YimingZ)\
**Post date:** [April 11, 2022, 6:57am UTC](https://openmc.discourse.group/t/problem-model-cylinder-from-points/1918/1 "2022-04-11T06:57:08Z")

</div>

Hi guys,

Here is a problem with the model building API: Openmc. model.cylinder\_from\_points. I’m using this function to build a sample geometry model like a cylinder whose axis on points (0, 0, 0) and (2,2,0) with a radius of 1cm. This simple model will be extended to be a bowing fuel rod later.

The cylinder surface was created by this API, and it is used to define a cell. However, geometry.xml does not express this surface after running. The universe\_plotter can not plot this surface when the cell has filled into the root universe either.

I suspect it is because the cylindrical surface is not correctly defined. But I’m not sure how to fix this problem. The working notebook has been attached here.  
[qudric\_surface.py](https://openmc.discourse.group/uploads/short-url/6TLQoUC7xSCwXTFjhKFfGu0ETq3.py) (1.4 KB)

Please contact me if you know how to use this function correctly. Many thanks.

Best wishes,  
Yiming

---

<div class="post-metadata">

**Author:** ![bentridisalah](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/bentridisalah/32/1421_2.png) [@bentridisalah](https://openmc.discourse.group/u/bentridisalah)\
**Post date:** [April 16, 2022, 1:07pm UTC](https://openmc.discourse.group/t/problem-model-cylinder-from-points/1918/2 "2022-04-16T13:07:02Z")

</div>

Hi @YimingZ ;

I think that you should take look on the following post:

> [@Example of a Quadric surface.](https://openmc.discourse.group/t/example-of-a-quadric-surface/409):
>
> Right now, openmc.XCylinder, openmc.YCylinder, openmc.ZCylinder, can be modeled on its axis. To model XCylinder in 45, 135, 225, 315-degree angle openmc uses Quadric surface. Does anyone have an example of how the Quadric surface works? A demo of the behavior is very helpful to understand. This is also true for the Openmc documentation sites. I have an octagon shape surrounding multiple z cylinders. I have x and y cylinders pierced through the octagon and ended up in different z cylinders outer.…

you my also contact the concerned person (@shabudarda) because it seems that he succeeded to use such that function and master it very well.

Gook luck

---

<div class="post-metadata">

**Author:** ![paulromano](https://yyz2.discourse-cdn.com/free1/user_avatar/openmc.discourse.group/paulromano/32/486_2.png) [@paulromano](https://openmc.discourse.group/u/paulromano)\
**Post date:** [May 5, 2022, 3:52pm UTC](https://openmc.discourse.group/t/problem-model-cylinder-from-points/1918/3 "2022-05-05T15:52:23Z")

</div>

@YimingZ The problem in your script is the following line:

```nohighlight
root.add_cell = (qudric1_cell)

```

This line is setting the attribute `add_cell` to the variable `qudric1_cell`. You should be _calling_ `add_cell`:

```nohighlight
root.add_cell(qudric1_cell)

```
