19.12.2018 • C3D Vision

New Tools and Code Samples for Visualize 3D Modeling in C3D Vision 2019

Recently, we released a new version of C3D Vision, the 3D engine part of our C3D Toolkit. It operates with polygonal models and is responsible for drawing visual scenes in engineering software products. In this post, I’ll focus on the new, ready-made solutions that make it simpler for developers to use our visualization module.

Slots and Signals are now the primary form of communication between C3D Vision objects. They reduce the amount of code that’s needed to interact with geometric objects and their representations, as well as with camera control processes and in updating rendering frames.

We adopted the tactic of using slots and signals from Qt, as it seems to be the most convenient system. This required us to add a number of extensions to Vision 2019. For instance, information about the signal sender is required, and so C3D Vision in this case provides the Object::GetSender() function that returns a pointer to the object which sent the signal:

Object::Connect(pProgressBuild, &ProgressBuild::BuildAllCompleted, this, &ModelLoading::slotFinishBuildRep);
Object::Connect(pGeometry,VSIGNAL(GeometryDestroyed(Geometry*)), this,VSLOT(DetachGeometry(Geometry*)));

Metadata provides additional information about C3D Vision objects. It helps you to find the names of objects and their properties, and to check whether objects inherit certain classes. It is not based on moc-files. The good news is that metadata, along with slots and signals, do not require additional code generation.

class  DimensionGeometry {
class  LinearDimensionGeometry : public DimensionGeometry {
LinearDimensionGeometry* pDim = vobject_cast< LinearDimensionGeometry*>(pDimension);

Native Events is the new, simplified event model in C3D Vision. It handles events from input devices, such as the mouse and keyboard, and can be used to override other devices. This is necessary for developing manipulators that interact with the model under construction.

The diagram below illustrates how Qt events integrate with C3D Vision events:

Closer Integration with the C3D Modeler geometric kernel means that to automatically generate scene graphs based on mathematical models, you need call just one function:

MbModel* pModel;
SceneSegment* pTopSegment = sceneSegment()->GetRootSegment();
SceneGenerator::Instance()->CreateSceneSegment(pModel, pTopSegment);

Also, you can now generate visual representations for separate mathematically-defined objects automatically, such as MbSolid, MbSurface, MbArc, and so on. We are working on creating a sketch as a separate object, with its own primitives and representation.

PMI. The module implements three aspects of product and manufacturing information (PMI): linear, diametrical, and angular dimensions. In turn, dimensions may be applied with measurement tools.

Object Detection now generates signals as the mouse moves, and identifies the object pointed to by the cursor. You have the opportunity to subscribe to this event and implement its object selection manager:

ObjectPickSelection* pickSelection = objectPickSelection();

A structure that lists the identities of objects found by the cursor is transferred to the slot slotObjectHoverMove(PickSelectionEventPtr event). Using identifiers, you can search for objects or their primitives – edges, faces, and vertices – as mathematical representations.

Cutting Plane Tool now performs cross sections using OpenGL, which gives you quicker results. (It replaces the older method of modifying the topology of solid sections.) The tool makes sections with several planes and closes the cutting point. You can specify a material for each section plane separately.

Light Sources are improved in C3D Vision 2019. Now you can add and remove up to eight light sources, and edit the location and properties of each one separately.

Overall, we feel that these improvements to C3D Visual 2019 will make our toolkit more attractive to software developers.

Eduard Maksimenko, Head of C3D Vision Department
Eduard Maksimenko
Head of C3D Vision Department