DrawView update ISSUE

DrawView update ISSUE

I am developing a kind of, simple, "tweak tech" as follows:

The second selected "tweak point" coordinates are used to place the first selected "tweak point" so
both points result at the same coordinate, then the modeling command c4d.MCOMMAND_OPTIMIZE is called,
sometimes "artifacts" lines appears, I noted such lines always point to "wolrd axis".

when zoomming (finger mouse wheel) such lines desappear as shown in the .gif file,
I have tried the following with little effect:

c4d.DrawViews(c4d.DRAWFLAGS_FORCEFULLREDRAW, bd)
c4d.EventAdd(c4d.EVENT_FORCEREDRAW)

Is the an effective way for updating the view?

thanks in advance.

# The call secuence as follows:



def MouseInput(self, doc, data, bd, win, msg):

	...

	def ExecuteTweak(self, bd):

		...

		self.DataDict[TP_Object].SetPoint(...) # setting the point at the second point coordinate
		self.DataDict[TP_Object].Message(c4d.MSG_UPDATE)

		...
		
		self.Optimize() # OptimizeSettings[c4d.MDATA_OPTIMIZE_UNUSEDPOINTS] = False
	
		c4d.DrawViews(c4d.DRAWFLAGS_FORCEFULLREDRAW, bd)
		c4d.EventAdd(c4d.EVENT_FORCEREDRAW)

image at sdk_support(at)maxon(dot)net

Hello @mdk7b2,

Thanks for reaching out to us. Your question is not forgotten and will be answered as soon as possible. Please, excuse the delay, it's a little busy time now.

Cheers,
Ilia

MAXON SDK Specialist
developers.maxon.net

More evidence at sdk support email

Thanks and take all the time you need i move on :-)

Hi @mdk7b2,

Thanks for your patience and sorry for the delayed answer.

I can clearly see the issue you're struggling with, however, I cannot reproduce it without a sample code. Without the code that demonstrates the issue I can only speculate on possible reasons, for example you might want to check c4d.MSG_POINTS_CHANGED and c4d.MSG_POLYGONS_CHANGED messages to explicitly declare the change of the object's geometry.

To ease any further investigation, please, share a miminal code snippet that shows the issue.

Cheers,
Ilia

MAXON SDK Specialist
developers.maxon.net

I have testesd both option you mention with out solving the issue, I even tried c4d.MSG_CHANGE, soon I submit a sample code.
Also I'll try a different approach with WELD command, i will search the forum on how to use it since the help doc on this command is not clear.

Again: soon I submit a sample code.

Thanks

ISSUE SOLVED

Issue caused by a mess in the normals, yes my little knowledge in 3D makes me forget
objects are not only vertex and polygons also normals.

Check sdk_support(at)maxon(dot)net

Thanks Maxon :)

Hi @mdk7b2,

Glad to hear and thank you for sharing your solution! :+1:

Good luck and let me know if you have any further questions.

Cheers,
Ilia

MAXON SDK Specialist
developers.maxon.net