[FIXED] Ticket #3483: Simple paths cannot be upgraded

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

[FIXED] Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

issue #3483: Simple paths cannot be upgraded
Discussion thread
Last edited by Kunda1 on Thu Feb 03, 2022 9:35 pm, edited 1 time in total.
Reason: Added [Fixed] to thread title
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

Bump
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Ticket #3483: Simple paths cannot be upgraded

Post by carlopav »

I'm with @normandc:
I don't understand what you are trying to accomplish by upgrading these paths. Why do you need to upgrade to a Block? FYI a block is not a FreeCAD entity, it's a DXF/DWG entity so it's relevant only at import/export time, for DXF/DWG file formats. In FreeCAD the basic entities are vertex, edge, wire, face, shell, solid, compound and compsolid. Paths Nº 1 & 2 are not upgraded to Blocks, they are upgraded to Wires because they comprise 2 edges. Since Paths Nº 3 and 4 only comprise a single edge each, I'm guessing there is simply nothing to upgrade.
There seems to be no point in upgrading a single line segment...
follow my experiments on BIM modelling for architecture design
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Ticket #3483: Simple paths cannot be upgraded

Post by vocx »

I haven't read the full bug report.

For completeness sake, I just want to mention that you can manually turn a line into a block. You just have to call the appropriate function from the Python console, which is what the Draft_Upgrade tool and the DXF importer do behind the scenes when necessary.

Code: Select all

line = Draft.makeLine(App.Vector(0,0,0), App.Vector(500,0,0))
block = Draft.makeBlock([line])
App.ActiveDocument.recompute()
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
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

carlopav wrote: Tue Jan 14, 2020 10:18 pm
@carlopav what about vocx's idea ? Is it something we could consider adding to the GUI instead of using the Python console?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Ticket #3483: Simple paths cannot be upgraded

Post by carlopav »

@kunda1 I don't know why makeBlock is not exposed in the GUI. We should ask @yorik if there is a precise intention behind that.
At the end the Draft Block is a quite unuseful object... It's exactly a Part Compound... But confuses the user with its name, so he keeps thinking in an ACAD way, without obtaining the functionalities of an acad block....
Probably the intention was to limit its usage... ?
follow my experiments on BIM modelling for architecture design
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

yorik wrote: :point_up_2:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

yorik wrote: :point_up_2:
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Ticket #3483: Simple paths cannot be upgraded

Post by yorik »

Thanks for the reminder... Fixed in git commit 8492cfb9eb
We should think of disabling/obsoleting this Draft Block... it was created at a time when there was no Part Compound, and it basically does just the same thing.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [FIXED] Ticket #3483: Simple paths cannot be upgraded

Post by Kunda1 »

Thanks yorik! Marked as [FIXED]
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply