Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

skText too big, how can I define its origin and sizes on sketch?

darren_13darren_13 Member, Developers Posts: 119 PRO
Think the title says it all, I want to place the text in a certain position (above my aerofoils) also, changing skText to construction doesn't seem to do anything?

Kind regards,
Darren

Comments

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Hi Darren,

    The box around the sketch text can be dimensioned similarly to other sketch entity.  Additionally, you can position sketch text by setting a coincident constraint between any of the 'snap points' on the box and some other sketch vertex.  Here is an example of sketch text which is dimensioned and anchored to the origin:

    https://cad.onshape.com/documents/0d853e17ab2575bee74ac3a6/w/d0bc950f7cd53294625170ba/e/bc1d1373efc9578dc2b2f2f2

    Currently sketch text cannot be made into a construction entity. Out of curiosity, what is your use case for construction text? Feel free to submit an improvement request on the right if you would like to see this functionality in Onshape :smile: --->
    Jake Rosenfeld - Modeling Team
  • kevin_o_toole_1kevin_o_toole_1 Onshape Employees, Developers, HDM Posts: 565
    edited April 2017
    Assuming you mean to use skText via FeatureScript:

    You can do it with skContraint, but setting the initial guess correctly becomes tricky. Instead, what people usually do is to just create the sketch with huge text, then use opTransform to move and scale the resulting entities to the desired position and size.

    Here's a document which demonstrates the idea:
    https://cad.onshape.com/documents/cdbad61ec176b39049f8d4c1/w/0cb06ca7cb2788345cc7a448/e/c1778a16ae172747eaf7b147
    In this doc's feature, the transform (both position and scale) is determined by a selected sketch line. The doc for opTransform might illuminate other methods of creating the transform you need.

  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,646
    Oops! Thanks Kevin.  Didn't realize this was in the FeatureScript category.
    Jake Rosenfeld - Modeling Team
  • darren_13darren_13 Member, Developers Posts: 119 PRO
    Thanks, @kevin_o_toole_1 I'll go this way I think. On the subject of setting initial guess, I created a post asking about it previously but nobody has commented on it... is there anywhere I can go for this information? I have another script 'Parametric Aerofoil' which requires it to advance it further, so any input here would be helpful. I need skConstraint coincident and tangent when I set initial guesses to approximate coordinates nothing materialised. 

    Many Thanks,
    Darren
  • BulletEngineeringBulletEngineering Member Posts: 24 PRO
    I think they forgot to document some of the inherited mapped properties of the skText function. Try adding the following lines to your sketch map (in the section where you define "text" : "this is my text", "fontName" : "OpenSans-Regular.ttf", etcetera)

     "firstCorner" : vector( xPosition, yPosition), 
    "secondCorner" : vector(xPosition+1*inch, yPosition + textHeight)


    Further explanation posted in the thread https://forum.onshape.com/discussion/8269/how-do-i-scale-sktext-in-situ-from-featurescript

Sign In or Register to comment.