Try to do a Spring
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Try to do a Spring
@ Bejant
I wonder if you had a copy paste issue, because Mario's script worked for me.
With Python white spaces are very important, I have found that on some browser O/S combinations, if you click on the wiki's select all link, it will add about 4 spaces to each line when you paste it into the new macro. To fix that you have to work out how many spaces have been added and delete that same number of spaces from every line. I have found that high lightijng the text of the macro in the wiki with the mouse and then using ordinary copy paste seems to not add the extra spaces....
I think the problems you guys are seeing is a Bejant said, probably self intersecting solid, try moving the profile to outside of the helix path...rather than being centred on it.
Also there is an update in OCE master that may or may not effect this, it seems to fix an issue I was having with angled (tapered) Part Extrusions.
Jim
I wonder if you had a copy paste issue, because Mario's script worked for me.
With Python white spaces are very important, I have found that on some browser O/S combinations, if you click on the wiki's select all link, it will add about 4 spaces to each line when you paste it into the new macro. To fix that you have to work out how many spaces have been added and delete that same number of spaces from every line. I have found that high lightijng the text of the macro in the wiki with the mouse and then using ordinary copy paste seems to not add the extra spaces....
I think the problems you guys are seeing is a Bejant said, probably self intersecting solid, try moving the profile to outside of the helix path...rather than being centred on it.
Also there is an update in OCE master that may or may not effect this, it seems to fix an issue I was having with angled (tapered) Part Extrusions.
Jim
Re: Try to do a Spring
Jim, I selected the macro text by swiping with the mouse, then Ctrl +C, and tried several times to make sure I selected all the text. Running the macro produces one line segment on the X-Y plane; when I used it before the revision it worked fine. I'll try again later today.
Re: Try to do a Spring
hi
I do not understand I just tested the macro and it works perfectly
and by making a small change can work on any spire of the spring you can display the error data
mario
I do not understand I just tested the macro and it works perfectly
and by making a small change can work on any spire of the spring you can display the error data
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.
My macros on Gist.github here complete macros Wiki and forum.
Re: Try to do a Spring
Did you click on "save" before running the macro?bejant wrote:Jim, I selected the macro text by swiping with the mouse, then Ctrl +C, and tried several times to make sure I selected all the text. Running the macro produces one line segment on the X-Y plane; when I used it before the revision it worked fine. I'll try again later today.
here is the macro zipped up, if you unzip it you should be able to just open it in FreeCAD.
Re: Try to do a Spring
hi jmaustpc
si vous voulez une version précédente d'une page dans le wiki ou page de macro, faites "Afficher l'historique" et choisissez une date
mario
it is this version that has problems bejant ( last 6/11/2014) zipped version herejmaustpc wrote:bejant wrote:Jim, I selected the macro text by swiping with the mouse, then Ctrl +C, and tried several times to make sure I selected all the text. Running the macro produces one line segment on the X-Y plane; when I used it before the revision it worked fine. I'll try again later today.
if you want a previous version of a page in the wiki or page in macro, do "Show History" and choose a datebejant wrote:Edit: Mario, will you post back and let me know what is wrong?
si vous voulez une version précédente d'une page dans le wiki ou page de macro, faites "Afficher l'historique" et choisissez une date
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.
My macros on Gist.github here complete macros Wiki and forum.
Re: Try to do a Spring
Mario's macro is running fine for me. I copied it from the Macro's page on the wiki. It generates a BSpline object.
A note, if I try to sweep a profile along the BSpline without checking "Frenet", FreeCAD immediately crashes with no warning.
Running FreeCAD through gdb, I get this message:
If I check "Frenet", the sweep succeeds, but it shows the same artifact Mario has on the first image here. This seems to be at each place the pitch of the helix changes.
OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4171 (Git)
Branch: master
Hash: 82ed56a3a91607c2c7e622fcd83793b9283a6940
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
A note, if I try to sweep a profile along the BSpline without checking "Frenet", FreeCAD immediately crashes with no warning.
Running FreeCAD through gdb, I get this message:
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x00007fff608cec21 in BRepFill_Sweep::BuildShell(BRepFill_TransitionStyle, int, int, TopTools_MapOfShape&, BRepFill_DataMapOfShapeHArray2OfShape&, double, double) () from /usr/lib/x86_64-linux-gnu/libTKBool.so.9
OS: Ubuntu 14.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4171 (Git)
Branch: master
Hash: 82ed56a3a91607c2c7e622fcd83793b9283a6940
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1
- Attachments
-
- TruncateSpring_Sweep.fcstd
- (33 KiB) Downloaded 43 times
Last edited by NormandC on Sat Nov 08, 2014 3:10 pm, edited 1 time in total.
Reason: Attached sample file.
Reason: Attached sample file.
Re: Try to do a Spring
mario52 wrote:it is this version that has problems bejant ( last 6/11/2014) zipped version here
Hi Guysnormandc wrote: I copied it from the Macro's page on the wiki.
I copied it from the wiki Macro page as well.
Jim
Re: Try to do a Spring
hi
viewtopic.php?f=3&t=8313&start=10#p68323
I can try to soften the angle of the connector
I have also some time this window
merci à tous pour tester ma macro , je n'ai pas mieux que vous mais jakob a eu un bon résultat viewtopic.php?f=3&t=8313&start=10#p68323
je peux essayer d'adoucir l'angle du raccord
j'ai aussi quelques fois cette fenêtre
Example
1: modify the values
replace ex:
lastSpire = 4.0 # last Spire (high spring)
penultimateSpire = 8.0 # penultimateSpire
# # normal Spring
# # normal Spring
secondSpire = 8.0 # second Spire
firstSpire = 4.0 # first spire (low spring)
I made a shema position of the page Macro_TruncateSpring
2: quit and save the macro
3: load the macro in FreeCAD
4: run the macro
mario
thank you all for testing my macro, I was not better than you, but jakob had a good resultnormandc wrote:Mario's macro is running fine for me. I copied it from the Macro's page on the wiki. It generates a BSpline object.
A note, if I try to sweep a profile along the BSpline without checking "Frenet", FreeCAD immediately crashes with no warning.
viewtopic.php?f=3&t=8313&start=10#p68323
I can try to soften the angle of the connector
I have also some time this window
merci à tous pour tester ma macro , je n'ai pas mieux que vous mais jakob a eu un bon résultat viewtopic.php?f=3&t=8313&start=10#p68323
je peux essayer d'adoucir l'angle du raccord
j'ai aussi quelques fois cette fenêtre
to change the values to your needs, change in this sectionjakob wrote:Thx, now we are close. Just adjust the scripts value to my own.
Code: Select all
#### Configuration 2 + 2 Spires ##############################################
lastSpire = 0.0 # last Spire (high spring)
penultimateSpire = pas / 2 # penultimateSpire
# # normal Spring
# # normal Spring
secondSpire = pas / 2 # second Spire
firstSpire = 4 # first spire (low spring)
##############################################################################
1: modify the values
replace ex:
lastSpire = 4.0 # last Spire (high spring)
penultimateSpire = 8.0 # penultimateSpire
# # normal Spring
# # normal Spring
secondSpire = 8.0 # second Spire
firstSpire = 4.0 # first spire (low spring)
I made a shema position of the page Macro_TruncateSpring
2: quit and save the macro
3: load the macro in FreeCAD
4: run the macro
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.
My macros on Gist.github here complete macros Wiki and forum.
Re: Try to do a Spring
No, I pasted it into the python console.jmaustpc wrote:Did you click on "save" before running the macro?
Unzipping it, saving to my macros folder, and running through here works:jmaustpc wrote:here is the macro zipped up, if you unzip it you should be able to just open it in FreeCAD.
Unzipping into my macros folder ad running it the same way as above works fine too.mario52 wrote:zipped version here
Macro_truncated_spring.zip
I'll run the macros that way instead of pasting into the python console...
Re: Try to do a Spring
hi
nice
I prepare the final version with GUI
mario
nice
I prepare the final version with GUI
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.
My macros on Gist.github here complete macros Wiki and forum.