[v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

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!
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

[v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by industromatic »

How to create a datum line normal to a sketch, constrained to the sketch?

I have a 3D model with 2 datum planes I would like to put a cylinder between, and its axis of rotation
in the Z direction and dimensioned relative to the master sketch. Here's the model:
cs-enc-part-cont-bottom-1.fcstd
(170.19 KiB) Downloaded 125 times
And here is what it looks like:
cs-enc-part-cont-bottom-1-datums-5.png
cs-enc-part-cont-bottom-1-datums-5.png (18 KiB) Viewed 2479 times
And the master sketch is like this:
cs-enc-part-cont-bottom-1-master-sketch-1.png
cs-enc-part-cont-bottom-1-master-sketch-1.png (16 KiB) Viewed 2479 times
If I could make a Z axis datum line coincident with a sketch point easily, that would be a good way to locate a cylinder shape...

Is there a way to do that?

  • version in use
    OS: Debian GNU/Linux testing (buster)
    Word size of OS: 64-bit
    Word size of FreeCAD: 64-bit
    Version: 0.17.11935 (Git)
    Build type: Release
    Branch: v0.17.11935_a5bc70cca0d2eaa567
    Hash: a5bc70cca0d2eaa56709603521650ccb3d8d926c
    Python version: 2.7.13
    Qt version: 4.8.7
    Coin version: 4.0.0a
    OCC version: 7.1.0
    Locale: English/UnitedStates (en_US)
Last edited by industromatic on Thu Aug 31, 2017 11:22 pm, edited 1 time in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by DeepSOIC »

There are supposed to be two ways to achieve that, but I couldn't make any of them work.
1. Select XY plane + vertex, use Normal mode
->Normal mode is not listed, and doesn't work even if I enforce it.

2. Select the vertex and Z axis, use Tangent mode
-> if vertex is selected first, it was supposed that the line passes through the vertex, but it remains coincident with Z axis.
So... sorry, I don't see a straightforward way of attaching the datum line. I need to dive into code.

Please create a tracker ticket, and post it here, I will assign it to myself.
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by industromatic »

OK, will do.

When you say a vertex, I think of a corner of something already defined in 3D.
Are you meaning a point in a sketch as a vertex? I am wanting to create a bolt hole cylinder out away from the path in the sketch that defines the outside rim of my enclosure bathtub shape.

I created tracker issue 3175.

I tried following the way you said with a vertex, (of the master sketch path), and a datum plane, then ask for line, then map mode normal, and get a result that looks like this:
cs-enc-part-cont-bottom-1-datums-6.png
cs-enc-part-cont-bottom-1-datums-6.png (8.12 KiB) Viewed 2452 times
The line I got is coincident, not normal...
peterl94
Veteran
Posts: 1001
Joined: Thu May 23, 2013 7:31 pm
Location: United States

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by peterl94 »

industromatic wrote: Thu Aug 31, 2017 10:31 pm When you say a vertex, I think of a corner of something already defined in 3D
Basically, yes. The vertices of a sketch would be the endpoints of the lines and arcs - the points you can select when not in sketch edit mode (so no center points).

I didn't find a way to place a datum line at a vertex either, but you could achieve the same thing with plane and a sketch. I still don't quite understand what you want to achieve, but maybe you could attach a primitive without needing a normal axis.

In the file below, I attached the plane and the cylinder with the attachment mode "translate origin." The super placement rotation doesn't seem to work with that mode, so the trick is to orient the plane the way you want it with a different attachment mode and then clear the references and use the translate origin mode.

DeepSOIC, any technical reason why we can't use superPlacement rotation with the Translate mode? I think it would be useful.

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11937 (Git)
Build type: Release
Branch: master
Hash: 2751a3e8476c9b12d6982c7301bedd35a61fee4a
Python version: 2.7.13
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedStates (en_US)
Attachments
attachment-test.FCStd
(8.08 KiB) Downloaded 39 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by DeepSOIC »

peterl94 wrote: Thu Aug 31, 2017 11:39 pm DeepSOIC, any technical reason why we can't use superPlacement rotation with the Translate mode? I think it would be useful.
Well, for some reason I decided it would be useful if Placement.Rotation is unchanged by Translate mode, so that one can set arbitrary rotation. Then, superPlacement was created, but I left Translate mode as-is. I don't quite remember why, maybe because that makes it possible to use Draft Rotate on objects attached with Translate mode... Maybe it would have been a better decision to just always copy superPlacement's rotation to Placement.Rotation then. I can change it, but now it will break projects that use Translate mode, and Placement.Rotation is nonzero.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by DeepSOIC »

Development in https://github.com/DeepSOIC/FreeCAD-ell ... Attacher21
The issues of @industromatic already addressed.
In plan:
* add new attachment modes for sketches and primitives "OZXY", "OXYZ", ... They are to attach by picking origin vertex, and directions of two axes (as lines or as vertices).
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by industromatic »

I found just now I can create a datum line by starting with a datum plane and a point that is a vertex in a sketch that is selectable outside of sketch edit. Starting from that, I can translate it and get close to what I wanted. I notice a bunch of these messages: "Document::recompute: The graph must be a DAG." Not sure what step introduced them yet.
cs-enc-part-cont-bottom-1-datums-7.png
cs-enc-part-cont-bottom-1-datums-7.png (40.64 KiB) Viewed 2410 times
cs-enc-part-cont-bottom-2.fcstd
(175.17 KiB) Downloaded 39 times
Another experiment: create a dimensioned point in a sketch for attaching to fails since it is not selectable outside the sketch.
I wanted that because it keeps the sketch as the central master for most dimensions. Can you think of any way to have a point or intersection of construction lines show and be selectable outside a sketch?

I'd like to be able to keep dimensions and explanatory text notes in a master sketch, and have the body follow those dimensions.
peterl94 » Thu Aug 31, 2017 5:39 pm

I didn't find a way to place a datum line at a vertex either, but you could achieve the same thing with plane and a sketch. I still don't quite understand what you want to achieve, but maybe you could attach a primitive without needing a normal axis.

In the file below, I attached the plane and the cylinder with the attachment mode "translate origin."
I looked at your doc and see how you made extra sketches to locate a cylinder with a sketch vertex. My intent is a cylinder normal to my master sketch, (or skeleton sketch), so having extra sketches is not what I wanted. The purpose of my datum planes parallel to my sketch plane is to be a definition in the Z axis of where cylinder ends stop. I am wanting to avoid extra sketches and steps to keep the whole doc simpler since I have more detail to add and in the past, the more complex the more likely to break. Thanks for exploring this though.

Next I try attaching a cylinder to the datum line I created as above.
Last edited by industromatic on Fri Sep 01, 2017 2:32 pm, edited 1 time in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by DeepSOIC »

IMO, it's best if master sketch is not used for extrusion or revolution directly. Then, you can freely add non-construction elements to it as needed. For example, for aligning your cylinders, you can drop a few circles into the master sketch, and use them to attach datum lines (use axis-of-curvature mode).

Here's an example project...
master sketch partdesign example.FCStd
(28.66 KiB) Downloaded 48 times
User avatar
industromatic
Posts: 150
Joined: Thu Mar 27, 2014 4:30 pm
Location: Austin Texas
Contact:

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by industromatic »

IMO, it's best if master sketch is not used for extrusion or revolution directly.
I will look at your doc and see if it does what I am thinking... Do you mean to have a non-swept master, and make another sketch that is slaved to it? I want the overall outline in the master so I can reference it.

Is there a way to make a sketch clone?

I opened your doc and see what you mean, so I will be looking for ways to base one sketch on another. How is shapebinder used in that doc? Your sketch001 seems to be related to master sketch. I need to understand how, and I will be able to do my plan for an enclosure that is parameterized, and moldable and easy to understand..
Last edited by industromatic on Fri Sep 01, 2017 2:45 pm, edited 1 time in total.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: [v0.17] commit 11935 How to create a datum line normal to a sketch, constrained to the sketch?

Post by DeepSOIC »

industromatic wrote: Fri Sep 01, 2017 2:35 pm Is there a way to make a sketch clone?
Yes, it depends on what you want.
* you can copy-paste a sketch
-> the new sketch is independent
* you can make Draft Clone of sketch, and even drag the clone into Body, and even Pad the clone.
* you can use "Carbon Copy" tool in sketcher itself, to suck in a semi-linked copy of geometry from other sketch
* in PartDesign, you can use ShapeBinder to bring in a sketch from outside of active body.
maybe more...
Post Reply