Syranolic wrote:But, if we take for exemple Constraint15 (111,803mm) from the second construction sketch in "Syranolics_sword_normandc1.fcstd", can't I refer to it in profile2 instead of manually setting Constrain8?
Yes. But you need to rename it first.
Edit the Construction Sketch001, then rename Constraint15 to anything, for example "Diagonal".
Now the trick is to find the internal ID of "Construction Sketch001", which is only a label. You can make it visible in the 3D view, and hover your mouse over it (hide everything else to make it easier): when one of its elements is preselected and its color changes to yellow, look at the lower left of the FreeCAD window. It will be written something like
(where (x,y,z) refer to the coordinates)
So the internal ID of this sketch is Sketch001.
Alternatively you can go to View --> Panels and select "Selection view". Then select Construction Sketch001, and you will see this in the Selection view.
FC_Syranolic_SelectionView_01.png (11.12 KiB) Viewed 2209 times
Next, edit the Profile 2 sketch and double-click on Constraint8. In the "Insert length" dialog window, click on the f(x) Expressions icon.
FC_Expression_Sketch_00.png (20.12 KiB) Viewed 2209 times
A new input field opens. (On my Ubuntu system, there's a bug causing the new window not to have a border.) Start typing the S letter, and auto-completion will display a list of choices. Select "Sketch001". A period is automatically appended.
FC_Expression_Sketch_01.png (26.4 KiB) Viewed 2209 times
Now, after the period type the C letter (for "Constraints"). Auto-completion will display the only available variable, "Constraints.Diagonal". Click on it, then on OK.
FC_Expression_Sketch_02.png (22.82 KiB) Viewed 2209 times
The Formula input closes and we get back to the "Insert length" dialog. It now shows the numerical value greyed out, and the f(x) icon is now white on blue, which shows that it is enabled. Click OK to close the dialog. The constraint is now linked.
FC_Expression_Sketch_03.png (19.37 KiB) Viewed 2209 times
Last edited by NormandC on Sun Jul 31, 2016 8:15 pm, edited 2 times in total.
Syranolic wrote:Alternatively, it looks like I could use a few global parameters and enter mathematical expressions in the contraints. But I can't find where to define them outside of a sketch...
As we have already two different methods to generate the spike, I want to add another but totally parametric approach. It bases on the creation of two shadow profiles.
- The shadow profiles are then padded symmetrically.
- Create a clone from each shadow profile.
- The padded profile and its clone are than turned against each other in a predetermined angle and the common of both is created.
- Do the same with the other profile and its clone.
- At last make a common of both existing commons. (This part is similar to DeepSOICs method.)
The image shows a steering sketch, which was created from the design dimensions in order to get the length marked in green. These length are used to create the shadow-profiles. An unknown angle, needed for turning of the profiles, is also delivered by the steering sketch.
I have to admit, that the padding length are manually set. In principle it should be possible to get them with some additional effort also from the steering sketch.
Ulrich
OS: Debian GNU/Linux 8.5 (jessie)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Unknown
Branch: (losgelöst von origin/releases/FreeCAD-0-16)
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
I really like how the part is created out of one essential sketch, but I don't understand its design! It's ok: I managed to draw the blade in a totally parametric fashion with 3 simple sketches now (except for the 3mm thickness).
Next I need to design the stiffeners with correct dimensions for their 3mm thickness to fit inside the blade. In case I get stuck, I suppose it's more appropriate to start a new thread instead continuing in this one, right?
It's more appropriate to start a new topic for a different problem, but a few months from now if I want to find this thread I'll remember "sword" and probably "Cristal Sword" so I'd rather see this thread continued, but with the title revised as things change. That way we can also see the sword go from beginning to completion in one forum thread.
Of course, other people might have different opinions.