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
Posts: 3235
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Tue Apr 05, 2016 9:54 am

hi
potete creare uno bottone Customize_ToolsBar

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting, Dialog creation. My macros on Gist.github.
User avatar
easyw-fc
Posts: 2915
Joined: Thu Jul 09, 2015 9:34 am

Re: Sezione Dinamica

Postby easyw-fc » Thu Oct 20, 2016 11:55 am

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
Posts: 3235
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Thu Oct 20, 2016 6:42 pm

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, Dialog creation. My macros on Gist.github.
renatorivo
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Sezione Dinamica

Postby renatorivo » Thu Oct 20, 2016 9:48 pm

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

Renato
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Postby Sam » Thu Aug 17, 2017 8:01 am

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
Posts: 3235
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Thu Aug 17, 2017 9:30 am

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, Dialog creation. My macros on Gist.github.
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Postby Sam » Thu Aug 17, 2017 10:15 am

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 164 times
mario52
Posts: 3235
Joined: Wed May 16, 2012 2:13 pm

Re: Sezione Dinamica

Postby mario52 » Fri Aug 18, 2017 9:28 am

Saluti Sam

on Window, not work
Error00.png
Error00.png (7.57 KiB) Viewed 1271 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, Dialog creation. My macros on Gist.github.
renatorivo
Posts: 2611
Joined: Tue Feb 21, 2012 8:07 pm
Location: Torino - Italy

Re: Sezione Dinamica

Postby renatorivo » Fri Aug 18, 2017 6:57 pm

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 1258 times
cross-section1.png
cross-section1.png (13.84 KiB) Viewed 1258 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
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: Sezione Dinamica

Postby Sam » Fri Aug 18, 2017 7:54 pm

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.