Overview
omni.kit.converter.cad_core uses the HOOPS Exchange SDK to convert a variety of CAD data formats to USD.
When this extension loads, it will register itself with the CAD Converter service (omni.services.convert.cad) if it is available.
CAD CONVERTER CONFIG FILE INPUTS:
Conversion options are configured by supplying a JSON file. Below are the available configuration options.
JSON Converter Settings:
Format: “setting name” : default value
"sConfigFilePath" : "C:/test/sample_config.json"
Configuration file path
"sFilePathIn" : "C:/cad_part.jt"
Input file path.
NOTE : This will override import path argument from service.
"sFolderPathOut" : "C:/test/output"
Folder location for output.
NOTE : This will override output path argument from service.
"sFileNameOut" : ""
Name of output USD file (the head file only in the case of multiple output files)
"sSettingsFolderPath" : ""
Path to material csv and potentially any other settings files
"sStagePath" : ""
Path to target USD stage
"bInstancing" : true
Controls whether or not the usd model uses instances and prototypes. If false, then there is no instancing at all.
"bGlobalXforms" : false
When instancing = false, this flag controls whether globalXforms are composited. If false local transforms are applied
"bMappedMaterials" : false
Use material mapping or native materials
"iTessLOD" : 2
iTessLOD0= ExtraLow, ChordHeightRatio=50, AngleToleranceDeg=40,iTessLOD1= Low, ChordHeightRatio=600, AngleToleranceDeg=40,iTessLOD2= Medium, ChordHeightRatio=2000, AngleToleranceDeg=40,iTessLOD3= High, ChordHeightRatio=5000, AngleToleranceDeg=30,iTessLOD4= ExtraHigh, ChordHeightRatio=10000, AngleToleranceDeg=20.
"bAccurateSu2faceCurvatures" : true
If true, respect surface curvature to control triangles elongation directions.
"sUsdSuffix" : "usd"
usd= USD (binary by default)usda= USD Asciiusdc= USD Crate (binary).
"bOptimize" : true
Flag to invoke USD scene optimization.
"sOptimizerConfigJson" : "c:/scene_optimization_config.json",
Full path to scene optimization configuration JSON file.
"bDedup" : true
If True, weld mesh elements in appropriate groups.
"bUseMaterials" : true
Setting for how part colors are converted to USD.
If
trueconverter creates OmniPBR materials with the color set as an attribute.If
falseconverter will convert colors to USDdisplayColorprimvars.
"bUseNormals" : true
If true then we pass normals to USD. if false, then we do not.
"bReportProgress" : true
If true then we report import/export progress
"bUseCurrentStage" : true
If true use currently opened USD.
Full sample_config.json:
{
"sConfigFilePath" : "C:/test/sample_config.json",
"sFilePathIn" : "C:/test/cad_part.jt",
"sFolderPathOut" : "C:/test/converted",
"sFileNameOut" : "",
"sSettingsFolderPath" : "",
"sStagePath" : "",
"bInstancing" : true,
"bGlobalXforms" : false,
"bOptimize" : true,
"sOptimizerConfigJson" : "",
"bMappedMaterials" : false,
"bDedup" : true,
"iTessLOD" : 2,
"bAccurateSu2faceCurvatures" : true,
"sUsdSuffix" : "usd",
"bUseNormals" : true,
"bUseMaterials" : true,
"bReportProgress" : true,
"bUseCurrentStage" : true,
}