Curves WB: Map sketch on surface

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!
drmacro
Posts: 740
Joined: Sun Mar 02, 2014 4:35 pm

Curves WB: Map sketch on surface

Post by drmacro » Sat Mar 28, 2020 7:52 pm

I get, to me an unexpected result when I use Map sketch to surface.

I padded a cylinder and made a sketch of a hexagon. Selected them and clicked Map sketch to surface.

The hex is the correct shape. But, why is it below the cylinder (-Z)?
HexOnSurface.png
HexOnSurface.png (30.79 KiB) Viewed 195 times
Attachments
HexOnSurface.FCStd
(19.08 KiB) Downloaded 6 times
User avatar
Chris_G
Posts: 1306
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves WB: Map sketch on surface

Post by Chris_G » Sat Mar 28, 2020 9:33 pm

Because your surface is parametrized in [-100, 0] in V direction :

Code: Select all

>>> f1.ParameterRange
(0.0, 6.283185307179586, -100.0, 0.0)
The easiest way to use this tool is to simply select the target face and activate the tool.
Since there is no sketch selected, it will create a default one, with the face boundaries included.
drmacro
Posts: 740
Joined: Sun Mar 02, 2014 4:35 pm

Re: Curves WB: Map sketch on surface

Post by drmacro » Sun Mar 29, 2020 2:28 pm

Chris_G wrote:
Sat Mar 28, 2020 9:33 pm
Because your surface is parametrized in [-100, 0] in V direction :

Code: Select all

>>> f1.ParameterRange
(0.0, 6.283185307179586, -100.0, 0.0)
The easiest way to use this tool is to simply select the target face and activate the tool.
Since there is no sketch selected, it will create a default one, with the face boundaries included.
I'm a bit confused. where did the -100 come from, the padding of the circle? (and V direction?...)

And, if I select the surface of the padded cylinder only and activate the tool I get:

Code: Select all

onChanged : Sketch_On_Surface003 -> Proxy
Face update : (<PartDesign::Pad>, ['Face1'])
onChanged : Sketch_On_Surface003 -> ConstructionBounds
onChanged : Sketch_On_Surface003 -> Scale
onChanged : Sketch_On_Surface003 -> Label
Part::FeaturePython / Sketch_On_Surface003: Links go out of the allowed scope
***** execute *****
Sketch bounds = (1.7976931348623157e+308, -1.7976931348623157e+308, 1.7976931348623157e+308, -1.7976931348623157e+308)
Face update : (<PartDesign::Pad>, ['Face1'])
Surface bounds = (0.0, 6.283185307179586, -100.0, 0.0)
to2D : []
onChanged : Sketch_On_Surface003 -> Shape
<Part> ViewProviderExt.cpp(1324): Cannot compute Inventor representation for the shape of HexOnSurface#Sketch_On_Surface003
----- execute -----
User avatar
Chris_G
Posts: 1306
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves WB: Map sketch on surface

Post by Chris_G » Sun Mar 29, 2020 3:28 pm

OK. I just pushed a couple of fixes.
Please update Curves WB and retry.
drmacro
Posts: 740
Joined: Sun Mar 02, 2014 4:35 pm

Re: Curves WB: Map sketch on surface

Post by drmacro » Sun Mar 29, 2020 3:53 pm

Chris_G wrote:
Sun Mar 29, 2020 3:28 pm
OK. I just pushed a couple of fixes.
Please update Curves WB and retry.
How does it know which sketch to map...

Cuz, I updated Curves, and no error, but the Mapped_Sketch is empty...
User avatar
Chris_G
Posts: 1306
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves WB: Map sketch on surface

Post by Chris_G » Sun Mar 29, 2020 4:05 pm

It should contain Construction Lines that are the face boundaries.
Then you can add some geometries, that will be mapped on the face.
drmacro
Posts: 740
Joined: Sun Mar 02, 2014 4:35 pm

Re: Curves WB: Map sketch on surface

Post by drmacro » Sun Mar 29, 2020 5:16 pm

Chris_G wrote:
Sun Mar 29, 2020 4:05 pm
It should contain Construction Lines that are the face boundaries.
Then you can add some geometries, that will be mapped on the face.
So, I don't create a sketch and draw what I want, then activate the tool?

Different topic: With the new version. I selected the face of the cylinder and activated the tool. Now I see the construction loines you note when I open the resulting sketch.


Also, the boundary construction lines are 100mm x 6.28319mm (The later remarkable close to 2PI...) The cylinder is 100mm tall, but 2PI?
User avatar
Chris_G
Posts: 1306
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves WB: Map sketch on surface

Post by Chris_G » Sun Mar 29, 2020 5:29 pm

Easiest workflow :
- select target face in 3d View
- activate tool
- 2 objects are created : Sketch_on_Surface and Mapped_Sketch
- edit Mapped_Sketch to add geometries
drmacro wrote:
Sun Mar 29, 2020 5:16 pm
Also, the boundary construction lines are 100mm x 6.28319mm (The later remarkable close to 2PI...) The cylinder is 100mm tall, but 2PI?
This the default parametrization of cylinders in FreeCAD ([0, height, 0, 2*pi])
But if Scale property of Sketch_on_Surface is True, you can resize the blue boundary box of Mapped_Sketch to your liking.
TheMarkster
Posts: 1353
Joined: Thu Apr 05, 2018 1:53 am

Re: Curves WB: Map sketch on surface

Post by TheMarkster » Sun Mar 29, 2020 5:31 pm

Chris_G wrote:
Sun Mar 29, 2020 5:29 pm

This the default parametrization of cylinders in FreeCAD ([0, height, 0, 2*pi])
But if Scale property of Sketch_on_Surface is True, you can resize the blue boundary box of Mapped_Sketch to your liking.
Can also add construction lines as boundaries on pre-existing sketch?
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
User avatar
Chris_G
Posts: 1306
Joined: Tue Dec 31, 2013 4:10 pm
Location: France
Contact:

Re: Curves WB: Map sketch on surface

Post by Chris_G » Sun Mar 29, 2020 5:39 pm

Yes. And set Scale and ConstructionBounds properties to True.
Post Reply

Who is online

Users browsing this forum: Google [Bot], herbk, M4x and 27 guests