This is Jt Interface class used to write Jt files. More...
Public Types | |
| enum | breptype { nobrep = 0, xtbrep = 1 } |
| enum | colorstrategy { keepsubcolor = 0, overwritecolor = 1 } |
| enum | unit { millimeters = 0, centimeters = 1, meters = 2, inches = 3, feet = 4, yards = 5, micrometers = 6, decimeters = 7, kilometers = 8, mils = 9, miles = 10 } |
| enum | writeversion { version80 = 80, version90 = 90, version91 = 91, version92 = 92, version93 = 93, version94 = 94, version95 = 95, version100 = 100, version101 = 101, version102 = 102, version103 = 103, version104 = 104, version105 = 105, version106 = 106, version107 = 107, version108 = 108, version109 = 109, version1010 = 1010 } |
Public Member Functions | |
| Dtk_ErrorStatus | AddAxisSystem (const Dtk_AxisSystemPtr &inAxisSystem, Dtk_Int64 inIdaxis=-1) |
| Add an axis system into the current node. More... | |
| Dtk_ErrorStatus | AddBody (const Dtk_BodyPtr &inToWrite, const Dtk_tab< Dtk_Float32 > &makelods=Dtk_tab< Dtk_Float32 >(), Dtk_Float32 inLossytol=0) |
| Add a body into the current node. More... | |
| Dtk_ErrorStatus | AddLayerInfosSet (const Dtk_LayerInfosSetPtr &inToWrite) |
| Add a Layer informations. More... | |
| Dtk_ErrorStatus | AddMesh (const Dtk_MeshPtr &inToWrite, Dtk_Float32 inLossytol=0) |
| Add a mesh into the current node. More... | |
| Dtk_ErrorStatus | AddMetaData (const Dtk_MetaDataPtr &inToWrite) |
| Add a Metdata into the current node. More... | |
| Dtk_ErrorStatus | AddModelView (const Dtk_ModelDisplayPtr &inModelview, Dtk_Int64 inIdmodelview=-1) |
| Add a modelView into the current node. More... | |
| Dtk_ErrorStatus | AddOverrideColor (const Dtk_LightMapPtr &inLightmap, const Dtk_tab< Dtk_Int64 > &inRoute, Dtk_ID inBodyID=0) |
| Set a Lightmap for a specific instance. More... | |
| Dtk_ErrorStatus | AddOverrideColor (const Dtk_RGB &inRgb, const Dtk_tab< Dtk_Int64 > &inRoute, Dtk_ID inBodyID=0) |
| Set an override color for a specific instance. More... | |
| Dtk_ErrorStatus | AddPMI (const Dtk_FdtPtr &inPMI, Dtk_Int64 inIdpmi=-1) |
| Add a fdt into the current node. More... | |
| Dtk_ErrorStatus | AddReferenceGeometry (const Dtk_BodyPtr &inRefgeom, Dtk_Int64 inIdrefgeom=-1) |
| Add a reference geometry into the current node. More... | |
| Dtk_ErrorStatus | CloseLastInstance () |
| Close the last opened node. More... | |
| Dtk_ErrorStatus | ConnectModelView_Instance (Dtk_Int64 inIdmodelview, const Dtk_tab< Dtk_Int64 > &inRoute, int inHide=0, Dtk_ID inBodyID=0, const Dtk_transfo &inExplode=Dtk_transfo()) |
| Connect a ModelView on an Instance, for part representation restriction in a modelview. More... | |
| Dtk_ErrorStatus | ConnectPMI_Geom (Dtk_Int64 inIdfdt, Dtk_Int64 inGeomid, type_detk inTypegeom, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >(), Dtk_ID inBodyID=0) |
| Connect a PMI on a body face/edge/vertex. More... | |
| Dtk_ErrorStatus | ConnectPMI_ModelView (Dtk_Int64 inIdpmi, Dtk_Int64 inIdModelView, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >()) |
| Connect a PMI on a ModelView. More... | |
| Dtk_ErrorStatus | ConnectPMI_PMI (Dtk_Int64 inIdpmifrom, Dtk_Int64 inIdpmito, const Dtk_tab< Dtk_Int64 > &inRoute=Dtk_tab< Dtk_Int64 >()) |
| Connect a PMI on another PMI. More... | |
| Dtk_Jtw_Interface (const Dtk_string &inFileWritten, Dtk_ErrorStatus &outErr, breptype inBrep=nobrep, writeversion inVersion=version95, unit inUnit=millimeters) | |
| Constructor, initialize the Jt Writer More... | |
| Dtk_bool | ExistIdPart (Dtk_Int64 inIdpart) const |
| Ask the writer if a part already exist. More... | |
| Dtk_ErrorStatus | LastInstance_SetInstanceColor (const Dtk_LightMapPtr &inLightmap, colorstrategy inColorstrategy=keepsubcolor) |
| Set a Lightmap to previously opened instance. A lightmap is more complete that Dtk_RGB, this fonction override same fonction with Dtk_RGB. More... | |
| Dtk_ErrorStatus | LastInstance_SetInstanceColor (const Dtk_RGB &inRgb, colorstrategy inColorstrategy=keepsubcolor) |
| Set a Color to previously opened instance. More... | |
| Dtk_ErrorStatus | LastInstance_SetInstanceID (Dtk_Int64 inInstanceID) |
| Set an instance ID to previously opened instance. More... | |
| Dtk_ErrorStatus | LastInstance_SetInvisible () |
| Set previously opened instance as invisible. More... | |
| Dtk_ErrorStatus | OpenInstance (const Dtk_string &inName, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_string &inExternfile=Dtk_string()) |
| Open a new Instance for the assembly writing. More... | |
| Dtk_ErrorStatus | OpenInstance (const Dtk_string &inName, Dtk_Int64 inIdpart, const Dtk_transfo &inTrans=Dtk_transfo(), const Dtk_string &inExternfile=Dtk_string()) |
| Open a new Instance for the assembly writing. More... | |
| ~Dtk_Jtw_Interface () | |
| Destructor, finalise the process. More... | |
This is Jt Interface class used to write Jt files.
| Dtk_Jtw_Interface::Dtk_Jtw_Interface | ( | const Dtk_string & | inFileWritten, |
| Dtk_ErrorStatus & | outErr, | ||
| breptype | inBrep = nobrep, |
||
| writeversion | inVersion = version95, |
||
| unit | inUnit = millimeters |
||
| ) |
Constructor, initialize the Jt Writer
| [in] | inFileWritten | : File to write |
| [out] | outErr | : Error returned. dtkNoError on success. |
| [in] | inBrep | : Which brep should be integrated : see breptype enum. nobrep for no brep (only mesh, packed file (default)), or xtbrep : contain Parasolid Brep, need Parasolid Writer. |
| [in] | inVersion | : Version to write : see writeversion enum, default is version95 |
| [in] | inUnit | : Unit of file, see unit enum. Default is millimeters |
| Dtk_Jtw_Interface::~Dtk_Jtw_Interface | ( | ) |
Destructor, finalise the process.
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddAxisSystem | ( | const Dtk_AxisSystemPtr & | inAxisSystem, |
| Dtk_Int64 | inIdaxis = -1 |
||
| ) |
Add an axis system into the current node.
| [in] | inAxisSystem | : axis system to Write. |
| [in] | inIdaxis | : You may give an ID for axis system, to connect on. -1 for automatic ID. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddBody | ( | const Dtk_BodyPtr & | inToWrite, |
| const Dtk_tab< Dtk_Float32 > & | makelods = Dtk_tab< Dtk_Float32 >(), |
||
| Dtk_Float32 | inLossytol = 0 |
||
| ) |
Add a body into the current node.
| [in] | inBody | : Body to Write. |
| [in] | inLodDatas | : couples of linear_tolerance/angular_tolerances (radian) for each LOD : so nblod = InLodDatas.size()/2. -1 value mean disabled. Empty tab = 1 LOD with (-1,-1) |
| [in] | inLossytol | : Set lossycompression tolerance for mesh : ie move vertices with maximum tolerance value for better compression. Keep 0 for lossless comrpession |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddLayerInfosSet | ( | const Dtk_LayerInfosSetPtr & | inToWrite | ) |
Add a Layer informations.
| [in] | inToWrite | : Dtk_LayerInfosSetPtr to Write. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddMesh | ( | const Dtk_MeshPtr & | inToWrite, |
| Dtk_Float32 | inLossytol = 0 |
||
| ) |
Add a mesh into the current node.
| [in] | inMesh | : Mesh to Write. |
| [in] | inLossytol | : Set lossycompression tolerance for mesh : ie move vertices with maximum tolerance value for better compression. Keep 0 for lossless comrpession |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddMetaData | ( | const Dtk_MetaDataPtr & | inToWrite | ) |
Add a Metdata into the current node.
| [in] | inToWrite | : MetDatas to Write. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddModelView | ( | const Dtk_ModelDisplayPtr & | inModelview, |
| Dtk_Int64 | inIdmodelview = -1 |
||
| ) |
Add a modelView into the current node.
| [in] | inModelview | : modelView to Write. |
| [in] | inIdmodelview | : You may give an ID for modelview, to connect on. -1 for automatic ID. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddOverrideColor | ( | const Dtk_LightMapPtr & | inLightmap, |
| const Dtk_tab< Dtk_Int64 > & | inRoute, | ||
| Dtk_ID | inBodyID = 0 |
||
| ) |
Set a Lightmap for a specific instance.
| [in] | inLightmap | : Color to apply to instance. |
| [in] | inRoute | : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID |
| [in] | inBodyID | : Restrict a target for a body into an instance. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddOverrideColor | ( | const Dtk_RGB & | inRgb, |
| const Dtk_tab< Dtk_Int64 > & | inRoute, | ||
| Dtk_ID | inBodyID = 0 |
||
| ) |
Set an override color for a specific instance.
| [in] | inRgb | : Color to apply to instance. |
| [in] | inRoute | : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID |
| [in] | inBodyID | : Restrict a target for a body into an instance. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddPMI | ( | const Dtk_FdtPtr & | inPMI, |
| Dtk_Int64 | inIdpmi = -1 |
||
| ) |
Add a fdt into the current node.
| [in] | inPMI | : PMI to Write. |
| [in] | inIdpmi | : You may give an ID for FDT, to connect on. -1 for automatic ID. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::AddReferenceGeometry | ( | const Dtk_BodyPtr & | inRefgeom, |
| Dtk_Int64 | inIdrefgeom = -1 |
||
| ) |
Add a reference geometry into the current node.
| [in] | inRefgeom | : reference geometry to Write. |
| [in] | inIdrefgeom | : You may give an ID for reference geometry, to connect on. -1 for automatic ID. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::CloseLastInstance | ( | ) |
Close the last opened node.
| Dtk_ErrorStatus Dtk_Jtw_Interface::ConnectModelView_Instance | ( | Dtk_Int64 | inIdmodelview, |
| const Dtk_tab< Dtk_Int64 > & | inRoute, | ||
| int | inHide = 0, |
||
| Dtk_ID | inBodyID = 0, |
||
| const Dtk_transfo & | inExplode = Dtk_transfo() |
||
| ) |
Connect a ModelView on an Instance, for part representation restriction in a modelview.
| [in] | inIdModelView | : ModelView to Connect (ID given by AddModelView) |
| [in] | inRoute | : Route to instance (see remarks of ConnectPMI_ModelView) but this time, final ID should be inInstanceID given with LastInstance_SetInstanceID |
| [in] | inHide | : If instance is hidden (default add instance as visible) |
| [in] | inBodyID | : Restrict a target for a body into an instance. |
| [in] | inExplode | : Shift a particular instance to create exploded view. (not yet supported) |
| Dtk_ErrorStatus Dtk_Jtw_Interface::ConnectPMI_Geom | ( | Dtk_Int64 | inIdfdt, |
| Dtk_Int64 | inGeomid, | ||
| type_detk | inTypegeom, | ||
| const Dtk_tab< Dtk_Int64 > & | inRoute = Dtk_tab< Dtk_Int64 >(), |
||
| Dtk_ID | inBodyID = 0 |
||
| ) |
Connect a PMI on a body face/edge/vertex.
| [in] | inIdfdt | : PMI to connect on (ID given with AddPMI) |
| [in] | inGeomid | : Geometry to link : DtkFacePtr::info()->GetId() / DtkEdgePtr::info()->GetId() / DtkVertexPtr::info()->GetId() |
| [in] | inTypegeom | : Type of connection : DTK_TYPE_FACE or DTK_TYPE_EDGE or DTK_TYPE_VERTEX |
| [in] | inRoute | : Route to body (see remarks of ConnectPMI_ModelView) |
| [in] | inBodyID | : For a case of multiple bodies added into same node, give the inBody->info()->GetId() filled with function AddBody |
| Dtk_ErrorStatus Dtk_Jtw_Interface::ConnectPMI_ModelView | ( | Dtk_Int64 | inIdpmi, |
| Dtk_Int64 | inIdModelView, | ||
| const Dtk_tab< Dtk_Int64 > & | inRoute = Dtk_tab< Dtk_Int64 >() |
||
| ) |
Connect a PMI on a ModelView.
| [in] | inIdpmi | : PMI to connect. (ID given with AddPMI) |
| [in] | inIdModelView | : ModelView to Connect. (ID given with AddModelView) |
| [in] | inRoute | : if PMI is not in the same assembly node, indicate the route to reach it. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::ConnectPMI_PMI | ( | Dtk_Int64 | inIdpmifrom, |
| Dtk_Int64 | inIdpmito, | ||
| const Dtk_tab< Dtk_Int64 > & | inRoute = Dtk_tab< Dtk_Int64 >() |
||
| ) |
Connect a PMI on another PMI.
| [in] | inIdpmifrom | : PMI to link from (ID given with AddPMI) |
| [in] | inIdpmito | : PMI to link to (ID given with AddPMI) |
| [in] | inRoute | : Route to inIDfdt2 (see remarks of ConnectPMI_ModelView) |
Ask the writer if a part already exist.
| [in] | inIdpart | : ID of a part. |
| Dtk_ErrorStatus Dtk_Jtw_Interface::LastInstance_SetInstanceColor | ( | const Dtk_LightMapPtr & | inLightmap, |
| colorstrategy | inColorstrategy = keepsubcolor |
||
| ) |
Set a Lightmap to previously opened instance. A lightmap is more complete that Dtk_RGB, this fonction override same fonction with Dtk_RGB.
| [in] | inLightmap | : Color to apply to instance. |
| [in] | inColorstrategy | : see colorstrategy enum, with keepsubcolor color will affect only uncolored objects, overwritecolor will re-color all objects |
| Dtk_ErrorStatus Dtk_Jtw_Interface::LastInstance_SetInstanceColor | ( | const Dtk_RGB & | inRgb, |
| colorstrategy | inColorstrategy = keepsubcolor |
||
| ) |
Set a Color to previously opened instance.
| [in] | inRgb | : Color to apply to instance. |
| [in] | inColorstrategy | : see colorstrategy enum, with keepsubcolor color will affect only uncolored objects, overwritecolor will re-color all objects |
| Dtk_ErrorStatus Dtk_Jtw_Interface::LastInstance_SetInstanceID | ( | Dtk_Int64 | inInstanceID | ) |
Set an instance ID to previously opened instance.
| [in] | inInstanceID | : Giving an ID to this instance if a connector needs to target a specific instance |
| Dtk_ErrorStatus Dtk_Jtw_Interface::LastInstance_SetInvisible | ( | ) |
Set previously opened instance as invisible.
| Dtk_ErrorStatus Dtk_Jtw_Interface::OpenInstance | ( | const Dtk_string & | inName, |
| const Dtk_transfo & | inTrans = Dtk_transfo(), |
||
| const Dtk_string & | inExternfile = Dtk_string() |
||
| ) |
Open a new Instance for the assembly writing.
Note that at least a node must be opened before writing a mesh.
| [in] | inName | : Name of the node (written in Jt2Go assembly tree) |
| [in] | inTrans | : Local matrix of the node. Default is an identity matrix. |
| [in] | inExternfile | : if string lengths>0, open a new file from this child, allowing multiple Jt files (shattered, perpart, percomponent, or customized) |
| Dtk_ErrorStatus Dtk_Jtw_Interface::OpenInstance | ( | const Dtk_string & | inName, |
| Dtk_Int64 | inIdpart, | ||
| const Dtk_transfo & | inTrans = Dtk_transfo(), |
||
| const Dtk_string & | inExternfile = Dtk_string() |
||
| ) |
Open a new Instance for the assembly writing.
| [in] | inName | : Name of the node (written in Jt2Go assembly tree) |
| [in] | inIdpart | : ID to reinstance a part : if you give 2 times the same ID, the part is reinstancied. |
| [in] | inTrans | : Local matrix of the node. Default is an identity matrix. |
| [in] | inExternfile | : if string lengths>0, open a new file from this child, allowing multiple Jt files (shattered, perpart, percomponent, or customized) |