Getting started
Prerequisites
Acquire a BEARER token to be used in HTTP Authorization header for authentication.
Please contact us for any inquiry.
How to use the shape service
- Create a geometry file instance
(POST /files) - Upload your dxf/dwg file with the url and fields returned by previous request response. Once the file is uploaded, an async task will extract available layers from it.
- Wait for the file to be processed and ping it
(GET /files or GET /files/{file_id})
every couple of seconds until it is done (status changed to "Ok"). - Retrieve available layers from response
(GET /files or GET /files/{file_id}) -
Create configurations with all layers configured as 'cut' geometries
(POST /configurations)
At this point the following options are available to customize the configuration:- unit_system (String - either 'metric' or 'imperial')
- scale (Numeric - > 0.0 and < 1.0)
- split (Boolean): split geometries within the file or not
- deduplicate (Boolean): regroup shapes based on geometries
- remove_external (Boolean): remove external contour
-
Wait for the configurations to be processed and ping
(GET /configurations/)
every couple of seconds until they are done (status changed to "Ok") - Display png image from response in order to visualise how the shapes will be processed
- If necessary, go to step 5 to create new configurations with different layer types and different settings
- When you are satisfied with your configurations, extract the shapes from the configured files
(POST /files/{file_id}/configurations/{configuration_id}/shapes) - Wait for the shapes to be processed and ping the configuration
(GET /configurations/)
until they are done (shapes_status changed to "Ok") - Extra: Use ShapeGroups URI to find total quantities between different files:
(POST /shape-groups)
then ping the group
(GET /shape-groups/{shape_groups_id})
until it has finished processing the shapes
(status changed to "Ok")
to find out which shapes have been grouped - Done!
How to use the nesting result service
- Create an attachment instance for the PWS job json file
(POST /attachments) - Upload PWS job json file with the url and fields returned by previous request response.
- Repeat for the process for the PWS result json file.
- If you have created shapes immediately prior, got to step 9.
- For each shape associated with a part or imported sheet create an attachment instance
(POST /attachments) - Upload shape CPF file with the url and fields returned by previous request response.
- Create each shape from attachment
(POST /shapes) - Wait for the shapes to be processed and ping each shape (GET /shapes/{shape_id}) to check status is "Ok" before proceeding.
- Create nesting result using the shape IDs from the parts and imported sheets in the request body
(POST /nestings) - Fetch nesting result using the nesting ID
(GET /nestings/{nesting_id})