← Back to team overview

kicad-developers team mailing list archive

Re: VRML export

 

Creating a footprint with no pads,
silkscreens, and/or text and only a 3D model seems a bit
counter-intuitive to me.
I normally use anchor pad (which correspond to anchor of the enclosure) and I set it as Virtual module attribute
Then in 3D-viewer you see your pad with Cu and Silk
That pad has also a 3D model associated, which is i.e. the enclosure
When I model the 3D enclosure, I load the pad footprint in FreeCAD with kicad StepUp and I align the 3D model to the pad, then I export the enclosure VRML model to be displayed in pcbnew 3d-viewer Enabling or not the Virtual 3D models you will see or not the enclosure just beside your pcb artwork
the result is like this
https://kicad-info.s3-us-west-2.amazonaws.com/original/2X/0/0b70db5f2bd661b6417bd086cf45035a5fa263ff.gif

Or you can build a model with just an alignment cross in i.e. F.Fab or F.Silks and Hide reference and value, and assign to it the 3D model with virtual attrib


both procedure can co-exist with the actual kicad format and will give the tool a nice mechanical feature

Thank you
Maurice


On 25/02/2016 15.45, Wayne Stambaugh wrote:
On 2/25/2016 6:50 AM, easyw wrote:
.. 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

You could possibly use the virtual flag for 3D model only footprint but
I've never tried it so it may not work.  If it's possible, then I see no
reason not to allow it although it does seem like a bit of a convoluted
solution that may confuse users.  Creating a footprint with no pads,
silkscreens, and/or text and only a 3D model seems a bit
counter-intuitive to me.

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


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



Follow ups

References