We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm pretty inexperienced when it comes to python and it's probably the reason why I'm having trouble but, the Issue i'm having is placing a 3D renderer (proscene) into a 2D "Canvas". The idea is to have the 3D window running along side a 2D sketch. Here's the code from my main.py:
add_library('proscene') from PlaneConstructor import ThreeDimensionalPlane from PrismConstructor import RectangularPrism from ReadFile import readFile def setUpScene(): scene.setGridVisualHint(False) scene.setAxesVisualHint(False) if scene.is3D(): scene.setCameraType(Camera.Type.ORTHOGRAPHIC) scene.setRadius(150) scene.showAll() def setup(): global scene, offset size(1200,1200,P3D) scene = Scene(this) listOfPlanes = readFile(fileName) createSections(listOfPlanes) setUpScene() beamLength = calcBeamLength(listOfPlanes) offset = -1 * (float(beamLength) / 2) def draw(): background(140) drawSections(offset)
From what I've already read online, setup is where all the magic happens and I've tried implementing the solution from 3D window in 2D sketch, however when running the code with the changes, the 3D image stays as 2D and I can't draw anything outside the 3D window.
What are some other ways of implementing this?