Ejemplo n.º 1
0
from afem.config import Settings
from afem.exchange import ImportVSP
from afem.graphics import Viewer

Settings.log_to_console()

fn = '../models/777-200LR.stp'

vsp_import = ImportVSP(fn)

gui = Viewer()
gui.add(*vsp_import.all_bodies)
gui.start()
Ejemplo n.º 2
0
def show_shapes(*shapes):
    gui = Viewer()
    gui.add(*shapes)
    gui.start()
Ejemplo n.º 3
0
alg1d = Regular1D(the_gen)
edges = the_shape.edges
cmp = CompoundByShapes(edges).compound
the_mesh.add_hypothesis(hyp1d, cmp)
the_mesh.add_hypothesis(alg1d, cmp)

# Unstructured quad-dominant
hyp2d = NetgenSimple2D(the_gen, 4.)
alg2d = NetgenAlgo2D(the_gen)
the_mesh.add_hypothesis(hyp2d, the_shape)
the_mesh.add_hypothesis(alg2d, the_shape)

# Apply mapped quadrangle to internal structure
# mapped_hyp = QuadrangleHypo2D(the_gen)
# mapped_alg = QuadrangleAlgo2D(the_gen)
# for part_ in internal_parts + [skin]:
#     for face in part_.faces:
#         if mapped_alg.is_applicable(face, True):
#             the_mesh.add_hypothesis(mapped_hyp, face)
#             the_mesh.add_hypothesis(mapped_alg, face)

the_gen.compute(the_mesh, the_shape)

# View
# skin.set_transparency(0.5)
v = Viewer()
v.add(wingbox)
v.start()
v.add(the_mesh)
v.start()
Ejemplo n.º 4
0
def show_shapes(*shapes):
    v = Viewer()
    v.add(*shapes)
    v.start()