We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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])
The text was updated successfully, but these errors were encountered:
i think this is the same issue with subtract that i raised in drawpylib
Sorry, something went wrong.
yes
No branches or pull requests
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])
The text was updated successfully, but these errors were encountered: