Search found 71 matches
- Sun Jan 12, 2025 5:30 am
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
BTW the colors look somewhat dull because of lighting. They would be fully bright if lighting was disabled.
- Sun Jan 12, 2025 5:27 am
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
It works. So, this is sample's problem. This check box and the handler was lost in v6.0 release. I have attached a fixed version of C++ Morph. It will be in the next update hopefully with other languages also.
- Fri Jan 10, 2025 1:27 am
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
v6.2 C++ Morph (the last version which has the CMorphDlg::OnShading() code) works in 64 bit with DGK 7.2 installed. Replace int nDim = 0; in the code with EDim_DG nDim = e0D; to get it compiled. So, old KC interface works for per vertex colors with the latest DGK. IMesh_DG.EnableShading() and IMesh_...
- Thu Jan 09, 2025 9:09 pm
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
Great. Yes, just iterate the vertices. Here is the snippet from v5.2 C++ Morph CMorphDlg::OnShading()OnShading() IIteratorT* iVertexIterator; m_iMesh->GetVertexIterator(&iVertexIterator); INT_PTR posnVertex = 0; iVertexIterator->GetHeadPosition(&posnVertex); byte color[3]; // Integers in ran...
- Thu Jan 09, 2025 3:08 am
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
Hi Measure, It is a good question. It was a while since I touched this. My quick look produced this: We used to have "Shading" check box in Morph. PerVertexMorph.png But it was removed a while ago. I do not remember the reason. I will dig in the next few days and will post more here. It wo...
- Wed Jan 08, 2025 2:26 am
- Forum: DG Kernel discussions
- Topic: Changing colour of mesh face and mesh wireframe
- Replies: 9
- Views: 1195
Re: Changing colour of mesh face and mesh wireframe
Hi There is a way to define per vertex color, but it is not what you are asking about because per vertex color blends the color into all adjacent faces (simplices). Frankly, per mesh face color does not make much sense to me as a built-in functionality. I am pretty sure the right way for doing this ...
- Tue Dec 03, 2024 11:54 pm
- Forum: DG Kernel discussions
- Topic: Resetting frame without affecting objects
- Replies: 11
- Views: 12355
Re: Resetting frame without affecting objects
The question was about resetting the frame. You are not happy about where the local frame is located relatively to the geometry. But for an arbitrary geometry there is no such thing as the default frame. You need to define it yourself either manually or in code. If you replace rotations and translat...
- Tue Dec 03, 2024 7:23 pm
- Forum: DG Kernel discussions
- Topic: Resetting frame without affecting objects
- Replies: 11
- Views: 12355
Re: Resetting frame without affecting objects
The above code assumes that descendants represent parts of a solid assembly, so the different surfaces have to remain aligned in the same way. Notice that the child entity is moved as a whole without modifying relative position of its local frame. If you need to move local frame for descendants also...
- Tue Dec 03, 2024 7:09 pm
- Forum: DG Kernel discussions
- Topic: Resetting frame without affecting objects
- Replies: 11
- Views: 12355
Re: Resetting frame without affecting objects
Again, why do we need to modify the geometry? Geometry itself is not aware of any frames. It is just a collection of coordinates, curves, surfaces. Say, if the object is a single point as a point set, then the geometry will have only three coordinates like (1,0,0) stored. Translation with IGeometric...
- Tue Dec 03, 2024 6:34 pm
- Forum: DG Kernel discussions
- Topic: Resetting frame without affecting objects
- Replies: 11
- Views: 12355
Re: Resetting frame without affecting objects
Similarly to usual frame movement the second rotation in transform.Rotate(0.25 * Math.PI, 0); transform.Rotate(0.25 * Math.PI, 2); transform.Translate(-1, -2, -3); of MoveGeometry() applies rotation relative to the current orientation of the frame achieved after the first rotation, not the initial o...