Make detail ppt with picture

Reading File
Reading File
Reading File
Running Command

cd /tmp/workspace/attachments/c6f8406a-0d19-4262-8e15-85208ae94f8b && python3 -c " import pdfplumber, json images_info = [] text_by_page = [] with pdfplumber.open('Maxillary-skeletal-expander-with-6-miniscrews-and-.pdf') as pdf: print(f'Total pages: {len(pdf.pages)}') for i, page in enumerate(pdf.pages): text = page.extract_text() or '' text_by_page.append({'page': i+1, 'text': text[:3000]}) print(f'--- PAGE {i+1} ---') print(text[:500]) print() "

Running Command

cd /tmp/workspace/attachments/c6f8406a-0d19-4262-8e15-85208ae94f8b && python3 -c " import pdfplumber full_text = {} with pdfplumber.open('Maxillary-skeletal-expander-with-6-miniscrews-and-.pdf') as pdf: for i, page in enumerate(pdf.pages): text = page.extract_text() or '' full_text[i+1] = text for pg, txt in full_text.items(): print(f'=== PAGE {pg} ===') print(txt) print() "

Running Command

cd /tmp/workspace/attachments/c6f8406a-0d19-4262-8e15-85208ae94f8b && python3 -c " from pypdf import PdfReader import os, base64 reader = PdfReader('Maxillary-skeletal-expander-with-6-miniscrews-and-.pdf') print(f'Pages: {len(reader.pages)}') # Extract images os.makedirs('/tmp/workspace/mse_ppt/images', exist_ok=True) img_count = 0 for page_num, page in enumerate(reader.pages): if '/Resources' in page and '/XObject' in page['/Resources']: xobjects = page['/Resources']['/XObject'] if hasattr(xobjects, 'items'): for name, obj in xobjects.items(): try: obj = obj.get_object() if obj.get('/Subtype') == '/Image': img_count += 1 width = obj.get('/Width', 0) height = obj.get('/Height', 0) color_space = obj.get('/ColorSpace', 'Unknown') filter_type = obj.get('/Filter', 'Unknown') print(f'Page {page_num+1}, Image {name}: {width}x{height}, CS={color_space}, Filter={filter_type}') # Try to save as PNG try: from PIL import Image import io data = obj.get_data() if filter_type == '/DCTDecode': img = Image.open(io.BytesIO(data)) fname = f'/tmp/workspace/mse_ppt/images/page{page_num+1}_{name[1:]}.jpg' img.save(fname) print(f' Saved: {fname}') except Exception as e: print(f' Could not save: {e}') except Exception as e: print(f' Error: {e}') print(f'Total images found: {img_count}') "

Running Command

python3 << 'PYEOF' from pptx import Presentation from pptx.util import Inches, Pt, Emu from pptx.dml.color import RGBColor from pptx.enum.text import PP_ALIGN, MSO_ANCHOR from pptx.util import Inches, Pt import os from io import BytesIO # Colors DARK_BLUE = RGBColor(0x1A, 0x3A, 0x5C) ACCENT_BLUE = RGBColor(0x21, 0x6F, 0xAF) LIGHT_BLUE = RGBColor(0xD6, 0xEA, 0xF8) WHITE = RGBColor(0xFF, 0xFF, 0xFF) DARK_GRAY = RGBColor(0x33, 0x33, 0x33) LIGHT_GRAY = RGBColor(0xF5, 0xF5, 0xF5) ORANGE = RGBColor(0xE8, 0x76, 0x22) GREEN = RGBColor(0x1E, 0x8B, 0x4C) IMG_DIR = '/tmp/workspace/mse_ppt/images/' prs = Presentation() prs.slide_width = Inches(13.333) prs.slide_height = Inches(7.5) blank_layout = prs.slide_layouts[6] def add_bg(slide, color=DARK_BLUE): from pptx.util import Emu bg = slide.shapes.add_shape(1, 0, 0, prs.slide_width, prs.slide_height) bg.fill.solid() bg.fill.fore_color.rgb = color bg.line.fill.background() def add_rect(slide, x, y, w, h, color, alpha=None): shape = slide.shapes.add_shape(1, Inches(x), Inches(y), Inches(w), Inches(h)) shape.fill.solid() shape.fill.fore_color.rgb = color shape.line.fill.background() return shape def add_textbox(slide, text, x, y, w, h, size=18, bold=False, color=WHITE, align=PP_ALIGN.LEFT, italic=False, wrap=True): tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)) tf = tb.text_frame tf.word_wrap = wrap tf.margin_left = 0; tf.margin_right = 0; tf.margin_top = 0; tf.margin_bottom = 0 p = tf.paragraphs[0] p.alignment = align run = p.add_run() run.text = text run.font.size = Pt(size) run.font.bold = bold run.font.italic = italic run.font.color.rgb = color run.font.name = 'Calibri' return tf def add_multiline_tb(slide, lines, x, y, w, h, size=14, color=WHITE, bold_first=False, line_spacing=1.2): from pptx.oxml.ns import qn from lxml import etree tb = slide.shapes.add_textbox(Inches(x), Inches(y), Inches(w), Inches(h)) tf = tb.text_frame tf.word_wrap = True tf.margin_left = 0; tf.margin_right = 0; tf.margin_top = 0; tf.margin_bottom = 0 for i, line in enumerate(lines): if i == 0: p = tf.paragraphs[0] else: p = tf.add_paragraph() run = p.add_run() run.text = line run.font.size = Pt(size) run.font.color.rgb = color run.font.name = 'Calibri' if bold_first and i == 0: run.font.bold = True return tf def add_image(slide, path, x, y, w, h=None): try: if h: slide.shapes.add_picture(path, Inches(x), Inches(y), Inches(w), Inches(h)) else: slide.shapes.add_picture(path, Inches(x), Inches(y), Inches(w)) return True except Exception as e: print(f'Image error {path}: {e}') return False def header_bar(slide, title, subtitle=None): # Top bar add_rect(slide, 0, 0, 13.333, 1.1, ACCENT_BLUE) add_rect(slide, 0, 1.1, 13.333, 0.05, ORANGE) add_textbox(slide, title, 0.3, 0.1, 12.5, 0.7, size=30, bold=True, color=WHITE, align=PP_ALIGN.LEFT) if subtitle: add_textbox(slide, subtitle, 0.3, 0.75, 12.5, 0.35, size=13, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.LEFT, italic=True) def footer(slide, text='Cantarella et al. | AJO-DO Clinical Companion 2025 | Vol 5, Issue 3'): add_rect(slide, 0, 7.2, 13.333, 0.3, DARK_BLUE) add_textbox(slide, text, 0.3, 7.22, 12.5, 0.25, size=9, color=LIGHT_BLUE, align=PP_ALIGN.LEFT) # ─── SLIDE 1: TITLE ─────────────────────────────────────────────────────────── s1 = prs.slides.add_slide(blank_layout) add_bg(s1, DARK_BLUE) add_rect(s1, 0, 0, 13.333, 7.5, DARK_BLUE) # Gradient-like overlay add_rect(s1, 0, 0, 13.333, 3.2, ACCENT_BLUE) add_rect(s1, 0, 3.15, 13.333, 0.08, ORANGE) add_textbox(s1, 'CLINICAL TECHNIQUES', 0.5, 0.25, 12, 0.5, size=14, bold=True, color=LIGHT_BLUE, align=PP_ALIGN.CENTER, italic=True) add_textbox(s1, 'Maxillary Skeletal Expander with\n6 Miniscrews and Tadlock', 0.5, 0.65, 12.3, 2.0, size=34, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_textbox(s1, 'A Case Report', 0.5, 2.6, 12.3, 0.55, size=20, bold=False, color=LIGHT_BLUE, align=PP_ALIGN.CENTER, italic=True) add_rect(s1, 1.5, 3.4, 10.3, 0.04, ORANGE) add_textbox(s1, 'Cantarella, Park, Karanxha, Mancini, Del Fabbro, Caprioglio, Moon', 0.5, 3.5, 12.3, 0.45, size=13, color=LIGHT_BLUE, align=PP_ALIGN.CENTER) add_textbox(s1, 'Mesa, AZ | Milan & Treviso, Italy | Seoul & Suwon, South Korea | Cambridge, MA', 0.5, 3.95, 12.3, 0.4, size=11, color=RGBColor(0xA0,0xC8,0xE8), align=PP_ALIGN.CENTER, italic=True) # Key stats boxes for i, (val, lbl) in enumerate([('MARPE', 'Device Type'), ('6', 'Miniscrews'), ('15 yrs 4 mo', 'Patient Age'), ('7 mm', 'Total Expansion')]): bx = 1.0 + i * 2.9 add_rect(s1, bx, 4.55, 2.5, 1.2, ACCENT_BLUE) add_rect(s1, bx, 4.55, 2.5, 0.05, ORANGE) add_textbox(s1, val, bx+0.05, 4.65, 2.4, 0.55, size=20, bold=True, color=WHITE, align=PP_ALIGN.CENTER) add_textbox(s1, lbl, bx+0.05, 5.2, 2.4, 0.35, size=11, color=LIGHT_BLUE, align=PP_ALIGN.CENTER) add_textbox(s1, 'AJO-DO Clinical Companion | 2025, Vol 5, Issue 3 | pp. 260-269', 0.5, 6.95, 12.3, 0.4, size=10, color=RGBColor(0x80,0xA8,0xC8), align=PP_ALIGN.CENTER) # ─── SLIDE 2: INTRODUCTION & BACKGROUND ────────────────────────────────────── s2 = prs.slides.add_slide(blank_layout) add_bg(s2, LIGHT_GRAY) add_rect(s2, 0, 0, 13.333, 7.5, WHITE) header_bar(s2, 'Introduction & Background', 'Maxillary Transverse Deficiency (MTD) and MARPE') footer(s2) # Left column add_rect(s2, 0.3, 1.3, 5.8, 5.7, LIGHT_GRAY) add_rect(s2, 0.3, 1.3, 5.8, 0.04, ACCENT_BLUE) add_textbox(s2, 'What is MTD?', 0.45, 1.35, 5.5, 0.4, size=14, bold=True, color=DARK_BLUE) bullets = [ '• Skeletal discrepancy between maxillary and mandibular basal bone width', '• Common orthodontic finding affecting facial aesthetics and occlusion', '• Clinical signs: posterior crossbite, buccally flared teeth, crowding, large buccal corridors', '• Diagnosis: clinical findings + radiographic examination (CBCT)', ] add_multiline_tb(s2, bullets, 0.45, 1.8, 5.5, 2.8, size=12, color=DARK_GRAY) add_textbox(s2, 'Treatment Options', 0.45, 4.0, 5.5, 0.4, size=14, bold=True, color=DARK_BLUE) t2 = [ '• Growing patients: Tooth-borne rapid palatal expansion (RPE)', '• Non-growing/postpubertal: MARPE preferred over orthognathic surgery', '• Surgically Assisted Palatal Expansion (SARPE): invasive alternative', ] add_multiline_tb(s2, t2, 0.45, 4.45, 5.5, 2.0, size=12, color=DARK_GRAY) # Right column add_rect(s2, 6.4, 1.3, 6.6, 5.7, LIGHT_BLUE) add_rect(s2, 6.4, 1.3, 6.6, 0.04, ORANGE) add_textbox(s2, 'Why MARPE / MSE?', 6.55, 1.35, 6.3, 0.4, size=14, bold=True, color=DARK_BLUE) r2 = [ '• Miniscrew-Assisted Rapid Palatal Expansion (MARPE): skeletal anchorage via miniscrews', '• Orthopedic effect achievable even after growth spurt', '• Minimizes unwanted dental side effects vs. tooth-borne expanders', '• MSE: specific MARPE type with 4 paramedian miniscrews + central jackscrew', '• Bicortical miniscrew engagement splits midpalatal suture with parallel pattern', '• Loosens circummaxillary sutures effectively', ] add_multiline_tb(s2, r2, 6.55, 1.8, 6.3, 3.0, size=12, color=DARK_GRAY) add_textbox(s2, 'The Problem This Study Addresses', 6.55, 4.9, 6.3, 0.4, size=14, bold=True, color=DARK_BLUE) p2 = [ '• Thin palatal bone (<2 mm) → risk of miniscrew failure', '• High resistance patients need additional anchorage', '• Solution: Modified MSE with 6 miniscrews + "Tadlock" mechanism', ] add_multiline_tb(s2, p2, 6.55, 5.35, 6.3, 1.6, size=12, color=DARK_GRAY) # ─── SLIDE 3: CASE PRESENTATION ────────────────────────────────────────────── s3 = prs.slides.add_slide(blank_layout) add_bg(s3, WHITE) header_bar(s3, 'Case Presentation', 'Postpubertal male patient, 15 years 4 months') footer(s3) # Table-like data boxes data = [ ('Age & Sex', '15 years 4 months, Male'), ('Growth Stage', 'CVM assessment: postpubertal; secondary sexual features present'), ('Skeletal Pattern', 'Class I brachyfacial (SNA 86.4°, SNB 85.7°, ANB 0.8°, SN-MP 23.7°)'), ('Dental Findings', 'Class I molar, edge-to-edge bite, open bite (lateral incisors), mild crowding both arches'), ('Crossbite', 'Left posterior crossbite; mandibular midline deviated left by 1.5 mm'), ('Incisor Inclination', 'Proclined maxillary (U1-SN 110.7°) and mandibular incisors (L1-MP 100.7°)'), ('Tongue', 'Macroglossia — contributed to incisor proclination'), ('Bolton Discrepancy', 'Mandibular excess of 4.5 mm'), ('Palatal Bone', '<2 mm thickness at miniscrew insertion sites (critical finding!)'), ] for i, (k, v) in enumerate(data): row = i // 3 col = i % 3 bx = 0.3 + col * 4.35 by = 1.3 + row * 1.95 color = LIGHT_BLUE if col % 2 == 0 else RGBColor(0xE8, 0xF4, 0xFD) add_rect(s3, bx, by, 4.1, 1.8, color) add_rect(s3, bx, by, 4.1, 0.04, ACCENT_BLUE) add_textbox(s3, k, bx+0.1, by+0.08, 3.9, 0.35, size=11, bold=True, color=DARK_BLUE) add_textbox(s3, v, bx+0.1, by+0.45, 3.9, 1.25, size=10.5, color=DARK_GRAY, wrap=True) # ─── SLIDE 4: TREATMENT PLAN ───────────────────────────────────────────────── s4 = prs.slides.add_slide(blank_layout) add_bg(s4, WHITE) header_bar(s4, 'Treatment Plan', 'Two alternatives considered — Modified MSE chosen') footer(s4) # Two options side by side add_rect(s4, 0.3, 1.3, 5.9, 4.5, RGBColor(0xFF, 0xF3, 0xE0)) add_rect(s4, 0.3, 1.3, 5.9, 0.5, ORANGE) add_textbox(s4, '❌ Option 1: Rejected', 0.45, 1.35, 5.6, 0.4, size=14, bold=True, color=WHITE) opt1 = [ 'Surgically Assisted Rapid Palatal Expansion (SARPE)', '', '• Planned for when patient was older', '• Followed by fixed orthodontic treatment', '• Considered too invasive by patient\'s parents', '• REJECTED by family', ] add_multiline_tb(s4, opt1, 0.45, 1.9, 5.6, 3.7, size=12, color=DARK_GRAY, bold_first=True) add_rect(s4, 6.5, 1.3, 6.5, 4.5, RGBColor(0xE8, 0xF8, 0xEE)) add_rect(s4, 6.5, 1.3, 6.5, 0.5, GREEN) add_textbox(s4, '✔ Option 2: Chosen', 6.65, 1.35, 6.2, 0.4, size=14, bold=True, color=WHITE) opt2 = [ 'Modified MSE (6 miniscrews) + Fixed Orthodontics', '', '• MSE with 2 extra lateral miniscrews for thin palate', '• CAD-CAM custom appliance with tadlock mechanism', '• Facemask + Class III elastics for maxillary protraction', '• Fixed appliance (McLaughlin Bennett MB 5.0, 0.022" slot)', '• IPR in mandibular arch to relieve crowding', '• Skeletal retention phase (8 months post-expansion)', ] add_multiline_tb(s4, opt2, 6.65, 1.9, 6.2, 3.7, size=12, color=DARK_GRAY, bold_first=True) # Rationale box at bottom add_rect(s4, 0.3, 6.0, 12.7, 0.95, LIGHT_BLUE) add_textbox(s4, 'Clinical Rationale: Macroglossia excluded extractions/retraction due to high relapse risk. Limited residual growth required orthopedic approach. MSE chosen for posterior skeletal anchorage and ability to serve as anchorage for subsequent maxillary protraction.', 0.45, 6.05, 12.5, 0.85, size=11, color=DARK_BLUE, italic=True) # ─── SLIDE 5: DIGITAL PLANNING & MSE DESIGN ────────────────────────────────── s5 = prs.slides.add_slide(blank_layout) add_bg(s5, WHITE) header_bar(s5, 'Digital Planning of MSE Position', 'CBCT + Digital Dental Arch Integration (RealGuide Software)') footer(s5) # Image (Fig 2 - page3_Im2) add_image(s5, IMG_DIR+'page3_Im2.jpg', 0.3, 1.25, 7.0, 4.2) # Right panel with steps steps = [ ('Step 1', 'Virtual MSE model (with 4 original miniscrews) imported into merged CBCT + digital dental arch model'), ('Step 2', 'MSE positioned so jackscrew is perpendicular to midpalatal suture, near bizygomatic line'), ('Step 3', 'Palatal bone thickness measured at anterior and posterior miniscrew sites'), ('Step 4', 'Bone < 2 mm → 2 additional lateral miniscrews planned on palatal slopes (between 2nd premolar & 1st molar)'), ('Step 5', 'Miniscrew length selected (11 or 13 mm) for bicortical anchorage through cortical bone & nasal floor'), ] for i, (step, desc) in enumerate(steps): by = 1.35 + i * 1.05 add_rect(s5, 7.6, by, 5.4, 0.95, LIGHT_BLUE if i%2==0 else RGBColor(0xE8,0xF4,0xFD)) add_textbox(s5, step, 7.7, by+0.04, 1.2, 0.35, size=10, bold=True, color=ACCENT_BLUE) add_textbox(s5, desc, 8.9, by+0.04, 4.0, 0.85, size=10, color=DARK_GRAY, wrap=True) add_textbox(s5, 'Fig 2. Digital planning of MSE position on CBCT + dental arch: (A) 3/4 view, (B) Occlusal view, (C,D) Palatal bone thickness measurements', 0.3, 5.5, 7.0, 0.6, size=8.5, color=DARK_GRAY, italic=True) # ─── SLIDE 6: ADDITIONAL MINISCREWS & CAD-CAM DESIGN ───────────────────────── s6 = prs.slides.add_slide(blank_layout) add_bg(s6, WHITE) header_bar(s6, 'Additional Lateral Miniscrews & CAD-CAM Manufacturing', 'Digital planning for 2 extra miniscrews + selective laser melting fabrication') footer(s6) # Two images side by side add_image(s6, IMG_DIR+'page4_Im3.jpg', 0.3, 1.25, 6.1, 3.0) add_image(s6, IMG_DIR+'page4_Im4.jpg', 6.7, 1.25, 6.1, 3.0) add_textbox(s6, 'Fig 3. Digital planning: bushing+miniscrew virtual model, positioning on CBCT, bone thickness measurement, CAD-CAM structure design', 0.3, 4.3, 6.0, 0.55, size=8.5, color=DARK_GRAY, italic=True) add_textbox(s6, 'Fig 4. Laboratory manufacturing: CAD-CAM structure with molar bands (f), arms (g), bushings (h), pin (i); laser welding; final appliance in oral cavity', 6.7, 4.3, 6.0, 0.55, size=8.5, color=DARK_GRAY, italic=True) # Key points key = [ '• 2 bushings designed for lateral miniscrews (1.8 mm diameter, 11 or 13 mm length)', '• CAD-CAM structure material: Cobalt-Chromium alloy (E = 205 GPa) — high rigidity for force delivery', '• 3D printed via Selective Laser Melting (SLM) technology', '• CAD-CAM structure laser welded to MSE body; connection between right and left arms then removed', '• Appliance polished, sterilized and delivered; molar bands cemented; all 6 miniscrews inserted', ] add_rect(s6, 0.3, 5.0, 12.7, 2.0, LIGHT_BLUE) add_multiline_tb(s6, key, 0.45, 5.05, 12.5, 1.9, size=11, color=DARK_GRAY) # ─── SLIDE 7: TADLOCK MECHANISM ─────────────────────────────────────────────── s7 = prs.slides.add_slide(blank_layout) add_bg(s7, WHITE) header_bar(s7, 'The Tadlock Mechanism', 'Preventing appliance arm migration along lateral miniscrews during expansion') footer(s7) # Fig 5 (force vector diagram) + Fig 6 (tadlock steps) add_image(s7, IMG_DIR+'page4_Im5.jpg', 0.3, 1.3, 5.5, 2.7) add_image(s7, IMG_DIR+'page5_Im6.jpg', 6.1, 1.3, 6.9, 3.5) add_textbox(s7, 'Fig 5. MSE with 6 miniscrews (frontal view). Red = expansion force vector; yellow = miniscrew long axis. PM = paramedian; LM = lateral miniscrews.', 0.3, 4.05, 5.5, 0.65, size=8.5, color=DARK_GRAY, italic=True) add_textbox(s7, 'Fig 6. Tadlock tying procedure: (A) Two knots around miniscrew head, (B) ligature turned around bushing pin, (C) two more knots, (D) twisted with Mathieu plier. Flowable composite covers the assembly.', 6.1, 4.85, 6.9, 0.7, size=8.5, color=DARK_GRAY, italic=True) # Explanation boxes add_rect(s7, 0.3, 4.8, 5.5, 2.1, RGBColor(0xFF, 0xF0, 0xE0)) add_rect(s7, 0.3, 4.8, 5.5, 0.05, ORANGE) add_textbox(s7, 'Why is the Tadlock Needed?', 0.45, 4.87, 5.2, 0.38, size=12, bold=True, color=DARK_BLUE) prob = [ '• Original 4 paramedian miniscrews: expansion force ⊥ to miniscrew axis → prevents vertical MSE body migration', '• Lateral bushings have oblique inclination → can slide ALONG lateral miniscrew axis → pushed toward palatal mucosa', '• Risk: tissue impingement during expansion', ] add_multiline_tb(s7, prob, 0.45, 5.3, 5.2, 1.5, size=10.5, color=DARK_GRAY) add_rect(s7, 6.1, 5.6, 6.9, 1.3, RGBColor(0xE8, 0xF8, 0xEE)) add_rect(s7, 6.1, 5.6, 6.9, 0.05, GREEN) add_textbox(s7, 'Tadlock Solution', 6.25, 5.67, 6.6, 0.35, size=12, bold=True, color=DARK_BLUE) sol = ['• 0.011" steel ligature tied from miniscrew head to pin on bushing', '• Locks bushing position during active expansion', '• Flow composite placed on top → prevents tongue irritation'] add_multiline_tb(s7, sol, 6.25, 6.07, 6.6, 0.8, size=10.5, color=DARK_GRAY) # ─── SLIDE 8: EXPANSION RESULTS & CBCT ─────────────────────────────────────── s8 = prs.slides.add_slide(blank_layout) add_bg(s8, WHITE) header_bar(s8, 'Expansion Results', 'CBCT findings after maxillary expansion with modified MSE') footer(s8) add_image(s8, IMG_DIR+'page5_Im8.jpg', 0.3, 1.3, 8.5, 3.8) add_textbox(s8, 'Fig 7. Records after expansion: (A) Maxillary arch post-MSE, (B) Axial CBCT at palate, (C) Coronal CBCT with lateral miniscrews, (D) Class III elastics, (E) Modified mandibular lingual arch with hooks', 0.3, 5.15, 8.5, 0.55, size=8.5, color=DARK_GRAY, italic=True) # Results boxes results = [ ('Total Activation', '7 mm\n(0.13 mm × 2/day)'), ('Suture Split\n(Ant. Nasal Spine)', '5.02 mm'), ('Suture Split\n(Post. Nasal Spine)', '4.16 mm'), ('Lateral Miniscrews', 'No contact with\nadjacent roots'), ] for i, (k, v) in enumerate(results): bx = 9.1 by = 1.35 + i * 1.45 add_rect(s8, bx, by, 3.9, 1.35, LIGHT_BLUE if i%2==0 else RGBColor(0xE8,0xF4,0xFD)) add_rect(s8, bx, by, 3.9, 0.05, ACCENT_BLUE) add_textbox(s8, k, bx+0.1, by+0.1, 3.7, 0.5, size=10.5, bold=True, color=DARK_BLUE, wrap=True) add_textbox(s8, v, bx+0.1, by+0.65, 3.7, 0.6, size=13, bold=True, color=ACCENT_BLUE, wrap=True) add_rect(s8, 9.1, 7.05, 3.9, 0.0, DARK_BLUE) # ─── SLIDE 9: CLINICAL PHOTOGRAPHS ─────────────────────────────────────────── s9 = prs.slides.add_slide(blank_layout) add_bg(s9, WHITE) header_bar(s9, 'Clinical & Facial Photographs', 'Pre-treatment vs Post-treatment comparison') footer(s9) # Intraoral (Fig 1) add_textbox(s9, 'Intraoral Photographs', 0.3, 1.25, 12.7, 0.4, size=14, bold=True, color=DARK_BLUE) add_image(s9, IMG_DIR+'page2_Im1.jpg', 0.3, 1.7, 9.0, 2.5) add_textbox(s9, 'Fig 1. Intraoral: (A) Pretreatment — left posterior crossbite, edge-to-edge bite, open bite on lateral incisors; (B) Posttreatment — Class I canine/molar, optimal overjet & overbite, crossbite resolved', 0.3, 4.25, 9.0, 0.65, size=9, color=DARK_GRAY, italic=True) # After 11 months (Fig 8) — page5_Im7 add_image(s9, IMG_DIR+'page5_Im7.jpg', 0.3, 5.0, 9.0, 1.5) add_textbox(s9, 'Fig 8. After 11 months of fixed orthodontic treatment', 0.3, 6.52, 9.0, 0.4, size=9, color=DARK_GRAY, italic=True) # Facial photos (Fig 11) — page7_Im11 add_textbox(s9, 'Facial Photos', 9.5, 1.25, 3.5, 0.4, size=14, bold=True, color=DARK_BLUE) add_image(s9, IMG_DIR+'page7_Im11.jpg', 9.5, 1.7, 3.5, 5.1) add_textbox(s9, 'Fig 11. Facial: (A) Pre; (B) Post — improved facial convexity & maxillary incisor display', 9.5, 6.85, 3.5, 0.3, size=8.5, color=DARK_GRAY, italic=True) # ─── SLIDE 10: RADIOGRAPHIC RECORDS ────────────────────────────────────────── s10 = prs.slides.add_slide(blank_layout) add_bg(s10, WHITE) header_bar(s10, 'Radiographic Records', 'Cephalometric & panoramic pre/post-treatment comparison') footer(s10) add_image(s10, IMG_DIR+'page6_Im9.jpg', 0.3, 1.3, 8.0, 4.5) add_textbox(s10, 'Fig 9. (A) Lateral cephalograms pre/post-treatment; (B) Panoramic radiographs pre/post-treatment', 0.3, 5.85, 8.0, 0.55, size=8.5, color=DARK_GRAY, italic=True) # Ceph table cepha = [ ('Measurement', 'Norm', 'Pre-tx', 'Post-tx'), ('SNA (°)', '82±3.5', '86.4', '87.6'), ('SNB (°)', '80±3.0', '85.7', '85.0'), ('ANB (°)', '2.0±2.0', '0.8', '2.6'), ('SN-MP (°)', '32.9±5.2', '23.7', '25.5'), ('FMA (°)', '26.0±4.5', '19.0', '20.8'), ('U1-SN (°)', '102±5.5', '110.7', '110.9'), ('L1-MP (°)', '95±7.0', '100.7', '100.1'), ] for r, row in enumerate(cepha): for c, cell in enumerate(row): bx = 8.6 + c * 1.15 by = 1.3 + r * 0.62 col = ACCENT_BLUE if r == 0 else (LIGHT_BLUE if r%2==0 else WHITE) txt_col = WHITE if r == 0 else DARK_GRAY add_rect(s10, bx, by, 1.1, 0.6, col) add_textbox(s10, cell, bx+0.05, by+0.08, 1.0, 0.45, size=9.5, bold=(r==0), color=txt_col, align=PP_ALIGN.CENTER) # ─── SLIDE 11: DISCUSSION ───────────────────────────────────────────────────── s11 = prs.slides.add_slide(blank_layout) add_bg(s11, WHITE) header_bar(s11, 'Discussion', 'Key clinical insights and biomechanical considerations') footer(s11) disc = [ ('MARPE Advantage', 'Limits dental and periodontal side effects vs. tooth-borne expanders; extends age limit for treatment without surgery'), ('MSE Force Vector', 'Expansion force concentrated on maxillary bone (not teeth) — finite element study confirms limited dental side effects; proper posterior tooth torque preserved'), ('Thin Palatal Bone', 'Palatal bone <2 mm → miniscrew failure risk due to migration under orthopedic forces; 6-screw design mitigates this'), ('Posterior Miniscrew Placement', 'Lateral miniscrews near maxillary center of resistance → posterior expansion + larger disarticulation of posterior circummaxillary sutures'), ('Indications for 6-Screw MSE', '(1) Palatal bone <2 mm, (2) Increased midface resistance (older patients), (3) High bone density/thick zygomatic buttress, (4) High suture interdigitation'), ('Digital Workflow Advantage', 'No surgical guide needed; clinicians insert miniscrews after cementing MSE → reduces misfitting risk vs. inserting miniscrews first'), ('Protraction Protocol', 'Facemask at night (extraoral elastics 3/8-in, 16 oz) + Class III intraoral elastics during day → Class II then Class I achieved in 3 months'), ('Retention', 'MSE body + 4 paramedian miniscrews retained for 8 months post-expansion for skeletal consolidation'), ] for i, (k, v) in enumerate(disc): row = i // 2 col = i % 2 bx = 0.3 + col * 6.55 by = 1.3 + row * 1.45 add_rect(s11, bx, by, 6.3, 1.35, LIGHT_BLUE if col==0 else RGBColor(0xE8,0xF4,0xFD)) add_rect(s11, bx, by, 6.3, 0.04, ACCENT_BLUE) add_textbox(s11, k, bx+0.1, by+0.08, 6.1, 0.35, size=10.5, bold=True, color=DARK_BLUE) add_textbox(s11, v, bx+0.1, by+0.48, 6.1, 0.8, size=9.5, color=DARK_GRAY, wrap=True) # ─── SLIDE 12: CONCLUSIONS ─────────────────────────────────────────────────── s12 = prs.slides.add_slide(blank_layout) add_bg(s12, DARK_BLUE) add_rect(s12, 0, 0, 13.333, 1.1, ACCENT_BLUE) add_rect(s12, 0, 1.1, 13.333, 0.05, ORANGE) add_textbox(s12, 'Conclusions', 0.3, 0.1, 12.7, 0.9, size=32, bold=True, color=WHITE) add_textbox(s12, 'Key takeaways from this case report', 0.3, 0.78, 12.7, 0.35, size=14, color=LIGHT_BLUE, italic=True) concls = [ ('Successful Outcome', 'Adolescent with MTD, anterior open bite, and thin palatal bone successfully treated. Class I canine/molar relations, optimal overjet/overbite, and improved facial aesthetics achieved.'), ('6-Miniscrew MSE', 'Modified MSE with 2 additional lateral miniscrews enables treatment even when palatal bone thickness is <2 mm — previously a contraindication.'), ('Tadlock Mechanism', 'Steel ligature between miniscrew head and bushing pin prevents appliance arm migration during expansion, eliminating risk of mucosal impingement.'), ('Digital Workflow', 'CAD-CAM design + selective laser melting (SLM) production allows fully customized, patient-specific appliance without need for surgical guides.'), ('Skeletal Anchorage', 'Good skeletal anchorage significantly enhanced orthopedic expansion effect and avoided unwanted dental tipping — a major advantage over tooth-borne devices.'), ('Future Research', 'Longitudinal studies needed to further validate outcomes of 6-miniscrew MSE and tadlock protocol across diverse patient populations.'), ] for i, (k, v) in enumerate(concls): row = i // 2 col = i % 2 bx = 0.3 + col * 6.55 by = 1.3 + row * 1.85 add_rect(s12, bx, by, 6.3, 1.75, RGBColor(0x1E, 0x4A, 0x78)) add_rect(s12, bx, by, 6.3, 0.06, ORANGE if col==0 else ACCENT_BLUE) add_textbox(s12, k, bx+0.15, by+0.1, 6.0, 0.4, size=12, bold=True, color=ORANGE if col==0 else LIGHT_BLUE) add_textbox(s12, v, bx+0.15, by+0.52, 6.0, 1.15, size=10.5, color=RGBColor(0xCC,0xDD,0xEE), wrap=True) # Save os.makedirs('/tmp/workspace/mse_ppt', exist_ok=True) out = '/tmp/workspace/mse_ppt/MSE_6Miniscrews_Tadlock.pptx' prs.save(out) print(f'Saved: {out}') import os; print(f'Size: {os.path.getsize(out)/1024:.1f} KB') PYEOF

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.

Make detail ppt with picture

Your credits are exhausted. You can purchase a top-up or subscribe to a plan to continue using Orris. If you're already subscribed, your daily credits will reset tomorrow.
This is a shared conversation. Sign in to Orris to start your own chat.