Skip to content

Naming problem #23

@eflurin

Description

@eflurin

I try to create two cylinders and subtract them from a box, but there is a weird naming process that make it fail.
Here is the code:

from HFSSdrawpy import *
from HFSSdrawpy.libraries.base_elements import *
import numpy as np
from HFSSdrawpy.utils import parse_entry, Vector

pm = Modeler('hfss')

chip = Body(pm, 'chip')

cydinder_posX = pm.set_variable('0mm')
cydinder_posY = pm.set_variable('0mm')
cydinder_posZ = pm.set_variable('0mm')
cydinder_rad = pm.set_variable('0.275mm')

chip_width = pm.set_variable('10mm')
chip_length = pm.set_variable('10mm')
chip_thickness = pm.set_variable('1mm')

chip_sapphire = box(chip, [-chip_width/2, -chip_length/2, 0],
[chip_width, chip_length, -chip_thickness],
name="chip_sapphire")

chip_sapphire.assign_material("sapphire")

hole1 = cylinder(chip,[cydinder_posX, cydinder_posY, cydinder_posZ],
cydinder_rad,
-chip_thickness,
'Z',
nonmodel=True,
name='hole1')

hole2 = cylinder(chip,[cydinder_posX, cydinder_posY+'1mm', cydinder_posZ],
cydinder_rad,
-chip_thickness,
'Z',
nonmodel=True,
name='hole2')

chip_sapphire.subtract([hole1,hole2])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions