Sezione Dinamica

Forum per le domande e le discussioni in Italiano
Forum rules
regole del forum e le informazioni utili

Importante: PRIMA di chiedere aiuto leggete qui!
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

hi
potete creare uno bottone Customize_ToolsBar

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
User avatar
easyw-fc
Veteran
Posts: 3630
Joined: Thu Jul 09, 2015 9:34 am

Re: Sezione Dinamica

Post by easyw-fc »

mario52 wrote:ciao
ho modificato l'originale della macro ho aggiunto uno chekbox que permette di conservare la sezione
la macro originale serve solo per la visualizzazione
mario
Hi Mario, I'm continuing the thread
viewtopic.php?f=3&t=18046#p141860
here, also if I consider a pity because in a language subforum will have less visibility...
Anyway here my query:
It would be possible to have the macro conserving the colors in the cutted section?

Thank you
Maurice
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

saluti

I do not know
currently the macro create a single object and takes just a color
it would make a normal copy ... can try ?

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Sezione Dinamica

Post by renatorivo »

Ciao Mario,
penso che potresti mettere anche la tua versione della Macro Cross Section nel wiki, oltre al link

Renato
Sam
Posts: 177
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Post by Sam »

Mario,

I see from some of the posts in this thread that you speak English. Lucky for me!

I ended up here from the wiki article Macro cross section.

I am unable to locate the original author of the macro, and so you seem to be the maintainer by default :)

I think it needs a small tweak to work with FreeCAD 0.17. Around line 340 you'll see it skipping uninteresting objects. 0.17 seems to have introduced "GeoFeature" which causes the macro to fail.

Code: Select all

############################# Skip the <group object> ########################         # add
            b0 = []
            for x0 in self.oblist:
                if ( str(x0) !=  "<group object>"
                  and str(x0) != "<GeoFeature object>" ):
                    b0.append(x0)
After changing the code as above it's working fine for me.
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

saluti

grazie per alepho ma FreeCAD si chiude con o senza la modificazione

thanks for alepho but FreeCAD close with or without modification

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11749 (Git)
Build type: Release
Branch: master
Hash: 6c4bdf24dfd697ee212ec5950969125851a0907c
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11797 (Git)
Build type: Release
Branch: master
Hash: a5080329d8da6653495df686efbda62e73ac950a
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0


mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Sam
Posts: 177
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Post by Sam »

Works for me...

Code: Select all

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11792 (Git)
Build type: None
Branch: master
Hash: 7aec98ffb66065854a66d6d6715845fdbf0869a7
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedKingdom (en_GB)
Attachments
Macro_cross_section.FCMacro.zip
(5.46 KiB) Downloaded 325 times
mario52
Veteran
Posts: 4673
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Post by mario52 »

Saluti Sam

on Window, not work
Error00.png
Error00.png (7.57 KiB) Viewed 5593 times
OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

OS: Windows 10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11797 (Git)
Build type: Release
Branch: master
Hash: a5080329d8da6653495df686efbda62e73ac950a
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
renatorivo
Veteran
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Sezione Dinamica

Post by renatorivo »

Tested with a cube. It works. I do not know with more complex objects.
Provato con un cubo. Funziona. Non so con oggetti più complessi.
cross-section.png
cross-section.png (64.53 KiB) Viewed 5580 times
cross-section1.png
cross-section1.png (13.84 KiB) Viewed 5580 times
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Renato
Sam
Posts: 177
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Post by Sam »

mario52 wrote: Fri Aug 18, 2017 9:28 am on Window, not work
Does it fail every time, or are you trying a specific file?

If it's a specific file I'd be happy to take a look.

If I have time later I'll fire up a windows 7 virtual machine and see if that tells me anything.
Post Reply