drapefit

v0.1.0
io.github.CloudCorpRecords/drapefit Checked 6 hours ago Published 15 days ago

Simulate composite fabric draping on CAD surfaces; compare fibre angles, export patterns.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

create_workspace

Create a private two-hour workspace and return its ID and CAD upload page. Start here before loading a sample or importing a user's CAD part. The ID and upload/download links grant access; do not publish them.

list_uploads

List files uploaded through this workspace's upload_url; pass an upload_id to import_part.

ParameterTypeDescription
workspace_id *stringID of the workspace

compare_drapes

Compare up to 12 warp angles, sequentially, at one fixed seed and cloth configuration. When omitted, seed is suggested once for the first angle. Results rank by coverage descending, then percentage above lock ascending, then maximum shear ascending. This is a stated comparison rule, not a global optimum. Runs use the requested/preset pitch, never a hidden coarse approximation. Export the chosen result promptly: backend result IDs are temporary.

ParameterTypeDescription
angles *arrayWarp angles to compare
mesh_id *stringID of the mesh
workspace_id *stringID of the workspace
fabric_idstringID of the fabric to use
hole_areaHole area to account for on the surface
lock_angleLock angle for the cloth
offsetnumberNumber of results to skip before returning
pitchPitch for the cloth configuration
seedSeed starting point on the mesh

create_layout

Start covering one surface with multiple pieces of the same ply/fabric. This is not a laminate stack. overlap is mm; supplied seeds are laid first and additional pieces fill remaining ground, up to max_pieces. Poll the returned job_id with get_job(kind='layout'); export with layout=true.

ParameterTypeDescription
mesh_id *stringID of the mesh
workspace_id *stringID of the workspace
anglenumberWarp angle, in degrees
fabric_idstringID of the fabric to use
hole_areaHole area to account for on the surface
lock_angleLock angle for the cloth
max_piecesintegerMaximum number of pieces to lay
offsetnumberNumber of results to skip before returning
overlapnumberOverlap between pieces, in mm
pitchPitch for the cloth configuration
seedsSeed starting points for the pieces

export_pattern

Export a built-in example as DXF or tiled 1:1 PDF and return a temporary download_url. Uploaded-part exports require the signed-in website or an authenticated local adapter; this hosted workspace cannot be linked to a website account. Use layout=true with a layout_id to export all example pieces. Download before workspace expiry.

ParameterTypeDescription
result_id *stringID of the result to export
workspace_id *stringID of the workspace
formatstringExport format: dxf or pdf
gridintegerGrid option for the export
layoutbooleanWhether to export the layout
paperstringPaper size for the export

get_job

Poll STEP import or multi-piece layout; retry after a short delay while done=false. STEP completion returns a step_id and at most 20 basic face descriptions; use list_faces for geometric descriptions and pagination. Layout completion returns compact per-piece statistics and a layout_id for export_pattern.

ParameterTypeDescription
job_id *stringID of the job to poll
kind *stringKind of job: step or layout
workspace_id *stringID of the workspace

import_part

Import a file already uploaded to this workspace. Get upload_id from list_uploads. STEP/STP returns a job to poll with get_job(kind='step'), then inspect and select faces.

ParameterTypeDescription
upload_id *stringID of the uploaded file to import, from list_uploads
workspace_id *stringID of the workspace

list_fabrics

List fabric IDs, nominal locking angles, tow pitch (mm), thickness and UD settings.

list_faces

Inspect STEP face IDs, areas, bounds, centroids, neighbours and planar mesh normals. This requires the MCP face-metadata endpoint in the configured backend. Centroids/bounds describe the tessellation; do not assume a closed solid's entire skin is the intended draping surface. Ask for explicit face IDs when the intended surface cannot be identified from this information.

ParameterTypeDescription
step_id *stringID of the STEP import
workspace_id *stringID of the workspace
limitintegerMaximum number of entries to return
offsetintegerNumber of results to skip before returning

list_samples

List built-in example parts that can be loaded without uploading a file.

load_sample

Register a built-in sample and return a mesh_id for draping.

ParameterTypeDescription
name *stringName of the built-in sample to load
workspace_id *stringID of the workspace

mesh_landmarks

Inspect seed landmarks in mm, paged within each category (max 100 per category). Returns centre, corners, edge midpoints and origin intersections. Full section polylines are omitted. Follow next_offset for more points.

ParameterTypeDescription
mesh_id *stringID of the mesh
workspace_id *stringID of the workspace
limitintegerMaximum number of entries to return
offsetintegerNumber of results to skip before returning

run_drape

Drape one fabric at one warp angle (degrees); return statistics and an exportable result_id. Omitted seed is suggested on the surface. Omitted pitch/lock_angle use the fabric preset, including its UD spread/compression settings. pitch/offset are mm; hole_area is mm² (null bridges holes). The API may increase pitch to bound the grid; pitch_used reports the actual resolution. Kinematic shear/locking statistics are not a structural strength calculation.

ParameterTypeDescription
mesh_id *stringID of the mesh
workspace_id *stringID of the workspace
anglenumberWarp angle, in degrees
fabric_idstringID of the fabric to use
hole_areaHole area to account for on the surface
lock_angleLock angle for the cloth
offsetnumberNumber of results to skip before returning
pitchPitch for the cloth configuration
seedSeed starting point on the mesh

select_faces

Create a drapable mesh from explicitly chosen STEP face IDs; reports connectedness.

ParameterTypeDescription
face_ids *arrayIDs of the faces to select
step_id *stringID of the STEP import
workspace_id *stringID of the workspace

server_status

Check the hosted DrapeCut solver and read connection/workspace limits.

suggest_seed

Suggest a starting point on a mesh. Validate its coverage with an actual drape.

ParameterTypeDescription
mesh_id *stringID of the mesh
workspace_id *stringID of the workspace
anglenumberWarp angle, in degrees
lock_anglenumberLock angle for the cloth