← Back to team overview

kicad-developers team mailing list archive

Re: Kicad 3D Virtual models for mechanical purposes

 

Hi Nick and Mario
In pcbnew I just check the Virtual Attribute for the mechanical part as in the attached image... (nothing to be modified in pcbnew code)
then in the 3d-viewer code I add a flag to be able to display or not the 3d model...
src\kicad\3d-viewer\info3d_visu.h 
FL_VIRT
then I managed the flag and the module property attribute in 
src\kicad\3d-viewer\3d_draw.cpp
src\kicad\3d-viewer\3d_frame.cpp
src\kicad\3d-viewer\3d_toolbar.cpp

you can download a copy of a quite recent version of this variant at
sourceforge.net/projects/kicad-3d/files/production
I started that repository to add 3d-viewer to the stable release 4022, when the production version were still under development ...
then I moved to the production version and I modified only some parts usefull in my opinion for 3d viewing, manipulating and exporting ...

Maurice

On 26 April 2015 23:27:51 CEST, Mario Luzeiro <mrluzeiro@xxxxx> wrote:
>Hi Maurice,
>Personally as a user, some time ago I had a similar situation dealing
>with an enclosure. I had to manual set the file  model to be totally
>transparent in order to have that same as you.
>How did you set / define that a module is virtual in pcbnew?
>
>Regards,
>Mario Luzeiro
>
>
>On 26 Apr 2015 22:43, easyw <easyw@xxxxxxxxxxxx> wrote:
>>
>> Hi Nick, 
>> I attached 2 screenshots:
>> one with Virtual modules off and one with virtual modules on.
>> As you can see the green pcb board is displayed alone to develop the
>routing.
>>
>> When in 3d-viewer I toggle the Virtual modules on, you can see the
>box and a 3d module of a beagle-board that is mechanical coupled with
>the develop board... in that way I can check mechanical matching and
>dimensions, reducing the probability of errors...
>>
>> I toggle only 3d modules (wrl files) and not pcb footprint, so in
>case of a spacer anchored to a pad, the pad will always be displayed,
>but the spacer only when the virtual 3d modules will be enabled...
>>
>> I also add some toolbar buttons to change the visibility of virtual,
>board, modules, fill zones, silk, solder mask and paste in a faster
>way... I think that would be nice to add to ...
>>
>> please let me know your thinking
>> Maurice
>>
>>
>> On 26 April 2015 17:25:11 CEST, "Nick Østergaard" <oe.nick@xxxxxxxxx>
>wrote:
>>>
>>> I don't understand what this feature does exactly. Can you provide a
>>> demo and/or a patch?
>>>
>>> 2015-04-26 15:20 GMT+02:00 easyw <easyw@xxxxxxxxxxxx>:
>>>>
>>>> Hi to all, I just slightly modified 3d-viewer to add this feature:
>>>> the option to toggle visibility for 3d models when they are
>assigned as
>>>> virtual in pcb footprint menu.
>>>>
>>>> I use this feature to add to the board mechanical parts (e.g.
>spacers, box,
>>>> etc) and be able to display or not them in 3d-viewer.
>>>> In this way I can manage the pcb routing without viewing the 3D
>mechanical
>>>> parts, and check dimensions and other mechanical needs just
>toggling the
>>>> visibility of the virtual 3D models.
>>>>
>>>> I don't know if someone may consider this useful... I use this
>feature a lot
>>>> to verify dimensions, holes and mechanical needs during the
>pre-production
>>>> phase.
>>>>
>>>> I also modified the export to vrml file to add the option to export
>or not
>>>> the virtual 3d models.
>>>>
>>>> The differences with the standard kicad source code are very small
>and if
>>>> the developers would think that feature may be usefull to be add to
>the
>>>> release, I can post this patch...
>>>>
>>>> Please let me know you opinion...
>>>> Thank for this great sw
>>>>
>>>> Maurice
>>>>
>>>> ________________________________
>>>>
>>>> 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
>>>
>>>
>>
>> -- 
>> Sent from Mobile

-- 
Sent from Mobile

Attachment: virtual-attribute.png
Description: PNG image


References