This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def mesh_pyassimp(pth): | |
import pyassimp | |
scene = pyassimp.load(pth) | |
meshes = [] | |
for msh in scene.meshes: | |
meshes.append((msh.vertices, msh.faces, msh.normals)) | |
return meshes | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from OCC.STEPControl import STEPControl_Reader | |
from OCC.Graphic3d import Graphic3d_NOM_STEEL | |
from OCC.BRepAlgoAPI import BRepAlgoAPI_Cut | |
from OCC.Display.SimpleGui import init_display | |
from OCC.BRepPrimAPI import BRepPrimAPI_MakeBox | |
from OCC.gp import gp_Vec, gp_Trsf | |
from OCC.BRepBuilderAPI import BRepBuilderAPI_Transform | |
# loads file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
from OCC.gp import gp_Pnt, gp_OX, gp_Vec, gp_Trsf, gp_DZ, gp_Ax2, gp_Ax3, gp_Pnt2d, gp_Dir2d, gp_Ax2d | |
from OCC.GC import GC_MakeArcOfCircle, GC_MakeSegment | |
from OCC.GCE2d import GCE2d_MakeSegment | |
from OCC.Geom import Geom_Plane, Geom_CylindricalSurface, Handle_Geom_Plane, Handle_Geom_Surface | |
from OCC.Geom2d import Geom2d_Ellipse, Geom2d_TrimmedCurve, Handle_Geom2d_Ellipse, Handle_Geom2d_Curve | |
from OCC.BRepBuilderAPI import BRepBuilderAPI_MakeEdge, BRepBuilderAPI_MakeWire, BRepBuilderAPI_MakeFace, \ | |
BRepBuilderAPI_Transform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import IPython 1.0 | |
Item { | |
id: ipy_shell | |
IPyShellQml { | |
id: ipy_shell_qml | |
anchors.fill: parent | |
Component.onCompleted: { console.log(ipy_shell_qml + " initialized") } |