Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming problem #23

Open
eflurin opened this issue May 19, 2020 · 2 comments
Open

Naming problem #23

eflurin opened this issue May 19, 2020 · 2 comments

Comments

@eflurin
Copy link
Collaborator

eflurin commented May 19, 2020

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])

@clarke-smith
Copy link
Collaborator

i think this is the same issue with subtract that i raised in drawpylib

@eflurin
Copy link
Collaborator Author

eflurin commented May 20, 2020

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants