Skip to content

Instantly share code, notes, and snippets.

View aspose-com-gists's full-sized avatar

Aspose.com Gists aspose-com-gists

View GitHub Profile
import asposebarcode as barcode
def generate_aztec_barcode(data, output_path):
# Create a BarcodeGenerator for Aztec symbology
generator = barcode.BarcodeGenerator(
barcode.Symbology.AZTEC, # Symbology type
data # Data to encode
)
# Configure Aztec specific parameters
import aspose.threed as a3d
def convert_fbx_to_stl(input_path: str, output_path: str):
try:
# Initialize the scene and load the FBX file
scene = a3d.Scene()
scene.open(input_path)
# Set STL export options for binary format and millimeter units
export_options = a3d.stl.StlExportOptions()
import aspose.threed as a3d
def convert_glb_to_fbx(input_path: str, output_path: str):
try:
# Load GLB file
scene = a3d.Scene.from_file(input_path)
# Optional: customize FBX export options
export_options = a3d.formats.FbxSaveOptions(a3d.FileFormat.FBX7500_BINARY)
export_options.embed_textures = False # Improves performance for large models
"""
basic_cylinder
=================
Demonstrates the simplest possible approach to Create 3D Cylinder in Python
using Aspose.3D. This covers the essential API pattern you will build upon.
"""
from aspose.threed import Scene
from aspose.threed.entities import Cylinder
# ─── Step 1: Create an empty 3D scene ─────────────────────────────────────
@aspose-com-gists
aspose-com-gists / convert_3mf_to_stl_batch_convert.py
Last active March 19, 2026 12:48
Convert 3MF to STL in Python
"""
Batch convert all 3MF files in a directory to STL.
"""
import pathlib
import aspose.threed as a3d
def batch_convert(src_dir: str, dst_dir: str) -> None:
source = pathlib.Path(src_dir)
destination = pathlib.Path(dst_dir)
destination.mkdir(parents=True, exist_ok=True)
@aspose-com-gists
aspose-com-gists / convert_3d_scene_to_html_complete_code_example.java
Last active March 18, 2026 12:24
Convert 3D Scene to HTML in Aspose.3D–Guide in Java
import com.aspose.threed.Scene;
import com.aspose.threed.HtmlExportOptions;
import com.aspose.threed.FileFormat;
import com.aspose.threed.Color;
public class ConvertSceneToHtml {
public static void main(String[] args) {
// Path to the source 3D file (OBJ, STL, FBX, etc.)
String inputPath = "C:/Models/sample.obj";
// Path where the HTML output will be saved
@aspose-com-gists
aspose-com-gists / convert_cdr_to_png_complete_code_example.cs
Created March 10, 2026 14:53
How to Convert CDR to PNG using API in .NET
using System;
using Conholdate.Total;
using Conholdate.Total.Conversion;
using Conholdate.Total.Conversion.Options;
class Program
{
static void Main()
{
// Path to the source CDR file
import com.aspose.threed.cloud.ApiException;
import com.aspose.threed.cloud.api.ThreeDApi;
import com.aspose.threed.cloud.model.ConvertRequest;
import com.aspose.threed.cloud.model.StlExportOptions;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class Convert3mfToStl {
@aspose-com-gists
aspose-com-gists / edit_powerpoint_files_complete_code_example.java
Created February 24, 2026 21:34
Edit PowerPoint Files Using Java Library
import com.groupdocs.editor.cloud.api.EditorApi;
import com.groupdocs.editor.cloud.model.*;
import com.groupdocs.editor.cloud.model.requests.*;
import java.nio.file.Files;
import java.nio.file.Paths;
public class PowerPointEditExample {
public static void main(String[] args) {
// Replace with your actual credentials
@aspose-com-gists
aspose-com-gists / Aspose.HTML for .NET – Markdown Processing and Manipulation in C#
Last active February 24, 2026 14:19
Parse, analyze, edit, and generate Markdown in C#. Work with AST, modify structure, and process GitHub-Flavored Markdown
Aspose.HTML for .NET – Markdown Processing and Manipulation in C#