I am trying to create wood part from vertices. The extrude command "pad" object always along axis, so the edges may not be 90 degree if the object is rotated, I mean if the vertices are not at the same axis. So, and this will be the most funny part, I decided to create face and then create Sketch at that face and pad it from that face
But there is small problem with the Sketch The face is created correctly but if I use the face as "DatumPlane", Support, for Sketch this has placement offset at XY. But if I want to create the Sketch at the side the face is correct but the Sketch with the same vertices is broken.
I know there is different logic with attachment of the Sketch but the question is? Is it possible? is there any logic or formula to recalculate object vertices to "Sketch vertices" ? to create Sketch exactly as the real object? to cover all edges with Sketch lines?
[solved] Sketch vs Extrude - how sketch is working?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[solved] Sketch vs Extrude - how sketch is working?
Last edited by dprojects on Fri Sep 30, 2022 6:18 pm, edited 1 time in total.
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
Re: Sketch vs Extrude - how sketch is working?
It is not true, you could extrude along some combination of axis, see maybe:
Done with:
Code: Select all
pa1 = pd1.newObject('PartDesign::Pad', 'pad1')
pa1.Type = u"Length"
pa1.UseCustomVector = True
pa1.Direction = (0.57, 0.57, 0.57)
pa1.Profile = sk1
pa1.Length = 53 * 0.5
seen from Top.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Sketch vs Extrude - how sketch is working?
No, I mean extrude command from face object, not PartDesign Pad command:
Code: Select all
shape = Part.makePolygon(verticesArray)
face = Part.Face(shape)
....
face.extrude(FreeCAD.Vector(0, 0, "18"))
or maybe it is possible to use face.extrude but not like this, along axis, but like it is at PartDesign Pad, above from given face?:
Code: Select all
face.extrude("face1","18") <= this syntax exists?
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
Re: Sketch vs Extrude - how sketch is working?
No this is not exist, but you can use the centre of the "destination face" as "destination vector" of extrude.
if you want something different use a Loft provided the face have same edge count.
or ruled surface between the face "sorting edges" to avoid crossing.
Sadly not at my computer now, so no examples.
Regards
Carlo D.
if you want something different use a Loft provided the face have same edge count.
or ruled surface between the face "sorting edges" to avoid crossing.
Sadly not at my computer now, so no examples.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: Sketch vs Extrude - how sketch is working?
I found it in the TheMarkster script.
@TheMarkster use the Draft.makeSketch command and the Pad is created at face, automatically. The Draft is great workbench, it always impressed me how good API it has !!! I need to play with it little more and read about this command because the panel is not always created in the right place but maybe I will be able to do it like this
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking
Re: [solved] Sketch vs Extrude - how sketch is working?
Ah ok.
I use Draft for some functions, and not unusually I steal some code from sources.
It is a good "high level" abstraction from Part.
And is the base of Arch WB one of FC pillars.
TheMarkster code is usually very interesting.
I usually use Part WB so my answers usually don't consider other WB.
Thanks for the suggestions.
Regards
Carlo D.
I use Draft for some functions, and not unusually I steal some code from sources.
It is a good "high level" abstraction from Part.
And is the base of Arch WB one of FC pillars.
TheMarkster code is usually very interesting.
I usually use Part WB so my answers usually don't consider other WB.
Thanks for the suggestions.
Regards
Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.
Blog: https://okkmkblog.wordpress.com/
Re: [solved] Sketch vs Extrude - how sketch is working?
I think Draft is best workbench from API perspective. The Draft.rotate is the only one working function, currently at FreeCAD to rotate things.
but I was happy too soon I don't know what to say this is bug at Sketch? https://forum.freecadweb.org/viewtopic.php?f=22&t=72250
Thanks
Darek
github.com/dprojects
workbench for woodworking is available at: github.com/dprojects/Woodworking