Author Topic: BLOCKVIEW and 3D  (Read 4636 times)

0 Members and 1 Guest are viewing this topic.

Tramber

  • Guest
BLOCKVIEW and 3D
« on: March 14, 2006, 07:24:46 AM »
As recently discussed, I noticed many times that the BLOCKVIEW doesn't update correctly when it is employed to show a 3D block.

In my experience, it often updates badly when it is 3D when it updates correctly when it is 2D.

In this exemple, you can see the field "Nombre" has been changed (the amount of holes). The 3 2D views update and not the 3D one. The block are written the same way (in Vlisp) in the same routine.

Do I share this experience with anybody or am I crazy ?

It happens in many different porgramms and processes. And the most crazy is that it sometimes works good (the exemple I'm showing you goes well sometimes) and I don't know why.

Is there anything I should know ? I've been programming ODCL for months and ever found my mistakes (almost !), but what about this phenomen ?

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: BLOCKVIEW and 3D
« Reply #1 on: March 14, 2006, 07:31:54 AM »
Sorry, can't help Bert'
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

Serge J. Gianolla

  • Guest
Re: BLOCKVIEW and 3D
« Reply #2 on: March 14, 2006, 06:54:10 PM »
 :?Without looking at part of your code, it'd be quite a task to know what's goin'on!

Tramber

  • Guest
Re: BLOCKVIEW and 3D
« Reply #3 on: March 15, 2006, 05:27:43 AM »
The code to update the 4 blockviews :

Code: [Select]
(defun MAJblos(num /)
    (setq result(vl-catch-all-apply '(lambda (x) (MAJmain num)  ) (list 1)))
    ;;;    (MAJmain num)
    (if(not(=(type result)'VL-CATCH-ALL-APPLY-ERROR)); just in case !
      (progn
(Odcl_BlockView_Clear Ramb_MAIN_DwgPLAN)(Odcl_BlockView_Clear Ramb_MAIN_DwgELEV)(Odcl_BlockView_Clear Ramb_MAIN_DwgFACE)(Odcl_BlockView_Clear Ramb_MAIN_Dwg3D)
(Odcl_BlockView_DisplayBlockToScale  Ramb_MAIN_DwgPLAN (strcat"MAIN2DPLAN_"(itoa num)) 0.0 0.0 1.0 1.0)
(Odcl_BlockView_DisplayBlockToScale  Ramb_MAIN_DwgELEV (strcat"MAIN2DELEV_"(itoa num)) 0.0 0.0 1.0 1.0)
(Odcl_BlockView_DisplayBlockToScale  Ramb_MAIN_DwgFACE (strcat"MAIN2DFACE_"(itoa num)) 0.0 0.0 1.0 1.0)
(Odcl_BlockView_DisplayBlockToScale  Ramb_MAIN_Dwg3D (strcat"MAIN3D_"(itoa num))  1.0 1.0 1.0 0.5)
)(alert"Erreur de modélisation ou de dessin"))
    )

Then, for each block, it is this kind of programming :

(ENTMAKE (list (cons 0 "block") (CONS 2 nom3) (cons 10 '(0 0)) (cons 70 64)))(ENTMAKE (list (cons 0 "endblk")))
    (setq blo3 (apa-addBlock apBlocks nom3 '(0 0))); apa-addBlocks comes from a library (by Phil Kreiker) and simply declare the block as an item

Then

(apa-AddLightweightPolyline blo3  ptsmain); idem, this lisp friendly function comes from the library I was talking
(apa-AddBox blo3 (list 0 0(-(+(abs PASSMAIN)0.005))) LARGPOT EPPOT 0.01)
...etc

The same kind of programming for the 4 blocks, inside the same routine.
(MAJblos) is called after an event in the dialog box and after the blocks have been updated (off course)

Serge J. Gianolla

  • Guest
Re: BLOCKVIEW and 3D
« Reply #4 on: March 15, 2006, 04:39:17 PM »
Call me Bert'

What I was thinking is to have posted something that other people here can play with, so maybe throw the odc file with code! I realise there may be privacy issues, so it does not have to be the faulty one, but make one up with 2 or 3 blocks for testing purposes.

In the Samples folder for ODCL, there is a lisp file named demo, when you run it; a feature to show blocks within the dwg using blockviewer would be useful to check yours!
Come to think of it, this one shows 3D Objects with no hassles, so maybe the problem is in the making of blocks on the fly?

Have you tried to use force_update? Change the order of display - perhaps the 3D first? Do not display in Render mode but just 2D wireframe...


Andrea

  • Water Moccasin
  • Posts: 2360
Re: BLOCKVIEW and 3D
« Reply #5 on: March 15, 2006, 08:51:53 PM »
ça ressemble pas mal au "SLIDE" qui avaient une résolution médiocre...

Oops !!...sorry....I miss my English..
It look like the ODCL seem to show pore 3D resolution...
similar to "SLIDE"...long...long time ago..

;-)
Keep smile...

Serge J. Gianolla

  • Guest
Re: BLOCKVIEW and 3D
« Reply #6 on: March 15, 2006, 09:14:10 PM »
Andrea, Ciao ragazzo  :mrgreen:
T'as deja eu le meme pb avec Blocviewer toi?

Quote
It look like the ODCL seem to show pore 3D resolution...
Yeah, I thought along the same line too, that's why I asked him to do wireframe in viewer! Presumably too, the holes are made of cylinders but "forgotten" to be subtracted from main solid, so they appear as circles in 2D but not distinct in rendered image! Swing it around with 3Dorbit, still no joy? [Just thinkin' loud here Bert' - shooting in the dark]

Tramber

  • Guest
Re: BLOCKVIEW and 3D
« Reply #7 on: March 16, 2006, 02:44:07 AM »
The resol is not the point.
Facetres was about 0.1

So, I'm I the only one on this planet to complain about 3D blocks updating problems in BLOCKVIEW


Serge J. Gianolla

  • Guest
Re: BLOCKVIEW and 3D
« Reply #8 on: March 16, 2006, 03:23:52 AM »
Quote
The resol is not the point.
We were talking about the activex BlockViewer maybe not supporting fully render mode.

Quote
shooting in the dark
Because you did not give us enough info, on a rien a se mettre sous la dent :lmao:. So you have to excuse us, since we do not have that knowledge [how much you went thru to find out the problem], people here are going to throw various ideas/tricks/tests... If it appears like we are treating you like a beginner, again we apologise. I do not know for the others but I cannot read your mind.
On est pas la pour te vexer, mais pour t'aider. Capisce? :angel:

Tramber

  • Guest
Re: BLOCKVIEW and 3D
« Reply #9 on: March 16, 2006, 06:10:21 AM »
Je ne suis plus votre conversation.
J'ai toujours eu un problème d'update avec les blocs 3D. Et je suis surpris de ne pas partager cette expérience.

*************
Sorry it's french but it's all the same than in the previous messages !
Quote
... to be subtracted from main solid, so they appear as circles in 2D but not distinct in rendered image! Swing it around with 3Dorbit, still no joy?

No it is not a matter of rendermode (I think, even if you make me doubting now, I'll have a look) nor of orbit (that is sure).

Joel Roderick

  • Guest
Re: BLOCKVIEW and 3D
« Reply #10 on: March 16, 2006, 03:05:04 PM »
I use the block view in a few of my programs and have had similar issues.  I found that the blockview control is pretty pciky about the size and ratio of height to width when it comes to the display quality.

To test this theory out, make the control re-sizable and move the form around in autocad to see what works best.

Hope this helps...

Tramber

  • Guest
Re: BLOCKVIEW and 3D
« Reply #11 on: March 17, 2006, 03:59:00 AM »
I use the block view in a few of my programs and have had similar issues.  I found that the blockview control is pretty pciky about the size and ratio of height to width when it comes to the display quality.

Thanks for the testimony. If I understand you, the fact is that : if the geometry changes, then the position of the object may differs.
Off course, that happened to me.

On my image below. If I change the type of the object, the 2D updates, not the 3D and the 3D objects seems to be lost alittle outside the view due to a change around point zero. We can't see the 3D object entirely even if it was asked to the odclcontrol. The geometry was updated in the block but not in the view.

Have a look :

Joel Roderick

  • Guest
Re: BLOCKVIEW and 3D
« Reply #12 on: March 17, 2006, 09:05:08 AM »
Is there any chance you could setup a small example of this and upload it?  I see you posted something above, but it would be much easier if we had a small odc and lsp file to play with...

Tramber

  • Guest
Re: BLOCKVIEW and 3D
« Reply #13 on: March 17, 2006, 12:22:03 PM »
I will
It needs a little of preparation.

This is why I'll do it much after my Skiing Week-End in SwisserLand ! The Forecast says it might be very sunny. And the snow quantity is huge  8-)
I must go to bed very soon cause we drive very very early....

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: BLOCKVIEW and 3D
« Reply #14 on: March 17, 2006, 04:40:09 PM »
I've had a note from Chad on the thread ;
Quote
... Well I am not sure what to say because the blockview relys on AutoCAD to do the painting of the block to the blockview window.

... so some sample code and an ODC MAY be required to sort resolve this.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--