Part Primitives, Create Tube has no Map-Mode

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
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!
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Part Primitives, Create Tube has no Map-Mode

Post by freecad-heini-1 »

Hi,
in Freecad 0.19 you can find a new primitives called tube under Part, Primitives, Create tube.
It has no Map-Mode.
Why?
Please improve this tool with a map mode.
Best regards
Wilfried
User avatar
papyblaise
Veteran
Posts: 8002
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Part Primitives, Create Tube has no Map-Mode

Post by papyblaise »

I have the 20052 version but Idon't see this new function
kisolre
Veteran
Posts: 4166
Joined: Wed Nov 21, 2018 1:13 pm

Re: Part Primitives, Create Tube has no Map-Mode

Post by kisolre »

papyblaise wrote: Thu Mar 19, 2020 12:19 pm I have the 20052
Exists in 20036
Attachments
CreateTube.jpg
CreateTube.jpg (66.17 KiB) Viewed 1549 times
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Part Primitives, Create Tube has no Map-Mode

Post by vocx »

papyblaise wrote: Thu Mar 19, 2020 12:19 pm I have the 20052 version but Idon't see this new function
https://github.com/FreeCAD/FreeCAD/comm ... /Shapes.py

This Tube object seems like it was created in January 2019, so well over a year.

It's a pretty simple object, it just creates a basic Part_Feature, and adds the three properties Height, Inner Radius, Outer Radius, and that's it.

It is a scripted object made in Python, but it's not a complex object at all. It is not one of the Part_Primitives, so it lacks the attachment behavior those objects have.

Code: Select all

class TubeFeature:
    def __init__(self, obj):
        obj.Proxy = self
        obj.addProperty("App::PropertyLength","OuterRadius","Tube","Outer radius").OuterRadius = 5.0
        obj.addProperty("App::PropertyLength","InnerRadius","Tube","Inner radius").InnerRadius = 2.0
        obj.addProperty("App::PropertyLength","Height","Tube", "Height of the tube").Height = 10.0

    def execute(self, fp):
        fp.Shape = makeTube(fp.OuterRadius, fp.InnerRadius, fp.Height)
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
papyblaise
Veteran
Posts: 8002
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: Part Primitives, Create Tube has no Map-Mode

Post by papyblaise »

Sorry, I find it in Part Wb , it works well and simply to use
freecad-heini-1
Veteran
Posts: 7790
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part Primitives, Create Tube has no Map-Mode

Post by freecad-heini-1 »

Tube_has_no_Map_Mode.gif
Tube_has_no_Map_Mode.gif (948.59 KiB) Viewed 1503 times
User avatar
saso
Veteran
Posts: 1924
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Part Primitives, Create Tube has no Map-Mode

Post by saso »

If some of this features that work in an explicit way are implemented in such a way that it is impossible to make them associative (fully parametric) or until they are changed to work in this way, I would suggest to make their icons in a special color (maybe pink?) or use the existing small overlay pink icon that we already have in PartDesign when features are not attached, so that it will be clear to the user that this features work differently and so increase awareness about this. To my knowledge PartWB Mirror and PartWB Projection are also explicit.
Attachments
Part_Tube_Explicit.svg
(7.49 KiB) Downloaded 48 times
Part_Tube_Explicit.jpg
Part_Tube_Explicit.jpg (8.03 KiB) Viewed 1459 times
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: Part Primitives, Create Tube has no Map-Mode

Post by TheMarkster »

freecad-heini-1 wrote: Thu Mar 19, 2020 8:55 am Hi,
in Freecad 0.19 you can find a new primitives called tube under Part, Primitives, Create tube.
It has no Map-Mode.
Why?
Please improve this tool with a map mode.
Best regards
Wilfried
As a workaround if you need to be able to attach it you can create a draft clone, hide the original tube, and attach the clone.
herrdeh
Posts: 436
Joined: Wed Sep 03, 2014 12:15 pm

Re: Part Primitives, Create Tube has no Map-Mode

Post by herrdeh »

I'm really happy that this feature exists - I've been arguing for it for years.
But in my version it does not work, a "tube" symbol occurs in the tree, but it's invisible and grayed out and cannot be activated.

Console output:

Code: Select all

connect failed: Datei oder Verzeichnis nicht gefunden
Running the Python command 'Part_Tube' failed:
Traceback (most recent call last):
  File "/usr/share/freecad-daily/Mod/Part/BasicShapes/CommandShapes.py", line 54, in Activated
    Shapes.TubeFeature(tube)
File "/usr/share/freecad-daily/Mod/Part/BasicShapes/Shapes.py", line 46, in __init__
    obj.addExtension("Part::AttachExtensionPython")

function takes exactly 2 arguments (1 given)
My version:

Code: Select all

OS: Ubuntu 20.04.2 LTS (ubuntu:GNOME/ubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: dbaa2c1ba458d34244420037d4ff91b3841411ce
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.3.0
Locale: German/Germany (de_DE)
Cheers,
Wolf
drmacro
Veteran
Posts: 8984
Joined: Sun Mar 02, 2014 4:35 pm

Re: Part Primitives, Create Tube has no Map-Mode

Post by drmacro »

Work fine in my version...


OS: Ubuntu 20.04.2 LTS (XFCE/ubuntustudio)
Word size of FreeCAD: 64-bit
Version: 0.20.25111 (Git)
Build type: Release
Branch: master
Hash: bc9beffc45bcd0e1980b3502b43a3a35a96b5406
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Post Reply