← Back to team overview

kicad-developers team mailing list archive

Re: VRML export

 

.. back to discussion!
here I am

I see, so that is a already implemented flag.
yes, as in pcbnew manual
http://docs.kicad-pcb.org/en/pcbnew.html
13.11. Attributes
"Virtual indicates that a component is directly formed by the circuit board. Examples would be edge connectors or inductors created by a particular track shape (as sometimes seen in microwave footprints)." Virtual IMO is perfect also for mechanical objects as for example enclosures or mechanical parts typically there is no 3D model associated to a footprint with Virtual Attribute, so it is possible to add e.g. the enclosures or mechanical PCB stand-off spacers Please note that if you use e.g. a mechanical TH pad, the pad footprint will be displayed in 3d-viewer also if Virtual, but the 3D model will or will not in function of the virtual flag

It is not missing, it is not yet implemented in my branch :) .. the options is still there in same place.
ok, I just will wait/hope for the resurrection :)

it is a personal local branch...
Is it online? How do you get the "Virtual" attribute from the model?
in April 2016 we already talked about :)
https://lists.launchpad.net/kicad-developers/msg18083.html
I just moved the sourced away, because the new 3d-viewer is now available, anyway here some code I added:
info3d_visu.h
enum DISPLAY3D_FLG {
    FL_AXIS=0, FL_MODULE, /*maui*/ FL_VIRT, FL_ZONE,

3d_draw.cpp
in void EDA_3D_CANVAS::buildFootprintShape3DList
for( MODULE* module = pcb->m_Modules; module; module = module->Next() )
    { //maui
	if( !g_Parm_3D_Visu.GetFlag( FL_VIRT ) ) { //maui
		if(module->GetAttributes() != MOD_VIRTUAL) {  //maui
            render3DComponentShape( module,  loadOpaqueObjects,
                                        !loadOpaqueObjects );
		} //maui
}									
	else {
            render3DComponentShape( module,  loadOpaqueObjects,
                                     !loadOpaqueObjects );
		}  //maui
	} //maui
the same for TransparentObjects and in case of not used Materials

and in
3d_frame.cpp
you need to load/save your previous value if you want to start in the same condition (but can be saved with the other 3d-viewer flags e.g. FL_SHOW_BOARD_BODY)

Please note that the 3D mechanical VRML models would be loaded (adding rendering/parsing time) only if the Virtual is selected

It is very small piece of code for a quite useful improvement
Moreover it is very easy visually align your enclosure to the footprint just using my StepUp tools
Please let me know if you need more details

Maurice


On 25/02/2016 11.16, Mário Luzeiro wrote:
Hi Maurice,

.. back to discussion!

as I suggested it is possible to associate the Virtual option to a model
in pcb (Footprint Properties, Properties Tab, Attribute, Virtual)
and this is done without changing anything in the pcb format

I see, so that is a already implemented flag.
I checked the other threads, looks there was no much attention on that
and since nobody is reading us here :) I will open a new thread to discuss that "Virtual" attribute and if that could be used

that was an already available option now missing
It is not missing, it is not yet implemented in my branch :) .. the options is still there in same place.

it is a personal local branch...
Is it online? How do you get the "Virtual" attribute from the model?

Mario Luzeiro
________________________________________
From: easyw [easyw@xxxxxxxxxxxx]
Sent: 24 February 2016 20:45
To: Mário Luzeiro; Cirilo Bernardo; KiCad Developers
Subject: Re: [Kicad-developers] VRML export

In any case, I believe there is no elegant way to individual save that options locally.
as I suggested it is possible to associate the Virtual option to a model
in pcb
(Footprint Properties, Properties Tab, Attribute, Virtual)
(e.g. a silk/Fab model text to which the enclosure would be associated
or better an anchor hole/pad)
then, as I mentioned many times, it is possible to display or not
footprints that have Virtual attribute ... and this is done without
changing anything in the pcb format, nor in the local/global options
https://lists.launchpad.net/kicad-developers/msg18069.html
https://www.mail-archive.com/kicad-developers%40lists.launchpad.net/msg15739.html
as you can see the info are available...

So it will take time.
if someone cares of

Related with Materials.
Please do not mix the two things.
You will get a proper way (I hope) to deal with virtual / mechanic / enclosures / ...
as already pointed out, it is a problem to display the board with pads,
flashing when moving the board, just to display 'nice' material props...
I just said let the user choose what to display... that was an already
available option now missing

I know that you are using the material option to show/hide enclosures,
no, I'm not, I use virtual attribute, I only suggested that with this
option also any other user would have this opportunity

I remember you have an option in your branch, what is the link for the branch?
it is a personal local branch...

Cheers
M



Follow ups

References