Skip to content
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

ZMT zurich med tech

  1. Home
  2. Sim4Life
  3. Python API
  4. draw hemisphere

draw hemisphere

Scheduled Pinned Locked Moved Python API
3 Posts 2 Posters 356 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ari
    wrote on last edited by
    #1

    I have to draw a hemisphere attached to another hemisphere,
    like in the photo but stick perfectly to form a sphere.
    7a86a5d3-0cbb-4ef1-921e-66cd1ed1eba9-image.png
    62e72b95-71b7-4506-8485-6bf99407145f-image.png
    is it possible to write python code to do it?
    I need to do it by python and not manually because then I have to draw another 10000 hemispheres in different points of the space.
    I know the radius of the hemispheres and the position of the center of the sphere.

    Thanks!

    1 Reply Last reply
    0
    • SylvainS Offline
      SylvainS Offline
      Sylvain
      ZMT
      wrote on last edited by
      #2

      you could try to create a sphere, and a cube, and then subtract the cube from the sphere using s4l_v1.model.Subtract([sphere, cube]) (or the other way around, I never know for sure... ;) )

      1 Reply Last reply
      0
      • A Offline
        A Offline
        Ari
        wrote on last edited by Ari
        #3

        thank you! It works :)
        I finally had to separate the two hemispheres because I wanted to impose a boundary condition on one sphere and a different boundary condition on the other, but if they were too close it didn't work.

        69ed604f-852c-43d3-b4df-4b4c43b5a472-image.png

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Search